Commit Graph

652 Commits

Author SHA1 Message Date
qctecmdr
f51997600c Merge "asoc: codecs: wcd937x: Read and store mic bias value" 2019-07-17 05:29:51 -07:00
qctecmdr
ee224a0ef4 Merge "asoc: codecs: Add variant entry support for wcd937x and wcd938x" 2019-07-17 05:28:03 -07:00
qctecmdr
f9edb75340 Merge "asoc: wcd938x: Reset mbhc detection type after ssr" 2019-07-17 05:25:50 -07:00
qctecmdr
89924096d7 Merge "asoc: codecs: wcd938x: add support for micbias pull up mode" 2019-07-12 02:34:44 -07:00
Vatsal Bucha
1d965295d4 asoc: wcd938x: Reset mbhc detection type after ssr
During headset playback if we trigger SSR, headset removal
is not detected. This is because after recovery mbhc
driver expects a new detection event as the driver is reinitialized.
Reset detection type to insertion to retrigger a hw interrupt
for mbhc driver.

Change-Id: Ibf6663f46e7485f5ff5c5968a71c88e59a4728e7
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-07-09 16:40:18 +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
Vatsal Bucha
75fbc2d27d asoc: codecs: wcd937x: Read and store mic bias value
Mic bias value is needed in case of special headset
detection logic and the same needs to be read and stored
from device tree to be used by mbhc driver.

Change-Id: I0b120b8bb130a4d101c97e118395a11e74c921af
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-07-08 11:59:50 +05:30
qctecmdr
42ebbffad4 Merge "asoc: bolero: check if clock is enabled before accessing register" 2019-07-06 08:49:47 -07:00
qctecmdr
330f03de80 Merge "asoc: bolero: force bolero runtime suspend during adsp ssr" 2019-07-06 08:48:33 -07:00
Xiaoyu Ye
d974cf93b1 asoc: codecs: wcd938x: add support for micbias pull up mode
Add support to use micbias pull up mode for SVA DMIC use
cases to lower power consumption.

Change-Id: I5d87b604bb3e588ffec0ae321a55d340c89274fc
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2019-07-05 14:17:27 -07:00
qctecmdr
95514749d7 Merge "audio-driver: Update build files for auto LA-GVM" 2019-07-04 05:56:46 -07:00
qctecmdr
5257151bb6 Merge "asoc: codecs: Change TX tuning and reduce RX click and pop" 2019-07-04 05:54:56 -07:00
qctecmdr
9de103a363 Merge "asoc: codecs: bolero: add compander soft reset event" 2019-07-04 04:49:36 -07:00
Meng Wang
bf1fe8fbad asoc: bolero: force bolero runtime suspend during adsp ssr
During adsp SSR, bolero runtime suspend is not called and
hw vote clks are not reset. Force bolero runtime suspend
during adsp SSR to avoid kernel panic.

Change-Id: Iff5983ef07f77ecc7f3f344948c013906b4bad60
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-07-02 08:26:55 +08:00
qctecmdr
0983e24039 Merge "ASoC: mbhc: Fix left channel getting disabled in hs_rem_irq" 2019-06-28 22:58:55 -07:00
qctecmdr
11c8cce88b Merge "asoc: codecs: Fix NULL pointer dereference in wcd9xxx slim probe" 2019-06-28 22:45:29 -07:00
qctecmdr
aa41b233f8 Merge "asoc: codecs: Fix out of bounds access in register show functions" 2019-06-28 22:43:42 -07:00
Meng Wang
bd93024823 asoc: bolero: check if clock is enabled before accessing register
Reset GFMUX reg for va-macro and wsa-macro when adsp is up
after SSR. And check if clock is enabled before accessing
register to avoid kernel panic.

Change-Id: Idce9695be552cab0e8e389cf72eeb7a67a754bf9
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-06-28 08:38:15 +08:00
Karthikeyan Mani
b9d7807f4e asoc: codecs: Change TX tuning and reduce RX click and pop
Update TX requantizer gain coefficients to center
gain errors around zero. To reduce click and pop
on audio playback enable reference buffers of
headphone path in hifi mode and then put it to
the usecase specific power mode.

