Commit Graph

49 Commits

Author SHA1 Message Date
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
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
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
5257151bb6 Merge "asoc: codecs: Change TX tuning and reduce RX click and pop" 2019-07-04 05:54:56 -07: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
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
qctecmdr
a74c6e2c7c Merge "ASoC: wcd938x: Update DMIC enable sequence on WCD938x" 2019-06-21 03:37:08 -07:00
qctecmdr
48671babab Merge "asoc: wcd938x: Enable watchdog interrupt" 2019-06-17 20:27:58 -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
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
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
Meng Wang
efbe46a1c5 asoc: wcd938x: reinit registers after SSR
Reinit wcd registers after SSR.

Change-Id: I5a8f22e4f76ffd8b279d1513eaa2f50973e3408c
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-05-29 11:07:33 +08:00
qctecmdr
34b7d3b2fd Merge "ASoC: hide bind/unbind in sysfs" 2019-05-21 20:33:23 -07:00
Xiaojun Sang
53cd13a1ab ASoC: hide bind/unbind in sysfs
Exposure of driver bind/unbind to userspace via sysfs may
lead to unexpected behavior.
Hide bind and unbind by driver attribute.

Change-Id: I20d6ee653bcc16af15d6368664aaf240c6645cd0
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2019-05-17 15:00:33 +08:00
Karthikeyan Mani
c3d8c9f2c3 asoc: codecs: wcd938x: 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: I11c8ac6b0abc7ba04b6750c59405794bc768dc42
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-05-15 15:22:28 -07:00
Karthikeyan Mani
09d510c699 asoc: codecs: wcd938x: Add boundary checks before accessing array
Add null checks before pointer access and array boundary
checks in tx mode function.

Change-Id: I8c8b086b4aed4185b1d1aee68cc9e7c42da6ae27
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-05-01 16:45:49 -07:00
David Ng
4025a25a24 makefile: kona: remove make export <all variables> instances
Replace all kernel make export <all variables> instances with
export of specific variables.  Depending on existing build
environment, exporting all as environment variables and
interaction with existing environment variable expansions
can lead to undefined behavior.

TODO:  This change is restricted to kona flow to narrow impact.
All remaining export <all variables> need to be evaluated and
fixed similarly via subsequent changes.

Change-Id: I9114b88f7511d1b3f9b496b76fb6da9db97772b8
Signed-off-by: David Ng <dave@codeaurora.org>
2019-04-26 23:44:02 -07:00
Vatsal Bucha
d284ff1e0c Audio: Add lito target for audio-kernel
Add lito target for audio-kernel modules.

Change-Id: Ic8b43df74504950e4baad9701abeddcf8f30b420
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-04-19 11:14:56 -07:00
qctecmdr
d980ab306c Merge "ASoC: wcd938x: Add support for wcd938x codec variants" 2019-04-14 23:20:39 -07:00
Sudheer Papothi
bb650fc65c ASoC: wcd938x: Add support for wcd938x codec variants
Add support for wcd938x codec variants. Changes detect the
variant and enable the corresponding features supported by
the codec variant.

Change-Id: Ib990465b42b903174391bb87115af47431b862ec
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-04-10 05:09:56 +05:30
Vignesh Kulothungan
864f843779 asoc: codecs: add null check before access
Add null check before accessing wcd938x private data.

Change-Id: Ia2226202deccccbd07e6c0d501daaded2b7e72d8
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2019-04-09 10:30:35 -07:00
qctecmdr
4b17acc4cf Merge "asoc: wcd938x: stop mbhc during ssr down" 2019-04-06 23:14:37 -07:00
qctecmdr
b4c9798b90 Merge "ASoC: wcd938x: Update routing for HDR recording" 2019-04-05 03:46:09 -07:00
Karthikeyan Mani
05588601ac asoc: wcd938x: Add default cases for port mapping
Return error in case of wrong path being selected
for port mapping and port params functions.

Change-Id: I5d66a9cd32e9c8e6d8ebac0ea073b1a1762407b6
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-04-03 12:24:11 -07:00
Meng Wang
281bd20437 asoc: wcd938x: stop mbhc during ssr down
Stop mbhc operations during ssr down to cancel
any pending detection sequences.

Change-Id: Iff054cf8b3099959a1be561bd937057258f57b81
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-04-02 08:44:38 +08:00
Laxminath Kasam
f16ed2f6c2 asoc: wcd938x: Disable EN_CUR_DET bit for receiver noise
Disable EN_CUR_DET to fix receiver noise as per hardware
specifications recommendation.

