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>
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>
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>
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>
For bolero 2.1 with SWR_TX in va macro, update SVA fixes.
Change-Id: I250df0fe476bc2c0439ab491a17dea2e7ac18707
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
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>
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>
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>
Glitch is coming sometimes during amic record.
Correct sequence to resolve the glitch.
Change-Id: I3c062632229826f6fe32e2f1ea9e07381c21d902
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>