1
0
Gráfico de cometimentos

54 Cometimentos

Autor(a) SHA1 Mensagem Data
Eric Rosas
4d7a95f88e asoc: codec: Add surge reset routine for wcd939x
Enable wcd939x surge reset routine. Add callback for
the event within mbhc and enable it for wcd939x.

Change-Id: Iabc8c3367ae2eca5982db4526c6860e5eba63b76
Signed-off-by: Eric Rosas <quic_erosas@quicinc.com>
2023-06-29 14:17:16 -07:00
Phani Kumar Uppalapati
e6eac8ce72 asoc: wcd939x: avoid static sbu1/2 connections to gnd/mic
Currently on pineapple CDP platform, sbu1/2 switches are always
pre-connected to gnd/mic of the jack. Avoid this static connection
and connect/disconnect only when headset insertion/removal is detected.

Change-Id: If3bef6834caeb539492304d8b16808cd09c5afab
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
2023-06-05 11:32:47 -07:00
Prasad Kumpatla
9a5bca98b7 asoc: wcd-mbhc: skip AATC switch settings for SSR/PDR
In SSR/PDR usb switch settings won't be reset in wcd939x-i2c
driver. So no need to do switch settings for AATC when recovering
from SSR/PDR. Depends on the status to avoid AATC switch settings
again after  SSR/PDR.

Change-Id: If7fc2a84356a406e9cf7e6cc557e19584fda3969
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-04-28 10:39:37 +05:30
Prasad Kumpatla
1399d39839 asoc: mbhc: enable l_det_en bit
enable l_det_en bit while detecting the HS.

Issue: While removing HS some additional electrical interrupts
are triggered and reporting different events to userspace, which is
cause issues. To avoid this electrical interrupt flow, there is
a check in adc_hs_rem_irq for wcd_swch_level_remove() to check
for l_det_en bit status. Depends on this it will return from the
adc_hs_rem_irq() without going further.

Solution: Enabling the l_det_en bit will helps to avoid serving
electrical interrupt flow to further in adc_hs_rem_irq().So this
will helps to stop reporting different/unwanted events to user space.

Change-Id: I29d72b65ebb59969b69f3f8c7f4c7eb2debb0f1c
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-04-12 11:12:31 +05:30
Phani Kumar Uppalapati
10371b0909 asoc: wcd-mbhc: check mbhc pointer to null before access
Check MBHC structure pointer to null before accessing.

Change-Id: I21230b524a702dc5880904160d80f9f19564fc3a
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
2023-03-20 13:22:38 -07:00
Prasad Kumpatla
afcd8c5178 asoc: wcd-mbhc: Disable moisture detect and duty cycle
Disable moisture detect and duty cycle for WCD USB AATC HS.

Change-Id: I7bb0d5f2aaa52368f2a00bc99b066eb459c72094
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-01-05 13:33:23 +05:30
Prasad Kumpatla
2937a09ddc asoc: wcd-mbhc: Ignore mech plug irq for AATC HS
WCD USB AATC does not require mech plug irq, UCSI
layer will help to get the events to process insert/remove
of AATC HS.

Change-Id: Ie1b14703605be294471303b6454f94b55e9f932d
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2022-12-14 23:47:05 +05:30
Prasad Kumpatla
3117a98c02 asoc: codec: enable impedance for wcd939x
enable impedance and calculations according to wcd939x.

Change-Id: Id0c2c7ebea6941dadbe501d388bdedc265e93db6
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2022-10-17 11:48:31 +05:30
Yuhui Zhao
c800c96b4c audio-kernel:mbhc: update jack api in mbhc driver
update jack api in mbhc driver.

Change-Id: I2f3d1b9f8a3e0178335ebaf101141e2ec7df21ce
2022-10-06 22:57:09 -07:00
Yuhui Zhao
f216366d83 audio-kernel: add wcd_usbss api in pineapple and mbhc driver.
add wcd_usbss api in pineapple and mbhc driver

Change-Id: I1e4d8f907003516368f855be2461a06daf4526c7
2022-10-06 22:56:21 -07:00
Vatsal Bucha
bb1b149345 ASoC: wcd-mbhc: Resolve warning log when mutex destroy before unlock
Resolve warning log when hph pa mutex lock is destroyed before
unlock. Initialize hph pa locks as global lock and do not destroy
during SSR to resolve issue.

Change-Id: Idc5af793294f7fdc8dbcc17770f68fe2c46ab337
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2021-06-27 21:07:36 -07:00
Meng Wang
b16ebebc97 asoc: mbhc: avoid unregister extcon device when ssr happens
MBHC extcon device is unregistered when adsp ssr happens and causes
kernel panic. Avoid unregistering MBHC extcon device in mbhc_deinit.

