Commit Graph

87 Commits

Author SHA1 Message Date
Vatsal Bucha
71e95c67ea ASoC: wcd938x: Fix headset detection during SSR/PDR
Headset is corrected as lineout during SSR/PDR. This is
because adc voltage is not measured correctly due to SSR state.
Enable flag deinit_in_progress during SSR down to check if
device is not reported and disable it after device up.

Change-Id: I6fc4fff4149c36ba16aa668a960505504a5d811f
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-04-01 09:54:12 -07:00
Vatsal Bucha
d789e57132 ASoC: wcd938x: Disable ear path at power down
Ear Path is not disabled properly disabled at power down.
Disable clk and other registers depending on whether ear
takes aux or hph path at pwd.

Change-Id: I987904ddd9bf21b9ed96e754e6eb2514b4d277ce
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-03-30 15:05:51 -07:00
qctecmdr
d658726339 Merge "ASoC: codecs: Add swr dmic as multi codec" 2020-03-30 00:52:48 -07:00
Vignesh Kulothungan
6cdec19289 ASoC: codecs: wcd938x: add codec dai for wcd938x
Add new codec dai for wcd938x, since WCD is
no longer initialized as an aux device but as a codec.

Change-Id: I1cb60ef3ef71692970011ef6c3b50cf9cd64b7ca
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-03-25 17:18:39 -07:00
Sudheer Papothi
e45a49d0cb ASoC: wcd938x: Add support for ADC modes
Different ADC modes need different clock rate. Update clock rate
based on the ADC mode.

Change-Id: Idaeda95a15e99038927de115727ece897bba7c29
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-03-25 05:50:00 +05:30
qctecmdr
5ae37e64b5 Merge "ASoC: wcd938x: Add micbias control API for SWR DMICs" 2020-02-22 05:19:19 -08:00
qctecmdr
e96e387122 Merge "asoc: codecs: wcd938x: bypass filter while enabling PA" 2020-02-19 02:25:21 -08:00
Sudheer Papothi
c8231cf9e5 ASoC: wcd938x: Add micbias control API for SWR DMICs
Add micbias control API to enable SWR DMICs on lahaina target.

Change-Id: I48152971e1af8dedc98ada20e4e808cf18720869
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-02-18 10:56:54 +05:30
Sudheer Papothi
b2d648baf0 ASoC: wcd938x: Update soundwire master channel type
Update soundwire master channel type properly before sending to
soundwire master.

Change-Id: I459c6e8d1cc688c3e6e5a0369e095f0b12fbb7c6
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-02-07 14:35:00 +05:30
Meng Wang
c760477cb9 asoc: codecs: wcd938x: bypass filter while enabling PA
While enabling headphone PA, bypass preref filter
to resolve clipping issue in the first second.

Change-Id: I7524fe3215bac267c5e199c715931712e16adf88
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2020-02-07 15:47:55 +08:00
Ramlal Karra
3e2c37d273 asoc: codecs: Add unified SWR Tx mapping support
Add dynamic port enablement for wcd938x and
wcd937x targets to support unified swr tx port
mapping added as part of SWR 1.6 updates.

Change-Id: If0cf823dc51028fd5bd95f5a49ffe05998526be6
Signed-off-by: Ramlal Karra <rkarra@codeaurora.org>
2020-02-05 09:56:57 -08:00
Karthikeyan Mani
a5a7ba3b43 asoc: codecs: wcd938x: Add widget to enable micbias standalone
Add widgets to enable mic bias standlaone without
dependency on any use case.

Change-Id: I1f61cd9403d3f83baa199f9c669680d9c7b5c371
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2020-01-28 21:51:29 -08:00
Linux Build Service Account
c6e429778b Merge "ASoC: codec: Change micbias widgets to supply widgets" into audio-drivers.lnx.5.0 2019-12-31 15:26:06 -08:00
Meng Wang
4a03bd5171 asoc: update snd info api
Update snd info API and userspace and get codec info.

Change-Id: Ic9cfc89365cf6263a9b1c02403d68e7740bebbeb
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-12-27 11:15:55 -08:00
Sudheer Papothi
2732740dd2 ASoC: codec: Change micbias widgets to supply widgets
Upstream kernel deprecated micbias widgets. So, replace micbias
widgets with supply widgets.

Change-Id: Ie7d369d887c85f85ee477877425516caae4d7e33
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-12-25 14:50:54 +08:00
Laxminath Kasam
9a37b81cd4 asoc: wcd938x: Fix swr get logical addr fail during SSR
During SSR, sometimes swr get logical addr fails.
Add sufficient delay after reset and retry logic
for get logical addr.

