When AFE returns failure in setting the digital codec
core clock during PDR, it leads to LPASS register access
which results in NOC error and AHB timeout. Put the regmap
in cache only mode during clock set failure to fix this.
Change-Id: I221bf02f32b1dae19a02435220dec8a85f5dd998
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
Add support to parse static cps configuration from dt.
Add support to send cps configuration for speaker protection
usecases.
Change-Id: I0166a378f24cedef07393bdbb8618df944c62984
Signed-off-by: Faiz Nabi Kuchay <fkuchay@codeaurora.org>
Allow regcache sync during clock enable to make sure the registers
are in proper state before the usecase.
Change-Id: I8a9214e460c7f77759d1956e0e7e2d6b2f5b3d3a
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Add a function in wsa883x which returns the sound wire
device number for a given wsa883x codec slave instance.
Change-Id: Ie3d0e309870f488b1643a853bcddcf93314d94b5
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
Add change to address the race condition between
pointer dereference and memory deallocation.
Change-Id: Ia1ed47986ec81d3dc2feb3bc874847fadddac292
Signed-off-by: Saurav Kumar <sauravk@codeaurora.org>
Check for fifo availability before writing slave registers
during swrm master bulk write so as to prevent swr
overflow, underflow errors.
Change-Id: I97a914cac289b3f1215ccf5c1abec88b959a9f21
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Move the enable and disable of wakeup capability of
swr_tx gpios to clock setup to disable or enable it
in all required usecases.
Change-Id: I9fb76926d8520c382e7f19777190357c50f98994
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
SWR overflow, underflow interrupts are seen sometimes on bootup.
Check whether devnum is 0 during fifo read and write. Also assign
read and write fifo depth before master init to resolve errors.
Change-Id: Id7b687985e320396d2f9dab69db56cc7f5426b04
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
During SSR up event handler, if soundwire state is
already up or auto suspend jiffies is not completed,
ensure put in suspend/SSR state.
Change-Id: I853f42d125eb5a60e3f1f065a60516877e3a463c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Add change to properly handle the pointers by setting them to
NULL after free and adding some null checks before dereferencing.
Change-Id: I3e52b9a6885a8d8a91c09f75fe92ba69e3eb555f
Signed-off-by: Saurav Kumar <sauravk@codeaurora.org>
tinycap test can attempt with different size to
read from driver and need to avoid access more
than period size.
Change-Id: Ifa4ddfb086bd83aa981da62e88da3a9395f5aabc
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Ensure soundwire clock re-setup always for SWR AMIC usecase
startup and at end of usecase.
Change-Id: Ie0e94a456c8e5e529a2a7435ded094483e369f01
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Currently ASoC core creates a static route b/w
playback/capture widgets of cpu and codec dai
if they are part of the same dai-link. However
this will cause codec path to get powered up first
followed by the backend dai start during device
switch use-case where the front-end is not closed,
leading to audio playback failure if either bit-width
or sample rate is different. Set the dynamic bit of
backend dai dailink to update the backend parameters
before codec path setup.
Signed-off-by: Shashi Kant Maurya <smaury@codeaurora.org>
Change-Id: I71c3eb662091f78b419850bce962cfc2c041804a
Race condition is observed during ADSP SSR
when LPI pinctrl receives the SERVICE DOWN
event and lpi gpio read or write is executed.
Synchronize these functions using lock.
Change-Id: Ie80c41e260b4b572c1c3ede8a2a58a3a0332fe7d
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
Enable the wcd-spi driver on SDM660.
Added config to set DMA_MASK on SDM660.
Change-Id: Ic8aaa0728a43936cd4c6e1ed590e01ba8f0fbf5b
Signed-off-by: Shashi Kant Maurya <smaury@codeaurora.org>
Wcd-spi multi read fails in umapping the dma memory(swiotlb_bounce).
Memory is not allocating from CMA reserve which leading the failure.
So forcing the driver to allocate memory from CMA by initializing the
device’s coherent_dma_mask & dma_mask.
Change-Id: I7c0dba83789ed3c18c336e564a9f06397af9f0e8
Signed-off-by: Shashi Kant Maurya <smaury@codeaurora.org>
Add new audio_clk entry div_clk1 to register
pmic clock for wcd9335 on sdm660.
Change-Id: I113c02e14e33aa7ea506e641ff540db72dc96214
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
In platform driver volume controls, add null check for
pcm pointer of struct snd_pcm_volume.
Change-Id: I511a79422eaeced6240849cbb665a289afdc5984
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
Update widget order for widgets VA_MCLK and VA_SWR_PWR.
As both are having widget supply priority -1, sometimes
dapm is triggering both widget callbacks simultaneously
causing race condition in handling the SWR clock release
with proper request for VA_CLK instead of TX_CLK and
next usecase powerup is impacted.
Change-Id: I3d3a3fadcdb897287ad070dc9e81e354c6f970b0
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Add param header size to the actual parameter size
based on the instance id support.
Change-Id: I8937e71254265dbc9faf00b9cfc7c40c88f4388a
Signed-off-by: Sujin Panicker <spanic@codeaurora.org>
During PDR, in dynamic load module if attempted
before all module state ready on AVS it may fail.
Add AVS state check before send load module cmd.
Change-Id: I70a5a5b11f5661042d704222759608179ba9d47c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Race condition observed while processing the
set_pp_params command responses sent back to back
by adsp for commands sent from adm and rtac.
Handle this by synchronising the get/set pp_params
command in both the drivers.
Change-Id: Id89d98217dc5cad3703e5d545ddee21cb145c874
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>