Change-Id: I69fa057a480ebadaf324ca1f61bf399c176e3b2d
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-05-13 04:17:03 -07:00
Meng Wang
ecf424366e asoc: mbhc: add extcon device for MBHC
Add extcon device for MBHC.

Change-Id: I2f22223bc62f4f4b5f2e8cb61cf7e7d41548947f
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-04-29 10:04:21 +08:00
qctecmdr
0773e4d1f7 Merge "Revert "ASoC: codecs: handle device disconnect during SSR"" 2020-09-27 03:10:54 -07:00
Vignesh Kulothungan
a77e386d54 Revert "ASoC: codecs: handle device disconnect during SSR"
This reverts commit 75f229237a.

Change-Id: Ie37d6ac80a3f86df50cdaab65dfd51624f7c7517
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-09-18 13:15:07 -07:00
Vatsal Bucha
ba1a97d976 Revert "ASoC: mbhc: Call impedance detection routine before get imped"
This reverts commit 892efe8d09.

Change-Id: Ica020594b0470cd297cd84ca6b737bde8dce33f3
2020-09-17 11:23:56 +05:30
Vatsal Bucha
892efe8d09 ASoC: mbhc: Call impedance detection routine before get impedance
Call impedance detection routine as part of callback to get impedance
before printing value of impedance.

Change-Id: I8b7174e4f7fd9c7715a2c12a0628c8f7849a93e6
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-08-20 19:33:33 +05:30
Vignesh Kulothungan
75f229237a ASoC: codecs: handle device disconnect during SSR
During SSR, when usbc analog device is disconnected, the
respective disconnect interrupt is not handled and hence userspace
is not notified. When ADSP recovers, fsa driver sends a disconnect
notification. So handle device disconnect and notify jack/userspace
through this notification.

Change-Id: Ic695c2267c9289f9528d50202938ec09f634de8a
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-06-17 23:07:21 -07:00
Aditya Bavanari
313aa17ac4 asoc: codecs: Add comparator autozeroing support for rouleur
When current source mode is enabled, comparator auto
zeroing should be turned ON by HW. As rouleur codec HW
doesn't do this automatically, add this support
in SW to set the auto zero enable before FSM enable
and reset to auto once FSM is enabled.
Disable surge protection before ADC measurements
and change HPHL and HPHR thresholds while
identifying cross connection for proper
accessory identification.

Change-Id: Ib775de0f0bdb6c655a3c0eb4775276acfbca1e84
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-06-03 21:04:31 -07:00
Aditya Bavanari
c3fd6cc305 asoc: codecs: Fix button interrupts issue in rouleur
Current source mode in rouleur does not work
properly leading to issues in button interrupts
and fake electrical removal interrupts.
Enable pull up mode instead of current source
mode to fix these issues. Modify the headset
max vref voltage to 1.7 volts and micbias
calculation logic.

Change-Id: If3e4a2fdcf080b07fe3c363b6eb6115f101b91f4
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-06-03 13:46:02 -07:00
Akhil Karuturi
3ba03d15fe ASOC: Remove support for ANC headphones
ANC headphones are no longer supported, removed dead code related to the feature.

Change-Id: I3dd51b5b1d9f77fd870947608f8a14fc3f7aeed0
Signed-off-by: Akhil Karuturi <akarutur@codeaurora.org>
2020-05-07 19:51:29 -07:00
qctecmdr
8707284023 Merge "ASoC: wcd-mbhc: Fix playback pause during lineout insertion" 2020-04-29 22:27:54 -07:00
Vatsal Bucha
c2e5189852 ASoC: wcd-mbhc: Fix playback pause during lineout insertion
Playback pauses during aux cable insertion as removal of
cable is reported followed by insertion. Report removal
of current cable only when headset connected to other end
of extension cable and not lineout.

Change-Id: I08933f4a88493136a518ee72646aa10b1f06eb70
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-04-16 09:51:53 -07:00
Vatsal Bucha
7544634ca6 ASoC: wcd-mbhc: Disable moisture detect threshold if duty cycle disabled
Moisture detection is not disabled properly if threshold
remains set as 24k even if duty cycle is disabled.
This is leading into headset not getting detected
sometimes. Disable threshold as well if duty cycle disabled.

Change-Id: Ic90c65d8bbaa965cf147f95edf5add8980889e1f
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-04-16 03:11:42 -07:00
Vatsal Bucha
2ccb20dc4c ASoC: wcd-mbhc: Disable micbias internal pull-up after headphone detected
Micbias2 internal pull-up remains enabled even after headphone is detected.
This results in power issues. Disable pull up after insertion detection.