Change-Id: I2a932e99896e0055f3b35f9b251008612f43b79f
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-11-20 19:18:50 +05:30
qctecmdr
0064cf4db8 Merge "ASoC: wcd938x: Disable ADC mode for tx at power down after record" 2019-10-30 10:24:20 -07:00
Vatsal Bucha
a267a11e94 ASoC: wcd938x: Disable ADC mode for tx at power down after record
ADC mode for tx 0,1,2,3 is not disabled at power down after record
causing noise during next headset record. Disable ADC mode
to resolve noise.

Change-Id: I0a98b06318b55cfce20c6a90fecd71d83dce28c5
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-10-18 12:44:44 +05:30
Vatsal Bucha
d06525fa68 ASoC: Fix audio distortion issue during headset record
Audio is distorted during first 3 secs on headset record
while doing device switch from dmic to headset mic.
Disable BCS before slow insertion detection and enable it
afterwards to resolve the issue.

Change-Id: Ie5bc4b5292e5f69066760cab44d78989a74f13f4
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-10-15 05:07:51 -07:00
qctecmdr
73d4531d52 Merge "asoc: codecs: wcd938x: Add support for setting ear gain ctl" 2019-10-15 01:12:28 -07:00
qctecmdr
d9328bec09 Merge "asoc: codecs: wcd938x: Fix HPHL mute when ear path teardown" 2019-10-12 08:57:06 -07:00
Vatsal Bucha
135b9f0b0c asoc: codecs: wcd938x: Add support for setting ear gain ctl
Add support for setting EAR PA gain directly using
mixer control.

Change-Id: I3667d8f26dc648e44d12c42be0940210763e08d5
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-10-03 22:00:16 -07:00
Karthikeyan Mani
7af16b8364 asoc: codecs: wcd938x: check for device up before writes
During SSR, codec device will be down and wait till
receiving up notification before doing any register
reads or writes.

Change-Id: I0e2967990bfc9d0d780d4c7e666a4c31159e70ce
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-09-24 14:45:00 -07:00
Sudheer Papothi
92bf3feadb ASoC: wcd938x: Update wcd938x initialization sequence
Update wcd938x codec initialization sequence as per hardware
requirement.

Change-Id: I17989e3f159d106eb9de6b1b8f660a647962539c
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-09-20 00:47:15 +05:30
Laxminath Kasam
e25b02a5e1 asoc: codecs: wcd938x: Fix HPHL mute when ear path teardown
Update mute for RX chain related to AUX (INT2) when
tearing down ear path driven by AUX.

Change-Id: I0ab2630bb681e8dc800c99245b1cd68120290c2b
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-09-19 18:43:59 +05:30
qctecmdr
ae58e9ee01 Merge "asoc: codecs: wcd938x: Enable EAR over INT2 chain" 2019-09-18 04:01:17 -07:00
Sudheer Papothi
504064bad0 ASoC: wcd938x: Update soundwire slave clock rate on WCD938x
Update soundwire slave clock rate based on power mode on
WCD938x codec for better power numbers.

Change-Id: I6719d7eab7562bf4fe45b3e11fbae6e0a629f9b1
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-09-13 16:19:33 -07:00
qctecmdr
ca34d4602c Merge "ASoC: wcd938x: Update mibias configuration on WCD938x" 2019-09-06 11:04:49 -07:00
Laxminath Kasam
8ebb07308a asoc: codecs: wcd938x: Enable EAR over INT2 chain
INT2 chain drives AUX output to WCD.
EAR DAC on WCD can take input from HPHL/AUX chains.
Add register sequence updates to support EAR DAC
over AUX chain path also based on mixer setting.

Change-Id: I71db6c02f4579e3beba2816c1cfa5a492d91d702
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-09-06 14:59:46 +05:30
Vignesh Kulothungan
c001b153fc ASoC: wcd938x: add support to retrieve codec variant
Machine driver requires a mechanism to know the codec variant
to limit supported configurations respective to that codec.
Add a function to return the wcd938x codec variant.

CRs-Fixed: 2488322
Change-Id: I16631cccb3abd32c933389e110e5b5a6b762a0e2
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2019-08-15 10:05:14 -07:00
Sudheer Papothi
88c75963a4 ASoC: wcd938x: Update mibias configuration on WCD938x
Apply micbias configuration from device tree for WCD938x for
Kona target.