Change-Id: I0013d6258d5e5a8c92fd0f951d1d89e5906b2faf
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-06-27 17:01:46 -07:00
Timothy Sham
4a6979f60e audio-driver: Update build files for auto LA-GVM
enable conditional build for audio driver modules for
automotive LA GVM.

Change-Id: I058f3e6ca557f8ca6d02e33e80f6c190b1a2a29e
Signed-off-by: Timothy Sham <tsham@codeaurora.org>
2019-06-25 13:11:38 -07:00
qctecmdr
5a2bcfb472 Merge "audio-driver: Update build files for LA automotive" 2019-06-25 07:38:18 -07:00
qctecmdr
9d2c763b36 Merge "asoc: wcd938x: wakeup device during headset detection" 2019-06-22 11:15:10 -07:00
qctecmdr
c8c7d94214 Merge "ASoC: bolero: tx-macro: Update VA macro clock sequence" 2019-06-22 11:15:10 -07:00
Sudheer Papothi
6a9cb8b6bd asoc: wcd938x: wakeup device during headset detection
Use soundwire device wakeup API to wakeup soundwire master
during headset plug detection.

Change-Id: Icddd558df382146bb2989926d2e92e627b5a844f
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-06-21 21:29:49 -07:00
Karthikeyan Mani
c14c27a7c6 asoc: codecs: bolero: add compander soft reset event
Add compander soft reset event that can be requested
from a slave codec to reset at power down to reduce
click and pop noise.

Change-Id: I2f6ff182e258e02979166b0e76b6a1d439b1cf87
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-06-21 14:14:47 -07:00
Aditya Bavanari
8aacfcf7ab asoc: codecs: Fix out of bounds access in register show functions
In register show functions, when snprintf returns a negative value
out of bounds access occurs while copying the data to user.
Add return value check on snprintf before copy_to_user
to fix this.

Change-Id: I1eb793721c653bf6d1fbd10f4cea3436ffe6f519
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-06-21 17:25:16 +05:30
qctecmdr
a74c6e2c7c Merge "ASoC: wcd938x: Update DMIC enable sequence on WCD938x" 2019-06-21 03:37:08 -07:00
qctecmdr
644ead80f7 Merge "ASoC: bolero: Remove unused audio map routings in bolero" 2019-06-21 03:33:04 -07:00
Aditya Bavanari
9584db3c2d asoc: codecs: Fix NULL pointer dereference in wcd9xxx slim probe
When slim device is NULL or pdata allocation fails in wcd9xxx
slim probe, devm_kfree uses slim device leading to a NULL pointer
dereference. Fix this by returning from probe in these scenarios.

Change-Id: I232661d8ba0320469bc4486e7dd82713e9b53d73
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-06-21 13:06:19 +05:30
Sudheer Papothi
296867b416 ASoC: bolero: tx-macro: Update VA macro clock sequence
Update VA macro clock sequence for headset detection during
voice activation usecase to avoid soundwire bus clash interrupts.

Change-Id: Ic004d43aef9c8a9003b3028c122e6fb6a06fa58d
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-06-21 08:25:29 +05:30
Cong Tang
1fa4e0449c audio-driver: Update build files for LA automotive
enable conditional build for audio driver modules for LA
automotive.

Change-Id: Ifb18ea6f8af531a99e29904c2245424657b42df7
Signed-off-by: Cong Tang <congt@codeaurora.org>
2019-06-20 13:50:31 -07:00
qctecmdr
1dffa77438 Merge "asoc: bolero: reset all clks after SSR/PDR" 2019-06-17 21:04:15 -07:00
qctecmdr
2214928d9f Merge "asoc: bolero: remove extra semi-colon to avoid compile error" 2019-06-17 20:33:06 -07:00
qctecmdr
48671babab Merge "asoc: wcd938x: Enable watchdog interrupt" 2019-06-17 20:27:58 -07:00
qctecmdr
45b4733d63 Merge "asoc: codecs: defer probe if soundwire pin is not ready" 2019-06-17 20:25:32 -07:00
qctecmdr
6f4c0d9e6d Merge "ASoC: codecs: update for AUX, ear and HPH paths" 2019-06-17 20:22:42 -07:00
qctecmdr
e97d41b653 Merge "asoc: codecs: wcd938x: Fix volatile register function" 2019-06-17 20:18:18 -07:00
qctecmdr
2251014fc6 Merge "asoc: codecs: Add support for class ab low power modes" 2019-06-17 20:16:35 -07:00
qctecmdr
57c8619aed Merge "asoc: codecs: add support to disable soundwire devices" 2019-06-17 20:11:54 -07:00
Karthikeyan Mani
326536d1d6 asoc: codecs: defer probe if soundwire pin is not ready
Defer codec macro probes if soundwire pins are not
ready to be accessed yet during boot up.

