Commit Graph

120 Commits

Author SHA1 Message Date
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
Laxminath Kasam
4651dcbbb0 asoc: codecs: Update VA/TX controls based on bolero version
Update route map, dapm widgets, snd controls for VA and
TX macros based on bolero version.

Change-Id: I6f517f2c243624d44601192295c50838c7ee0e05
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-10-22 15:21:25 +05:30
Karthikeyan Mani
144659b943 asoc: codecs: bolero: toggle zero gate for first hpf update
Instead of disabling hpf zero gate in hpf callback,
disable it while setting the inital cut off frequency
itself to not have any glitches.

Change-Id: I932aa0b2d68c2e8afd5cddd3d5fe17cbc98a5afb
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-10-08 15:34:01 -07:00
Karthikeyan Mani
0eef9ab635 asoc: codec: bolero: keep internal track of TX votes
TX clock is needed for setting up or tearing down
VA path. while voting and unvoting for TX clock,
keep track of the votes to unvote only if it was
voted from VA widgets.

Change-Id: Ia013517ed8d932ed3a5242bb7d052c1ee314fdbe
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-09-20 13:12:40 -07:00
qctecmdr
b42b242127 Merge "ASoC: Add support for event listener from the codec" 2019-09-17 00:55:50 -07:00
Aditya Bavanari
50ef13eca6 asoc: codecs: Fix LPI TLMM GPIO invalid access issue
Runtime suspend gets called multiple times during SSR
scenarios leading to clock count mismatch. Add logic
to prevent this in all macros and pinctrl lpi driver.

Change-Id: I380631c1db8cd7d94a8909affd8c96c87f24817c
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-08-09 15:14:43 +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
bb4341f383 Merge "asoc: codecs: Update on support for WCD938x DMICs" 2019-07-29 03:57:10 -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
Laxminath Kasam
549d11d4fe asoc: codecs: Update on support for WCD938x DMICs
WCD938x codec can support upto 8 DMICs.
Fix driver to enable support for these DMICs
over soundwire.

Change-Id: I82b9c7c6f56271c03acee3a966dbaa4fefb62102
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-07-18 13:44:17 +05:30
qctecmdr
42ebbffad4 Merge "asoc: bolero: check if clock is enabled before accessing register" 2019-07-06 08:49:47 -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
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
Meng Wang
8ef0cc2ed4 asoc: bolero: reset all clks after SSR/PDR
After SSR/PDR, the lpass clocks will be in off state. Force restart
clocks after SSR/PDR, if enabled before SSR/PDR, to reenable the clocks.

Change-Id: I3d850d92bdc6324aa7a64a83a9066f388a85c7f7
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-06-06 08:45:19 +08:00
Sudheer Papothi
ba445bfe2d ASoC: codecs: Add support for LPASS Audio HW vote
Add support for LPASS Audio HW vote needed for low power AMIC
VA usecase.

Change-Id: If6642d418dbf2cc9773fbd0ec0fe35c30afac140
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-05-31 10:37:27 +05:30
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
Sudheer Papothi
55789b7239 ASoC: bolero: va-macro: Fix clock sequence during path enable
Fix mismatch in TX clock count during three mic VA usecase.

Change-Id: I5f86fc8bf4f379e14ed8e15376f918b622bc221f
Signed-off-by: Sudheer Papothi <spapothi@quicinc.com>
2019-04-20 01:01:49 +05:30
Sudheer Papothi
e826ba5129 ASoC: bolero: Enable TX clock during VA path setup
Enable TX clock during VA path setup for SVA usecase to make
sure LPASS audio is in active state.

Change-Id: Ic835905e48919e3c97ab2b82b43b90a146f4f32e
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-04-07 22:42:25 -07:00
Vidyakumar Athota
5d45f4c865 asoc: codecs: bolero: add clk resource manager driver
Add Bolero clock resource manager driver to handle/manage
bolero clocks for all the concurrency usecases like record
+ voice activation.

Change-Id: I970a05d96fc9060b44bfe670d465f0b9d72cc53b
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2019-04-05 08:00:03 -07:00
qctecmdr
7e7016f0a8 Merge "asoc: codecs: bolero: Reduce hpf corner freq delay to 50ms" 2019-04-03 23:09:58 -07:00
Mangesh Kunchamwar
3d4eec47ef asoc: codecs: bolero: Reduce hpf corner freq delay to 50ms
Reduce hpf corner freq delay from 300ms to 50ms
to avoid initial mute in recorded audio.

Change-Id: Ibd6e7d60f836e866d73899d3f691c0e8070a3527
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-03-25 10:44:21 +05:30
Sudheer Papothi
828b3114fe ASoC: bolero: va-macro: Fix ioremap in va macro probe
Update va-macro ioremap offset properly during probe.

Change-Id: I3c4b1d6ba24b7935c3ba047059f72ed06bdafe4f
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-03-19 03:04:57 +05:30
Sudheer Papothi
ff649f9d73 ASoC: bolero: Enable clock Fs generation in bolero codec
Clock Fs generation registers are in always on domain but
is needed for all the playback and capture usecases. Enable
clock Fs generation in the boloero codec after the clock
enablement.

Change-Id: I3a9cf14660f871b26ec96ef8b3e245ba5dadeb78
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-02-05 23:56:32 +05:30
Xiaoyu Ye
2122732534 asoc: bolero: enable VA macro island mode MUX select on Kona
VA macro is currently lacking capability to dynamically select
island mode on Kona. Add support in VA macro driver to read MUX
selection register from DT to enable dynamic island mode select.

Change-Id: I5462265fffcc6d6bbb3ff6eead5f44f0b8909141
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2019-01-29 15:46:55 -08:00
Linux Build Service Account
7d3f5b34d5 Merge "asoc: codecs: Increase timeout for session close during SSR/PDR" 2019-01-08 05:32:12 -08:00
Xiaoyu Ye
5efecda1cb asoc: bolero: add support to enable VA macro BE DAI on Kona
VA HW macro supports three BE DAIs on Kona. Add support to
enable the third one.

Change-Id: I418a6a0bb1bcbc06fe71de0977d974432e1d6c22
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2019-01-02 17:30:13 -08:00
Aditya Bavanari
ce4f3d9b59 asoc: codecs: Increase timeout for session close during SSR/PDR
Userspace takes 10 seconds to close the session when
pcm_start fails due to concurrency with PDR/SSR.
Match the SSR timeout in va macro to user space
session tear down delay.

Change-Id: I1e0fb4bdb25a43cbe7c345a47c115410b964e6eb
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-01-02 18:10:43 +08:00
Xiaoyu Ye
ccdb91522a asoc: bolero: add support to enable VA MCLK MUX select on Kona
VA macro is currently lacking capability to dynamically select
MCLK on Kona. Add support in VA macro driver to read MUX select
property from DT to enable dynamic MCLK MUX select.

Change-Id: I46d0b760119a2d8c2ed754ae9cb43ba717fa300b
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2018-12-18 17:46:23 -08:00
Meng Wang
43bbb87652 asoc: Update file header to GPL-2.0-only
Update file header to GPL-2.0-only.

Change-Id: Ic1542a3209a5fe73c937a5b36491ede4a451936d
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-10 14:49:34 +08:00
Meng Wang
15c825d077 ASoC: codec: Update codec driver to component driver
Some alsa API are removed in kernel-4.19 which would cause
codec driver compile failure. Update codec driver to fix it.

Change-Id: Ie358ec1863082166958059c179300b453d2a03ad
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-08 03:15:55 -08:00