Change-Id: I45a47eb54f9fffb88259ba7e69633e3d3ebcb6a4
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-08-15 15:07:42 +05:30
qctecmdr
5803bf11fe Merge "ASoC: wcd938x: Fix micbias droop on WCD938x codec" 2019-08-11 03:24:33 -07:00
qctecmdr
221d06644d Merge "asoc: codecs: wcd938x: cleanup TX recording sequence" 2019-08-04 12:09:10 -07:00
qctecmdr
76880681c6 Merge "asoc: codecs: wcd938x: remove delays in headphone power down" 2019-08-02 07:05:15 -07:00
qctecmdr
b7c31cad77 Merge "asoc: codecs: enable bcs port for headset record" 2019-08-02 06:47:40 -07:00
qctecmdr
7ec93a3c52 Merge "ASoC: wcd937x: Fix spurious interrupts for wcd937x" 2019-07-31 03:36:11 -07:00
Karthikeyan Mani
3edeac1477 asoc: codecs: wcd938x: cleanup TX recording sequence
Cleanup TX ADC recording path sequence to remove any
legacy register writes which is not required anymore.

Change-Id: I204280b1631b11fc275f765a2454bda4cec01b18
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-07-30 13:55:36 -07:00
Sudheer Papothi
d76c274099 ASoC: wcd938x: Fix micbias droop on WCD938x codec
Fix micbias droop on WCD938x codec.

Change-Id: I8df99dea118750134570c372fc153db9873f8827
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-07-30 05:19:46 +05:30
qctecmdr
699d1898ea Merge "asoc: codecs: Update dmic2 support on WCD938x" 2019-07-29 04:02:17 -07:00
qctecmdr
0cfdafffb5 Merge "ASoC: wcd938x: Enable LDOH in headphone path" 2019-07-29 02:28:35 -07:00
Karthikeyan Mani
8269fcd509 asoc: codecs: wcd938x: remove delays in headphone power down
Delays in headphone power down path can be removed
and without any click and pop issues. This way it
reduces headphone power down time.

Change-Id: Iedfbbee7d2be27cc5dfc62c9def72e7be81d7eaf
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-07-26 15:40:31 -07:00
Karthikeyan Mani
ec3bb4045c asoc: codecs: enable bcs port for headset record
Enable button click suppression port to send mbhc
events over the port to reduce glitches caused
by button events or plug removal events on the
record path.

Change-Id: I3f913ab1287f06afe6b5fc95da626f7c78ab448f
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-07-25 10:46:25 -07:00
qctecmdr
2bb74b807e Merge "asoc: codecs: wcd938x: Remove hifi modes for wcd9380" 2019-07-24 00:38:14 -07:00
Vatsal Bucha
875812d385 ASoC: wcd937x: Fix spurious interrupts for wcd937x
Enabling watchdog interrupt during bind causes spurious
interrupts. Disable interrupts during bind and enable
during path setup to fix this. Also enable and
disable interrupt for ear pa for wcd938x.

Change-Id: I4a9526d7b0a63f5325cec6dfe7a4e302ae76fc40
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-07-23 11:42:10 +05:30
qctecmdr
e2c5fe33f5 Merge "ASoC: wcd938x: Disable hph OCP on traverso" 2019-07-20 00:25:05 -07:00
Laxminath Kasam
d3f16750c4 asoc: codecs: Update dmic2 support on WCD938x
As DMIC2 is muxed on same channel with MBHC
on soundwire port3 of WCD938x codec, need to set
selection bit for DMIC2 during recording usecase
over it.

Change-Id: Ice9b92eb964af25e47db4b3d8d25db07a82a9bf2
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-07-18 13:47:45 +05:30
qctecmdr
ee224a0ef4 Merge "asoc: codecs: Add variant entry support for wcd937x and wcd938x" 2019-07-17 05:28:03 -07:00
Sudheer Papothi
d5338db59a ASoC: wcd938x: Enable LDOH in headphone path
Add support to enable LDOH in headphone path when equalizer
hardware installed on the device.

Change-Id: Ia575544650e5d03404fc77e3c2a9db729a2997a5
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-07-13 13:03:05 +05:30
Vatsal Bucha
aecce31ce8 ASoC: wcd938x: Disable hph OCP on traverso
OCP is resulting in mute issues during audio playback.
Traverso has surge protection enabled in hw. Thus
OCP can be disabled for traverso.

Change-Id: I5af745e9c1fb41640317a406adff59bcde81c37e
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-07-10 15:36:09 +05:30
Aditya Bavanari
d37e02049c asoc: codecs: Add variant entry support for wcd937x and wcd938x
Add variant entry support for wcd937x and wcd938x codecs to
differentiate between wcd9370/80 and wcd9375/85 variants.

Change-Id: Ife20d14462a0b0968e0458471af3823872592e10
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-07-08 18:34:57 +05:30