Commit Graph

85 Commits

Author SHA1 Message Date
Prasad Kumpatla
a07613afcd soc: Add ratelimit to supress the pr_err/dev_err.
Add ratelimit to supress the logs flooding at the
time of SSR.In all places defined ratelimit as,
in 1sec one debug msg prints.

Change-Id: I6dfe140848e5cecb1b311c432f8311cdf0615a58
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
2020-10-07 10:21:42 +05:30
qctecmdr
6a4d66fb84 Merge "asoc: bolero: switch clk to VA_CLK for LPI SVA" 2020-09-18 10:44:38 -07:00
Vatsal Bucha
625753df87 ASoC: codec: Change name for enum defined for callback between wcd and bolero
Add enum names defined for callback between wcd and bolero in
separate file and include that file in order to have same enum
across wcd and bolero.

Change-Id: I808c2ad3de37655c1ba2b8e096def60703ced7f2
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-09-09 20:26:36 -07:00
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
Laxminath Kasam
1cd5f3fe0b asoc: bolero: Update bolero version 2.0 entry
For get version info of bolero, update
bolero 2.0 entry.

Change-Id: I8f21b67eb6532c9b1c1ef6ab15015a29a4737db3
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-08-27 22:27:31 -07:00
qctecmdr
8a4d49de4c Merge "ASoC: rouleur: Update hph registers based on foundry id" 2020-07-28 22:40:06 -07:00
Vatsal Bucha
ef642d3e2a ASoC: rouleur: Update hph registers based on foundry id
Rouleur has different hph settings for different foundry
id. Read foundry id and update hph settings so as to
provide same settings to end user.

Change-Id: I114047226462ab95e0c93271c3d6099f15af2343
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-07-24 13:53:52 +05:30
qctecmdr
1d2d2a7f9b Merge "soc: wsa883x: Update the PDM_WD at startup/teardown" 2020-07-24 00:05:32 -07:00
Vatsal Bucha
48029da3fe ASoC: rouleur: Change hph and ear gain according to soc capacity
Register to power supply framework to get soc capacity.
Reduce ear and hph gain for reduced voltage to optimize
power consumption. Also set LD22 voltage to lower value
for low SoC.

Change-Id: I94de9341b8c7307128d3cd41c7398c31d57fa685
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-07-21 19:33:24 -07:00
qctecmdr
d36eef9148 Merge "asoc: bolero: Ensure va-macro is registered before other macros" 2020-07-14 06:11:20 -07:00
Laxminath Kasam
d8d90b4afa soc: wsa: Fix adie loopback test
In ADIE loopback, need PA enable to
avoid mute. Ensure PA enable post slave
path setup and FS clock.

Change-Id: I4df9d7b919325b50f237f31338859e1b5b34b2eb
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-07-10 18:02:56 +05:30
Laxminath Kasam
b9ff5ac5b0 asoc: bolero: Ensure va-macro is registered before other macros
As va-macro has fs_clk gen, ensure va-macro
is registered before other macros.

Change-Id: I8283dc11817caf0c208fe231132951a7a79b7d51
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-07-08 19:51:47 +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
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
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
Aditya Bavanari
bbf44eeba1 asoc: codecs: Update muxsel registers only when clock counts are not stale
During SSR/PDR use cases, core clock count in different
macros becomes stale and muxsel registers are accessed
leading to NOC errors. Update muxsel registers only after
clock counts are reset after SSR/PDR recovery.

Change-Id: I656f8e7ddc8a92a325c2ba644f1a945cbafb08a0
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-05-21 04:02:29 -07: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
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
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
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
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
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
265ff04ddc ASoC: bolero: Add support for bolero v2.0 hardware
Add support for bolero v2.0 hardware functionality.

Change-Id: I5dca1666b92d6e8de0adae8a11cab0fbca61ab6d
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-01-29 11:54:30 -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
qctecmdr
edc7d1364c Merge "asoc: codecs: register notifier for all bolero codec variants" 2019-11-20 07:07:21 -08:00
qctecmdr
c0692e7848 Merge "asoc: codecs: bolero: Do not process ssr disable if already down" 2019-11-20 06:48:53 -08:00
qctecmdr
344bca82e3 Merge "asoc: bolero: Add va/tx macro registers for bolero 2.1" 2019-11-14 20:10:27 -08:00
Laxminath Kasam
fbd95edd79 asoc: bolero: Add va/tx macro registers for bolero 2.1
Update VA/TX macro registers for bolero 2.1

