Commit Graph

1088 Commits

Author SHA1 Message Date
Laxminath Kasam
43fd112a6b asoc: wsa883x: Fix SSR mute on speaker
During SSR/PDR, bring down wsa at down
event and restore after SSR up event.

Change-Id: I9a8d3c109144cb0a911cd7597bffc220b0ce95b7
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-04-06 19:39:09 -07:00
Laxminath Kasam
cc2aada378 asoc: wsa881x-analog: Disable MCLK if clk enabled state
In WSA analog driver, disable MCLK only if clock enabled.

Change-Id: I3a6aa42dc258e3c6ad1ceccdf74f0136338d79b2
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-04-04 10:31:31 -07:00
Laxminath Kasam
b9478f5c55 asoc: bolero: Update dmic clk_div for bolero 2.x
For bolero 2.x, update dmic clk_div to use 1.2M
instead of 600k if non-island usecase.

Change-Id: Ia057283c164de576cfd05f4c64f6db24db589ead
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-04-03 07:27:53 -07:00
Sudheer Papothi
49f16768f6 ASoC: wcd938x: Update hardware sequence for LDOL voltage
Update wcd938x codec hardware sequence for LDOL voltage.

Change-Id: I863c0832277d3d0533cdd97f15d1576c47cc4d1e
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-04-02 23:50:57 -07:00
Vatsal Bucha
271dbe101b ASoC: Remove glitch during amic record
Glitch is coming sometimes during amic record.
Correct sequence to resolve the glitch.

Change-Id: I3c062632229826f6fe32e2f1ea9e07381c21d902
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-04-02 22:28:39 -07:00
Vignesh Kulothungan
3b2c9ef792 ASoC: codecs: remove swr dmic driver ops
Remove soundwire driver ops to avoid deadlock during audio 
sub system restart. 
Handle SWR DMICs enable/disable during usecase.

CRs-Fixed: 2648763
Change-Id: I73cc95ae389da9dee742544f29ceca9d9b7ac9c6
2020-04-02 17:38:04 -07:00
Vatsal Bucha
1111e93af1 ASoC: bolero: Fix higher btn press noise issue
There is higher noise during headset btn press on some
headsets. Change hold time after button release to 600ms
to resolve the noise.

Change-Id: I87e5e13ce39849090da3d3e50ec53e7fd5fdc0e7
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-04-01 17:13:02 -07:00
Vatsal Bucha
ca165320f0 ASoC: bolero: Resolve handset record not resuming after PDR
Handset record does not resume if pdr is performed
during record. Make VA DMIC_CTL registers as volatile
to write proper value of register to hw.

Change-Id: I2cc10d2eab18e3e8126c56caffa126195c02b4e3
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-04-01 13:01:04 -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
Sudheer Papothi
93bc6299f3 ASoC: bolero: check clock source before clock switch
Check soundwire clock source before clock switch to avoid
redundant soundwire device suspend for the same clock source.

Change-Id: I613789b23c171959a60c9a059a30b3f1494f3dfa
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-04-01 11:49:25 -07:00
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
qctecmdr
f34687bd3a Merge "ASoC: wsa-macro: Update smart boost sequence for wsa883x" 2020-04-01 00:19:36 -07:00
qctecmdr
8d117c3794 Merge "bolero: va-macro: add dmic va rate to 1.2M for bolero 2.1" 2020-04-01 00:19:36 -07:00
qctecmdr
1a3887d68f Merge "ASoC: wcd938x: Disable ear path at power down" 2020-04-01 00:19:36 -07:00
Kunlei Zhang
5ef1e54e95 asoc: wcd937x: Fix compile error in wcd937x codec driver
Update function return value to avoid compile error

Change-Id: Ia463ea8bb3c87ac6fb9f5959be0f5a6fa461667d
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
2020-03-31 08:44:30 -07:00
Meng Wang
5aaab79a9f asoc: haptics: update port config to match devicetree
Update port config to match devicetree setting