Change-Id: I335dbb498192738fc282421d92510400a661cf0c
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-04-01 11:50:10 -07:00
Ramlal Karra
6abe95fd0b asoc: codecs: Avoid MBHC OverCurrentProtection.
In the existing code, Over Current Protection interrupt is enabled
 as part of MBHC insertion event handling.
This is causing audio mute on Stereo Headset randomly.
This OCP through MBHC is no more required as the
 Over Current/surge is handled in HW.
Removing the OCP enabling code to fix the issue.

CRs-Fixed: 2622368

Change-Id: Iae8994aa365eb294793190f665407af111b23c82
Signed-off-by: Ramlal Karra <rkarra@codeaurora.org>
2020-03-24 00:36:46 -07:00
Meng Wang
7f70656cc0 asoc: mbhc: update mode for analog type-c headset check
POWER_SUPPLY_TYPEC_SINK_AUDIO_ADAPTER is not supported on new
kernel-5.4. Update mode to TYPEC_ACCESSORY_AUDIO for analog
type-c headset.

Change-Id: Id46ea2eebea8257a48134431f07a81b6ed7e6c7d
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-02-10 09:38:35 +08:00
Vignesh Kulothungan
823f0f01fe ASoC: add config check for QGKI
Add CONFIG_AUDIO_QGKI check for variables and functions
in audio drivers, so they are used only during a QGKI build.

Change-Id: Ia04232566367f196f298a49cf3962bb7927bec6a
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-01-26 03:51:32 +05:30
Vignesh Kulothungan
16a9d512d7 ASoC: codecs: use function if config is enabled
Use "wcd_mbhc_usbc_ana_event_handler" function only when
CONFIG_QCOM_FSA4480_I2C is enabled.

Change-Id: I5211a8ce09fb06021310e528b5815fdbcd3f2dab
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-01-07 18:59:45 -08:00
qctecmdr
3adccae508 Merge "ASoC: wcd-mbhc: Fix headset insert not detected after moisture config" 2019-11-01 21:30:24 -07:00
Vatsal Bucha
7b663b23b2 ASoC: wcd-mbhc: Fix headset insert not detected after moisture config
Headset insertion is not detected after moisture is configured and then
removed. This is because during moisture_detect GND_DET_EN is configured
irrespective of whether it is enabled or not. Add a check before enabling
gnd_det_en. Also as moisture_en is disabled and duty cycle is enabled
change check during removal to disable threshold and polling.

Change-Id: Iee9d79b38b228e78d1509d59e92d37f1328f079e
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-10-25 00:47:21 -07:00
Vatsal Bucha
fc40b33b24 ASoC: wcd-mbhc: Fix null pointer dereference for mbhc
IRQ data pointer is corrupted due to slimbus NGD errors.
This may happen as IRQ will be received from slimbus.
Check for mbhc null pointer before dereferencing to avoid crash.

Change-Id: I142ee535c6d643b53063b57c0f45414aff8b6304
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-10-22 12:22:04 +05:30
Vatsal Bucha
cd339694c5 ASoC: wcd-mbhc: Remove max impedance limit for lineout detection
Max limit of 60k ohms was set for cable to be detected as lineout
to fix headset detected as lineout issue on legacy targets.
This was because of large impedance detected for headset.
This is not applicable for adc based targets as headset is
detected based on mic adc voltage. Remove max impedance limit for
lineout detection.

Change-Id: If73bbe2cd78d04d1fcb359a3e5ed5cd69f3ab9f0
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-09-11 00:11:55 -07:00
Vatsal Bucha
48003fde1a ASoC: wcd-mbhc: Fix high impedance lineout detected as headphone issue
During playback if lineout is inserted it is detected
as lineout then changed to headphone. This is because
we do not compute impedance again as pa is on. Force
jack to be detected as lineout based on initial detection
to resolve the issue.

Change-Id: I243c324dcd251596db97aeef07b8535986550650
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-07-24 16:12:36 +05:30
Vatsal Bucha
15e7831783 ASoC: wcd-mbhc: Remove hardcoding of hphl and gnd swh to NC for analog USBC
Read hphl_swh and gnd_swh from dtsi instead of hardcoding to NC
for every USBC target. Some platforms use NO switch.

Change-Id: I3dca6c7450579e8feb5d80c1340495958683a026
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-04-05 07:59:58 -07:00
Vatsal Bucha
e1728c5c3c ASoC: wcd-mbhc: Disable moisture_en when duty cycle is enabled
Moisture Detection should be disabled at init if duty cycle is enabled.

Change-Id: If398928a680174d981b9baefe02d9efd4e21766e
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-02-20 19:00:12 +08:00
Meng Wang
11a25cf657 asoc: update relative header files
Move all relative header files to include folder.