Change-Id: I6be9632407c85a36bc746c65b34a52812548ad2a
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-11-12 12:32:37 +05:30
Surendar Karka
c9431f1111 asoc: codecs: register notifier for all bolero codec variants
Playback on speaker is getting mute due to notifier not getting
registered. Register notifier for all  bolero codecs
variants to enable WSA PA.

Change-Id: Id13a533af7096f50de2e1a654393c579a81af953
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
2019-11-06 12:55:12 +05:30
Karthikeyan Mani
91850713f5 asoc: codecs: bolero: Do not process ssr disable if already down
If codec receives ssr disable notification when
already in disabled state do not have to process it.
This makes sure codec register access are not done when
not necessary.

Change-Id: Iafc2b03d7c707c46c69ca995d36119929c34c222
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-11-04 15:32:39 -08:00
Laxminath Kasam
1a58793f4a asoc: codecs: CSR access requires AHB clock from bolero 1.1
From bolero 1.1, Bolero and SWR CSR moving to AHB clock
and no need to enable other macro RCG clocks.

Change-Id: I6663196a88dbf07868d6426bdda98f33e42004d1
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-11-01 13:02:12 +05:30
qctecmdr
16ded023c7 Merge "asoc: bolero: Update version query for bolero 2.1" 2019-10-30 10:33:11 -07:00
qctecmdr
80870fbc90 Merge "ASoC: Fix audio distortion issue during headset record" 2019-10-25 05:37:28 -07:00
Laxminath Kasam
f1623021b1 asoc: bolero: Update version query for bolero 2.1
Expose API from bolero driver to retrieve version
info by macro drivers. Update bolero driver to
get version from dtsi.

Change-Id: Idc3735721de90ee4f74319537b17a530d3c125a6
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-10-22 15:20:01 +05:30
qctecmdr
1543085859 Merge "asoc: codecs: Vote for codec core and NPL clocks before regcache_sync" 2019-10-18 08:29:51 -07:00
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
f4ad6ff187 Merge "asoc: codecs: bolero: audio HM voting only supported on bengal" 2019-10-15 00:47:21 -07:00
Aditya Bavanari
cfc65e8257 asoc: codecs: Vote for codec core and NPL clocks before regcache_sync
Vote for codec core and NPL clocks before regcache_sync
to avoid unclocked access of bolero registers.
Unvote once the regcache sync is done.

Change-Id: Iae45f487113c55318f33cd1950e2d6b64bcd945a
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-10-11 20:11:10 +05:30
Aditya Bavanari
d577af909c asoc: codecs: Check for core votes count before accessing registers
Check for core votes count before accessing swrm registers
to avoid NOC errors.

Change-Id: I5689d6a6db0886ed4cc791738a28290f3d953412
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-10-10 20:29:49 +05:30
Laxminath Kasam
069df14aa0 asoc: codecs: Fix pop issue on WSA cold start
Observe pop if FS clock is turned on at end of
powerup sequence. Ensure WSA PA is turned on
after FS clock to avoid pop.

Change-Id: Ic1214d361e77db252b7a90a89fc99c69f51e270b
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-09-19 11:37:00 +05:30
Laxminath Kasam
6b01d100ee asoc: codecs: bolero: audio HM voting only supported on bengal
On bengal target, audio HM voting is only applicable.
Update bolero driver to make audio HM vote if audio core handle
is not present.

Change-Id: I9abaf42c04aa8f1b89d9c08e628ab142ce99151a
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-08-27 15:14:25 +05:30
Sudheer Papothi
06a4c648f0 ASoC: Add support for event listener from the codec
During low power island mode, register to event listener
to process soundwire inband interrupts from the soundwire
master driver.

Change-Id: Ib15f5ec59ea19010dbb8f9744de76bfc2ca7eebb
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-08-08 05:22:11 +05:30
qctecmdr
aae17991cb Merge "ASoC: bolero: tx-macro: Fix clock sequence for headset SVA" 2019-07-29 02:39:50 -07:00
Sudheer Papothi
6cc7f52a6d ASoC: bolero: tx-macro: Fix clock sequence for headset SVA
Fix soundwire clock sequence for headset SVA usecase to avoid
tx clock voting during low power SVA usecase.

Change-Id: I9613eee6a0b66560fa1108b4887af71507d345e7
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-07-25 00:00:18 +05:30