Change-Id: I094ec86d7f5dca70964315cc1ab258cda086ac7b
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-03-31 20:38:54 +08:00
Laxminath Kasam
df58b0fa9d bolero: va-macro: add dmic va rate to 1.2M for bolero 2.1
In bolero 2.1, VA macro has low power decimations
and support 600k only at 8k/16k. For non-LPI sessions
running at 48k will have mute data if use 600k.
Update driver to use 1.2M for non-LPI sessions.

Change-Id: If495ba8fb780bd22f188835ef87a0ec947df363c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-03-31 03:18:13 -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
Sudheer Papothi
04d31da985 ASoC: bolero: Use TX MCLK for non-island mode usecase
Use TX MCLK for non-island mode usecase.

Change-Id: Iff8f8efd3e83b09e5323abe19aabddb8c4de1964
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-03-30 05:24:58 -07:00
qctecmdr
b8e5bd2fc8 Merge "ASoC: msm: update QUAT/QUIN TDM slot mappings for A2B" 2020-03-30 01:20:37 -07:00
qctecmdr
d658726339 Merge "ASoC: codecs: Add swr dmic as multi codec" 2020-03-30 00:52:48 -07:00
qctecmdr
df0bbed4ca Merge "asoc: codec: Add initial driver for swr-haptics" 2020-03-28 01:33:26 -07:00
Sudheer Papothi
fd6155a232 ASoC: wsa-macro: Update smart boost sequence for wsa883x
Update smart boost sequence for wsa883x speaker amplifier
to reach max voltage at full scale signal.

Change-Id: Ic1a9ce13753d6e573c7916ae99643c85d6892aa0
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-03-28 10:07:33 +05:30
Vignesh Kulothungan
4fd97a1e75 ASoC: codecs: Add swr dmic as multi codec
Add codec backend dai for soundwire dmic's.
Add swr dmic as multi codec

CRs-Fixed: 2600577
Change-Id: I6d6f812d702c1422752e2841bfcad6495e388aad
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-03-26 22:39:19 -07:00
Sudheer Papothi
40f02da69c ASoC: wsa883x: Update initial register sequence
Update initial regsiter sequence for wsa883x speaker
amplifier as per hardware requirements.

Change-Id: I3cd0458980bdc5140ff81b3b8ba6bab42e72fd49
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-03-27 07:16:54 +05:30
Sudheer Papothi
0e19126c1f ASoC: bolero: Add concurrency support on audio capture path
During voice activation and audio capture concurrency usecase,
there is no common reference count for DMIC clock enablement,
results into mute when one usecase tears down. Change enables
a common reference count in bolero codec driver between voice
activation usecase and audio capture usecase to avoid mute
during VA and audio capture concurrency.

Change-Id: I424c941178d7e9ff91288a50ba27605b2b9d3abe
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Akhil Karuturi <akarutur@codeaurora.org>
2020-03-26 18:45:23 -07:00
qctecmdr
68c0eb8da2 Merge "ASoC: wcd938x: Add support for ADC modes" 2020-03-26 07:59:56 -07:00
Vignesh Kulothungan
9ffe8f6f21 ASoC: codecs: wsa883x: add codec dai for each wsa883x
Add new codec dai for each wsa883x, since each WSA is
initialized as a codec and not as aux device.

Change-Id: I023c14faffcd1c1149531040ceae9ed1fe161385
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-03-25 17:18:53 -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
qctecmdr
53e8920027 Merge "asoc: codecs: Add system sleep ops for macro drivers" 2020-03-25 09:38:23 -07:00
qctecmdr
ffdc1a1bd9 Merge "asoc: codecs: Avoid MBHC OverCurrentProtection." 2020-03-25 09:38:23 -07:00
qctecmdr
c4322eb5b7 Merge "asoc: bolero: Avoid reg access if audio hw vote fails" 2020-03-25 09:38:23 -07:00
qctecmdr
9164299ac9 Merge "asoc: wsa881x-analog: Update boost preset based on 8810/15" 2020-03-25 09:38:22 -07:00
qctecmdr
1487993fd0 Merge "asoc: codecs: Support for TX HPF cut off frequency snd ctrl" 2020-03-25 09:38:22 -07:00
qctecmdr
0ddcc23e3b Merge "ASoC: bolero: Update regmap to configure tx path" 2020-03-25 09:38:22 -07:00
qctecmdr
9fd5ec3cb5 Merge "ASoC: lahaina: Update soundwire configuration for audio capture" 2020-03-25 09:38:22 -07:00
qctecmdr
b56fbda271 Merge "ASoC: wsa883x: Fix size for register access" 2020-03-25 09:38:22 -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
Sudheer Papothi
b9e111aab5 ASoC: bolero: Update regmap to configure tx path
Update regmap table with proper read write registers to
enable tx paths in a three mic usecase.

