Commit Graph

99 Commits

Author SHA1 Message Date
Meng Wang
dfa3df69ae asoc: bolero: update logic for va clk switch on bolero 2.1
On bolero 2.1, SVA switch is not retain at VA_CLK
when switch between handset and headset mic sva.
Update the clock release logic during swr power event.

Change-Id: I62b492dcbff4b4f3249d1a6b3b792690b5b5c27c
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-10-07 22:53:24 +05:30
Vatsal Bucha
ffd65896dd ASoC: bolero: Make tx swr gpio as wakeup capable
Do not register afe event listener for shima and make
tx swr gpio as wakeup capable.

Change-Id: I4d805c2b65e6c424c1c215431caa75f6181a16e8
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-09-29 14:29:49 +05:30
Meng Wang
5de0472da9 asoc: bolero: switch clk to VA_CLK for LPI SVA
When switching TX_CLK to VA_CLK, there could be some
IRQ missing with current design. Switch the clk in bolero
to avoid the corner case.

Change-Id: Iec5cac16e026e4e46646894c546f1acb3fce4fa8
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-09-09 16:34:16 +08:00
Meng Wang
ea56a753a8 Revert "Revert "ASoC: bolero: check clock source before clock switch""
This reverts commit 68cbba47d0 as this
causes AMIC SVA issue.

Change-Id: I0e66c97dfc9499c30942ce2e3a123be58833eac8
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-09-01 10:24:46 +08:00
Vatsal Bucha
01274e5268 ASoC: va-macro: Do not register for event listener for shima
As shima has hw conn to get inband interrupt while lpi enabled,
there is no need to register for event listener via afe.
Skip register for event listener for shima.

Change-Id: Ib15ae005a6920d0b2a584a86e896880bda21052e
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-07-20 04:17:13 +05:30
Sudheer Papothi
68cbba47d0 Revert "ASoC: bolero: check clock source before clock switch"
This reverts commit 93bc6299f3 and
6cc7f52a6d.

Change-Id: I614b650d6e071b9d1867988ebc88246b9fdc8f91
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-07-08 03:39:55 +05:30
Laxminath Kasam
034cd15ba8 Revert "soc: mstr-ctrl: Retain Audio_HM voting until suspend"
This reverts commit d02c7efb35.
and commit 61f235e5bd to avoid AOP
related issues.

Change-Id: I0b8b44bc5cca6bef6bc18c228f08a9c585c79c1c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-06-22 09:40:14 +05:30
Laxminath Kasam
d02c7efb35 soc: mstr-ctrl: Retain Audio_HM voting until suspend
Restore change to retain audio_hm voting and
ensure AOP hang issue not seen by masking interrupt
wakeup of swr pinctrl pins.

Change-Id: I51bf36d6d6b0999abf10a4bc94cce900d1adf1d5
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-06-08 16:24:54 +05:30
Laxminath Kasam
61f235e5bd asoc: bolero: Register for AFE event for all SVA usecases
For island SVA usecase, ensure register for
AFE in-band interrupt.

Change-Id: I24e6dfadfaa38919114000fb09a7906264020cd9
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-06-08 16:23:50 +05:30
qctecmdr
3938234bc8 Merge "asoc: codec: Add pre ssr up event for all macros" 2020-06-01 10:27:01 -07:00
qctecmdr
ebc5c9c0d3 Merge "audio-kernel: Synchronize hw vote and unvote requests" 2020-06-01 10:27:00 -07:00
Prasad Kumpatla
515fc228ee asoc: codec: Add pre ssr up event for all macros
Add a pre ssr up event in all macros ,where GFMUX reset
to done before set the dev_up flag to true.

Change-Id: I77229ccd0ed68aac841146a89fe7f76961260aea
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
2020-05-26 15:15:51 +05:30
Meng Wang
30fad2dc20 asoc: codec: update SOC_SINGLE_SX_TLV to SOC_SINGLE_S8_TLV
Update SOC_SINGLE_SX_TLV to SOC_SINGLE_S8_TLV to make codec
driver compatiable with upstream driver.

Change-Id: I4061b015d715978f3b294ad630f53b64bf66c2b7
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-05-19 08:34:39 +08:00
Aditya Bavanari
31aa875405 audio-kernel: Synchronize hw vote and unvote requests
HW vote and unvote is currently called from multiple
clients leading to synchronization issues
during SSR/PDR scenarios. Synchronize all the vote requests
by using digital codec resource manager.

Change-Id: I7e63f69ab5d761a3bb4c7ce70bbef2e8bfd76cfb
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-05-18 09:04:25 -07:00
qctecmdr
a7e2d0d2b4 Merge "asoc: bolero: Fix AMIC TX pop on bolero 2.1" 2020-05-10 05:35:13 -07:00
Laxminath Kasam
942fe13e42 asoc: bolero: Fix AMIC TX pop on bolero 2.1
For bolero 2.1, amic connect on any SWR input.
Update API to check amic usecase.

Change-Id: Iced7df39b0dbaf83e77a72536e55223d3bda2289
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-04-29 23:26:34 -07:00
Prasad Kumpatla
a804ab121b asoc: Fix port collision interrupt in WSA
During multiple PDR usecases, due to sync issues
port collision interrupt is observed.
set wsa state to device down  before cancelling the ocp
workqueue and bail out from the workqueue when wsa state
is set to device down.

