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>
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>
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>
Soundwire DMICs provide the same quality as regular DMICs but
the interface is soundwire. This reduces the number of pins
on the MSM. Enable soundwire DMICs on lahaina.
Change-Id: I4245369fdcb29cf96f315ebc1d2e9a83a0fbc14b
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
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>
Update TX HPF sequence for AMIC to avoid pop during
audio capture.
Change-Id: Ib70fc5cd05f67c97977db96487294bfe14f554ad
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
When enabling SVA, tx_mclk_users is not increased. If starting
and stopping recording after enabling SVA, tx_mclk will be closed
when powering down tx mclk widget. Increase tx_mclk_users when
enabling VA_MCLK to avoid mismatch.
Change-Id: I02d9400cf7309464bbba1e6749cfcfcf99f5876a
Signed-off-by: Meng Wang <mengw@codeaurora.org>
TX_SWR_CLK widget is not needed for bolero 2.1.
Update it to retain for bolero 2.0.
Change-Id: I2b38fb807460ca31d1e968e0eb69a24ce46a531e
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
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>
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>
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>
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>
Audio mute is observed if record is started as soon as headset
is inserted. This is because hold time after button release is set
as 800ms causing the delay. Change hold time to 200ms to fix this issue.
Change-Id: I98028fca3412a3d47ad8e5154f25ff1726426955
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
soundwire tx data gpio is wakeup source capable. Disable the
interrupt capable during voice activation usecase to let the
device enter into power collapse during voice activation usecase
on headset.
Change-Id: I64a0b5da249dd3da37310fb80909a0ac5fefae54
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Update init registers for tx and rx paths in an array.
Change-Id: I2738af7639ffec05b5c93e86a2a3f4cf7ccb36fe
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Add callback to vote for core votes that the
soundwire master can use while doing a clock request.
Check for pinctrl function errors and in case of any
failures return from clock enable with an error.
Change-Id: Ic5c200d7179a1e3a9695955d8711358cd7618bd1
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
If soundwire gpio is not used, then no need to return
error if not able to get gpio data.
Change-Id: I97705b49d3b01f99b7a4e91190a15ffb211d32f2
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Add enum mixer control to support changing
adc mode bits for different power modes in
recording use case.
Change-Id: I9a0287b7b32285d39e65f98b5518dedd3a24af94
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
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>
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>
Increase hpf corner cut off frequency call back time
to sustain 150Hz cut off for a longer time to avoid
DC noise coming to the decimators during a record
session.
Change-Id: I5aa4f4c38a5dfd84655995217fdfc1708713c178
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Enable bcs block for recording use cases to
reduce glitches caused by button events or
plug removal events on the record path.
Change-Id: I7a8556178a196c03009cdc487aff5424d5e1787a
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
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>
Add a dai to get capture data which can be used for
headphones equalizer purpose.
Change-Id: Idc29faa54810be8cb2564c5c771c59ccf981a458
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
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>
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>