Change-Id: Ib1ea1eecc3e0f2ffeeb5f41c344e51c903cd2300
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-03-20 08:26:12 +08:00
Sudheer Papothi
3557d14ce8 ASoC: wcd938x: Update routing for HDR recording
Update audio routings for HDR recording on WCD938x codec
for AMIC1 and AMIC5 paths.

Change-Id: I67b93fe11c7a5b16ffd4bb8b58431be9dfba615e
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-03-13 14:05:19 -07:00
Sudheer Papothi
d6c61bd617 ASoC: wcd938x: Clear tx hold hpf after device path setup
During capture path setup, tx path hpf is set to hold.
Clear tx path hpf hold after device path setup.

Change-Id: I3299fc5d84d6e86e23c9ef150c8770ef9d59a870
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-02-23 07:36:18 +05:30
Linux Build Service Account
914aaa0a41 Merge "asoc: codecs: wcd938x: remove on demand vdd buck" 2019-02-17 00:21:51 -08:00
Linux Build Service Account
1aeded0dd7 Merge "asoc: codecs: wcd938x: disable pm runtime" 2019-02-17 00:21:50 -08:00
Linux Build Service Account
32754ec645 Merge "asoc: codecs: wcd938x: match slave property to dt" 2019-02-17 00:21:47 -08:00
Linux Build Service Account
6f50644357 Merge "asoc: codecs: wcd938x: enable micbias for capture" 2019-02-17 00:21:46 -08:00
Karthikeyan Mani
c0a8adf365 asoc: codecs: wcd938x: disable pm runtime
Soundwire master receives the pm runtime calls, so slave
does not need to enable pm runtime.

Change-Id: I3e09b9d1eee9bbfbe525fbf375bf938600f30064
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-02-15 17:31:57 -08:00
Karthikeyan Mani
92fccbfd8f asoc: codecs: wcd938x: update tx mode setting
Change tx mode setting from dapm widget to kcontrol
as it is not needed in codec route and only needed
for updating mode value.

Change-Id: I5d66b9a82b541b97f5c5789fe2e49d329c6952a8
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-02-15 17:24:49 -08:00
Karthikeyan Mani
09b5461237 asoc: codecs: wcd938x: remove on demand vdd buck
All codec supplies are treated as static supplies
and do not require on demand supply.

Change-Id: Idf54f65cc6089675e21a52ea49cdf46eae98f295
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-02-15 11:03:54 -08:00
Karthikeyan Mani
fbdcab9e8d asoc: codecs: wcd938x: enable micbias for capture
Micbias needs tx bias clock bit to be enabled.

Change-Id: I6a73d05eb9363c3dce267f6730c44b0442387365
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-02-14 00:35:17 -08:00
Karthikeyan Mani
c61592adb3 asoc: codecs: wcd938x: match slave property to dt
Match the rx/tx slave node property to that of in dt
to add slave components.

Change-Id: Id990dc0c85691c4af8b8adb7f9de26063559b7b8
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-02-07 14:58:50 -08:00
Karthikeyan Mani
996c1bff0e ASoC: codecs: qcrg update for HPH and TX channel paths
Add updates to HPH rdac gain control registers and
tx channel register writes.

Change-Id: I6c32f0f4ee049404c1648104c5e624eaee3a5817
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-01-24 11:28:38 -08:00
Karthikeyan Mani
a27b0c32ea ASoC: codecs: qcrg update for TX paths
Add qcrg updates for AMIC and DMIC register updates
and modes.

Change-Id: I7401b21cfffd2c40f456d985e2b3ea1988f4ba6c
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-01-16 11:19:33 -08:00
Meng Wang
64e8c2b2af asoc: wcd938x: update wcd938x driver
Update wcd938x driver to fix compile error.

Change-Id: Ifc939a46d7e09852b147289dd9e69d2f56a67751
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-17 18:55:51 +08:00
Sudheer Papothi
d1c3e9b51e ASoC: wcd938x: Add support for codec wakeup
Add an API to wakeup codec from sleep.

Change-Id: I90de653947f794cbc4a47a91bd5f22251440ef75
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2018-12-11 18:12:20 -08:00
Sudheer Papothi
4d31c00084 asoc: wcd938x: Move APIs from internal header file
Move APIs from internal header file for access to other
audio modules.

Change-Id: Ib34d052e4beb63c6805abacc3c99dbff18c9af6c
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2018-12-11 18:11:53 -08:00
Sudheer Papothi
c9443c282a ASoC: wcd938x: Add support for wcd938x codec
WCD938x codec is a soundwire based codec that supports AMICs, DMICs,
Headphones, Ear and Aux paths. Add support to enable all device
paths of wcd938x codec.

Change-Id: I81b5e603ef73afba74b8d2274012752f9ca5cb6f
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2018-12-12 07:34:26 +05:30