Change-Id: Ibefb338c1d6d2901b8773928fa2c0c48b51ac6f7
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
2020-04-29 23:25:56 -07:00
qctecmdr
42292dc0cd Merge "asoc: codecs: Update va_macro fix for SVA for bolero 2.1" 2020-04-29 22:27:54 -07:00
Aditya Bavanari
236ff485d2 codecs: Enable clock voting logs to debug AHB/NOC issues
Enable clock voting logs to debug stability issues.

Change-Id: Ie1f995ab004778a81ea42baad15ea36858407e9a
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-04-20 10:17:02 -07:00
Laxminath Kasam
e0eb71e186 asoc: codecs: Update va_macro fix for SVA for bolero 2.1
For bolero 2.1 with SWR_TX in va macro, update SVA fixes.

Change-Id: I250df0fe476bc2c0439ab491a17dea2e7ac18707
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-04-16 23:44:58 -07:00
Linux Build Service Account
65af65b19d Merge "asoc: bolero: Update fs_clk gen for va macro" into audio-drivers.lnx.5.0 2020-04-16 01:07:52 -07:00
Vatsal Bucha
e76174a384 va-macro: Add autosuspend after pm_runtime_get_sync
If va_macro_tx_va_mclk_enable returns error,
va macro autosuspend will not be called.
Add autosuspend before return.

Change-Id: Iea3728fab2d240514ca4a7e02ef535edce977ee8
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-04-09 03:59:28 -07:00
Laxminath Kasam
9daf376ebb asoc: bolero: Update fs_clk gen for va macro
Enable and disable FS_CLK gen at every
mclk enable and disable call to handle
fs_clk gen count.

Change-Id: I87e1cf112a48029cf0d6e7227fcc5167e973fdad
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-04-09 03:57:10 -07:00
qctecmdr
e076f26b13 Merge "asoc: bolero: Update dmic clk_div for bolero 2.x" 2020-04-08 21:02:09 -07:00
qctecmdr
79a655928a Merge "ASoC: Remove glitch during amic record" 2020-04-08 21:02:08 -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
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
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
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
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
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
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
53e8920027 Merge "asoc: codecs: Add system sleep ops for macro drivers" 2020-03-25 09:38:23 -07:00
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
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
Vignesh Kulothungan
5a5e32093f ASoC: codecs: enable swr dmic for va
Enable soundwire dmic's for VA macro.

Change-Id: Ie88ad57f1906ea81363cffd2ae5904f0a5de7bdc
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-02-27 23:05:26 -08:00
qctecmdr
d6db8c1cfc Merge "ASoC: bolero: Update TX HPF sequence for AMIC" 2020-02-17 02:58:03 -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
Sudheer Papothi
4d1a9042f2 ASoC: bolero: Update TX HPF sequence for AMIC
Update TX HPF sequence for AMIC to avoid pop during
audio capture.

Change-Id: Ib70fc5cd05f67c97977db96487294bfe14f554ad
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-02-04 18:42:23 -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
qctecmdr
070e06c2eb Merge "asoc: codecs: bolero: add delay after toggling hpf gate" 2019-12-08 21:58:46 -08:00
Meng Wang
4ff8084a36 asoc: bolero: add mixer control for LPI enable flag
Add mixer control for LPI enable flag. The listener
should only be registered for LPI SVA session.

Change-Id: I01e4b0868e3333e1fc60f86444b1cf1c77e25cb7
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-12-05 11:16:51 +08:00
Laxminath Kasam
4696fffa8c asoc: Audio bringup changes for bengal
Update change for audio playback and record to work
on bengal target with wcd937x codec.

Change-Id: I2f781e2132b018995f30f4192efd08732196cd28
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-11-27 17:32:41 +05:30
Karthikeyan Mani
9366ce6e8b asoc: codecs: bolero: add delay after toggling hpf gate
Add delay after toggling hpf gate to reduce noise
levels while starting recording use case.

Change-Id: I1a7b1b0a339abb3642ca8420753e9d07023acf89
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-11-25 14:47:30 -08:00
Harshal Ahire
021f8805a1 asoc: codecs: update VA_MACRO core voting
Update entry for core voting in VA_MACRO.

Change-Id: Iecc1035e04b9cd0f69e33e93643294ba879da63b
Signed-off-by: Harshal Ahire <hahire@codeaurora.org>
2019-11-24 17:46:30 +05:30
qctecmdr
8b3980d174 Merge "asoc: codecs: bolero: suspend swr at VA use case switch" 2019-11-01 21:30:24 -07:00
qctecmdr
521c66c14c Merge "asoc: codecs: bolero: toggle zero gate for first hpf update" 2019-11-01 21:30:24 -07:00
Karthikeyan Mani
9810a5cc92 asoc: codecs: bolero: suspend swr at VA use case switch
While switching from a VA use case, suspend the soundwire
immediately so that if the next use case switches clock
soundwire will also be reset.

Change-Id: I18b65a01bc02329e9a53de93c0ccfb621c95a1f4
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-10-24 11:00:40 -07:00
Laxminath Kasam
2e13d64340 asoc: bolero: Update SWR TX moved to AO region
In bengal target, SWR TX moved to AO region.
Update SWR TX as child of VA macro and handle
respective SWR register/clock sequences from
VA macro.

Change-Id: I6b632ce56a885f2ccc8516840b0e5d270fe0b2c0
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-10-22 15:29:58 +05:30