Change-Id: Ic61a61a88823b4749dbe8c1f680d08201a3b4a48
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-18 10:50:27 +08:00
Meng Wang
43bbb87652 asoc: Update file header to GPL-2.0-only
Update file header to GPL-2.0-only.

Change-Id: Ic1542a3209a5fe73c937a5b36491ede4a451936d
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-10 14:49:34 +08:00
Meng Wang
15c825d077 ASoC: codec: Update codec driver to component driver
Some alsa API are removed in kernel-4.19 which would cause
codec driver compile failure. Update codec driver to fix it.

Change-Id: Ie358ec1863082166958059c179300b453d2a03ad
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-08 03:15:55 -08:00
Meng Wang
61af6849e9 ASoC: switch audio drivers to SPDX identifier
Switch audio drivers to SPDX identifier on msm-4.19.

Change-Id: Ic3f0230a516db251b8d81e8a7e73dbc04d66fe1b
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-07 15:47:32 +08:00
Vatsal Bucha
4b8884a7ae ASoC: wcd: Remove non-essential current source votings from adc
Zdet current source is enabled for 4 pole aux cable and kept
even after plug removal. This increases voltage for both hph left and
right which causes error in cross-connection detection for subsequent plug
detections. Remove current source enablement from unrequired places.

CRs-Fixed: 2234559
Change-Id: Icffbca88f7a6873c509c91e31b494dd6d5d21cb9
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2018-11-22 00:54:35 -08:00
Md Mansoor Ahmed
26d8bddff4 Asoc: codec: Fix compilation errors for sdmsteppe target
Fix compilation errors for sdmsteppe target.

Change-Id: I511bfd5271d04b455e46a101c47ea1535681dcca
Signed-off-by: Md Mansoor Ahmed <mansoor@codeaurora.org>
2018-11-20 11:07:28 +05:30
Sudheer Papothi
a45a56e824 ASoC: wcd-mbhc: Avoid headset jack corrosion due to moisture
Detect moisture in the headset jack and avoid headset jack
corrosion due to presence of moisture over prolonged duration.

Change-Id: I0227e516feb58c96ddf6a8fbc32423bfe7733ca6
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2018-08-16 03:27:20 +05:30
Karthikeyan Mani
3dd07e6937 asoc: mbhc: ignore mbhc event report during ssr
When ssr is in progress, during some race conditions
mbhc events are getting reported when codec is still
coming up. Ignore such events without reporting.

Change-Id: I3d3f78f97c2b855fc36a480f38c166bda2d979f0
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2018-07-02 11:22:40 -07:00
Karthikeyan Mani
8d772b0efb asoc: wcd-mbhc: enable mbhc clk based on L_DET
Enable or disable mbhc clk in sync with L_DET
so that L_DET interrupt is not raised for
false positives for usbc analog.

Change-Id: I69792e8dc82cdc80751f2c1c705f603074cb9a2f
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2018-03-23 10:35:59 -07:00
Phani Kumar Uppalapati
8fe02478b7 asoc: wcd-mbhc: add support for usbc analog audio on msmnile
Add support for usbc analog audio for msmnile platform
by adding fsa driver calls in mbhc driver to make
any switching orientation changes of gnd/mic.

Change-Id: Iab7511907325a24345734402c10a4cf5f8ebfa23
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2018-03-08 12:02:18 -08:00
Sudheer Papothi
8c9bd0f7d0 ASoC: wcd9xxx: Add new callback for headset pull up current
AQT1000 supports different headset detect pull up current source
values in MBHC. Add a callback function to handle new current
source values in MBHC driver.

Change-Id: I060af1aff3fe7c4dfd4aa4c480542efa54c2777c
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2018-02-16 06:20:33 -08:00
Vatsal Bucha
d6d62b8d3c ASoC: wcd: Avoid multiple insertion/removals for aux cable
High impedance aux cable when inserted causes jack to change to
lineout. This causes removal event to be called which results
in pause during music playback because jack value is not updated.
Do not change current plug while plug is marked as lineout.

CRs-Fixed: 2151012
Change-Id: I99797b58c48be00185a352094e32e8623faee491
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2017-12-21 20:30:38 -08:00
Karthikeyan Mani
5392d8052e asoc: codecs: modify gnd mic swap threshold for usb-c analog
To reduce time of usb-c analog headset detection, reduce
gnd mic swap threshold if usb-c is enabled. Use
existing threshold value otherwise.

CRs-Fixed: 2137077
Change-Id: Ic1d1f3a00c9034caaac45f2c80f018546a69ce59
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2017-12-11 21:03:01 -08:00
Laxminath Kasam
8b1366a648 Audio: DLKM support for all audio modules
Switch to DLKM for all audio kernel modules.

Change-Id: I6a96023a21f655f873531af9ace81f2b01eb0f58
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-11-02 13:42:09 +05:30