Change-Id: Iab53e3a92f02ddc282e621b8063f3c051fe658f6
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-03-24 09:30:34 -07:00
Aditya Bavanari
9120845177 asoc: codecs: Add support for rouleur codec
Add support for rouleur codec driver and pm2250
spmi driver.

Change-Id: Ie56f7af012c0c7b6e68077463f43050e051a3ef9
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-03-24 00:48:23 -07:00
Shalini Manjunatha
2191529cac asoc: codecs: Support for TX HPF cut off frequency snd ctrl
Adding changes for Bolero codec snd controls structure
to support TX HPF cut off frequency setting

Change-Id: Ia601d7b4bc6d80ff584b5bf6df47663080b2aa6f
Signed-off-by: Shalini Manjunatha <shalma@codeaurora.org>
2020-03-24 00:46:41 -07:00
Laxminath Kasam
6ac07f666d asoc: bolero: Avoid reg access if audio hw vote fails
Check audio hw vote before register access.

Change-Id: I2753f6abd912910285f586bf95c71e3c99dfe60a
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-03-24 00:41:45 -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
Laxminath Kasam
4e53fb69af asoc: wsa881x-analog: Update boost preset based on 8810/15
Update boost level setting of value 5.5v and 6v
for 8815 and 8810 variants.

Change-Id: I6e71c58bddb4958f1eda4ab4d4630bcb6073dcdb
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-03-24 00:28:22 -07:00
Aditya Bavanari
e2f52ea5c0 asoc: codecs: Add system sleep ops for macro drivers
Add system sleep ops and invoke force runtime suspend for all
the macro drivers in bolero in order to synchronize
system suspend and runtime suspend callbacks.
Use freezable delayed work queues instead of normal
delayed workqueues in order to avoid contention with
pm suspend callflow.

Change-Id: Ibb0d35ad80c09e7f2a7032b4daef53c359056dfd
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-03-23 20:44:38 -07:00
Sudheer Papothi
18b86a5360 ASoC: swr-dmic: Update audio capture sequence
Update audio capture sequence to avoid multiple bank switches
during multi mic usecase that helps in reducing the latency
for path setup.

Change-Id: Idac8bca97b3503cdbf82bb482e8a297a1fd20893
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-03-24 05:04:11 +05:30
qctecmdr
5b6a8859e3 Merge "SoC: wsa883x: Remove from soundwire group during teardown" 2020-03-22 22:24:07 -07:00
Fenglin Wu
074c5fe49c asoc: codec: Add initial driver for swr-haptics
The haptics module in some PMICs has SWR slave data port which connects
to Bolero SWR RX port and it can receive PCM data from that port and use
it as the pattern source to play the vibration. Add the driver to
support it.

Change-Id: I5e6811ac8d81a60c3cd226029ef22ee12ed46f1d
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2020-03-20 15:34:33 +08:00
Sudheer Papothi
9fcf966dc8 ASoC: wsa883x: Fix size for register access
Fix size for soundwire slave register dump in debug mode.

Change-Id: I9d2e4a394943cdb0ba2e5ec5208c96b76b0a1292
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-03-20 02:00:23 +05:30
Meng Wang
fe623c6314 asoc: bolero: add channel map for AIF6_PB
Add channel map for AIF6_PB.

Change-Id: If17835b84c17406aaffdc9d06a00348acb0fe18e
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-03-19 15:15:23 +08:00