Change-Id: I20173e49043a076d73cdbb811863afbff87d4a3b
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-06-11 17:48:35 -07:00
Karthikeyan Mani
3dd19d0b73 asoc: wcd938x: initialize micb lock mutex
Micb lock which is used to synchronize micbias
control api is not initialized causing spin lock
errors. Initialize the mutex to avoid the issue.

Change-Id: I98c50fec8e8531333de643a85433d3e5973bfd14
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-06-11 17:48:14 -07:00
Karthikeyan Mani
9e013b2d5a asoc: codecs: wcd938x: Fix volatile register function
Fix the volatile register function to return false
if the registers are not volatile so that the reads
will happen from cache and this improves read timing.

Change-Id: I73149be3855be09a71ad61a6f3143038a7ba029b
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-06-11 17:48:04 -07:00
Karthikeyan Mani
17bea6ec6f asoc: wcd938x: Enable watchdog interrupt
Handle PDM watchdog interrupt. Enable watchdog
before analog PA is enabled and disable it
after analog PA is disabled so as to prevent false alarms.

Change-Id: Id45dee1a150c471d1bb29b9bfed9f416b8454a5f
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-06-11 17:47:42 -07:00
Karthikeyan Mani
31231c306d ASoC: codecs: update for AUX, ear and HPH paths
Add updates to AUX control registers and headphone
and ear path power mode registers.

Change-Id: I7a6b0f23a28a6ab9189c946a78a2f376937d7509
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-06-11 17:47:27 -07:00
Karthikeyan Mani
7f609a3ca0 asoc: codecs: Add support for class ab low power modes
Add codec enable and disable sequences for class ab
low power modes.

Change-Id: If5b54075985c2d4d1a24423c03e78bee119862bc
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-06-11 17:47:21 -07:00
Vatsal Bucha
a8f9dc90d8 ASoC: mbhc: Fix left channel getting disabled in hs_rem_irq
In wcd_mbhc_adc_hs_rem_irq when hph_on bit is set
both left and right channel should get enabled. But we
enable left channel first, disable left ch and enable right channel.
Fix this to enable both left and right channel.

Change-Id: Ia50c55a0ed68e01359ef0a9c76eba6901a04e17c
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-06-10 23:23:43 -07:00
Meng Wang
8db822a261 asoc: bolero: remove extra semi-colon to avoid compile error
Remove extra semi-colon from wsa_macro_set_spkr_gain_offset to
avoid compile error when wsa-macro is disabled.

Change-Id: Ic94e78822639d70a365c714ad7dd0b2091de8179
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-06-11 10:46:48 +08:00
Karthikeyan Mani
3bd80a59b2 asoc: codecs: add support to disable soundwire devices
Add changes to support disabling of soundwire devices
so that soundwire pins can be freed for other purposes
if needed.

Change-Id: Iae14d43c2c3d5380347be4c3b443c209b2612a97
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-06-10 17:14:36 -07:00
Sudheer Papothi
776bf8e63e ASoC: wcd938x: Update DMIC enable sequence on WCD938x
Update DMIC enable sequence on WCD938x codec to support
audio capture on WCD DMICs.

Change-Id: I432bbc3a89ad6cbf968fa6474b9bbeb4924e2791
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-06-11 04:32:21 +05:30
Sudheer Papothi
324b495656 ASoC: bolero: Remove unused audio map routings in bolero
Remove unused audio map routing from bolero codec to avoid
index mismatch for mic path enablement.

Change-Id: I09365f54ac5906df9568c78db902000a2dd790eb
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-06-11 04:18:39 +05:30