When multi wsas are connected to wsa-macro and some registers
are written to wsa, swr broadcast mode is used. When closing
one wsa, it will also send the register write to the other wsa
and it should not get updated. The other wsa will be in bad
state.
Remove broadcast for wsa-macro to resolve this issue.
Change-Id: I4c788a213fdcd217861703a13d44c096fd9b632d
Signed-off-by: Meng Wang <mengw@codeaurora.org>
During adsp SSR, after adsp is down, lpass_cdc_runtime_resume
is called in va-marco and fails. lpass_cdc_runtime_suspend is
not called 100ms later. After adsp is up and va-macro considers
lpass_cdc is resumed and not setting clk which causes wcd not
detected. Call runtime_suspend when vote fails to resolve
the issue.
Change-Id: Ice398d0168c5c67f6c98e3122af507ca74837175
Signed-off-by: Meng Wang <mengw@codeaurora.org>
cooling of WSA/WSA2 is to reduce the digital gain.
the cooling callback should only be called when the WSA pointer
has not been initialized.
Also the adjusted volume of RX0 and RX1 need to be set separately.
Change-Id: I6aac0e7a3a3219e8b5c24d711a6c7773824827e9
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
the dapm_mclk_enable flag has not been set back to false
when the actual mclk is disabled.
Change-Id: Ic04756b3dcd074887dd1e93f23cf31873abc1428
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
When WCD AMIC is used and connected to SWR master port3,
DMIC clk div is updated by mistake. Update logic to update
DMIC clk DIV with new flag.
Change-Id: Iee01acf97f925ec54c8d189c13e63acca7ffc2f4
Signed-off-by: Meng Wang <mengw@codeaurora.org>
The digital gain will be adjusted lower than what userspace set
during playback if the device temperature reach the threshold.
Whenever digital gain is changed from userspace, codec will check the cooling
state and adjust the gain.
Change-Id: I52df0f96cf20b90a9bdad70b9c117eed82145fb2
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
Because of a HW limitation in DSP, while switching
RCG from TX MCLK to VA MCLK for SVA use cases
a glitch is seen on AHB bus leading to data
corruption in registers.
So, while doing a mux switch for VA RCG clock selection,
do not configure the muxsel register in HLOS as it is
taken care in DSP itself as a workaround for HW limitation.
Change-Id: Ie36ff239689e634f5c29ad03b343b95de2d12547
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Check if clk is enabled before disabling it to avoid
warning log during adsp SSR.
Change-Id: I916af6f9efacfe3d08e0b05dcc0c6023944369d2
Signed-off-by: Meng Wang <mengw@codeaurora.org>
The PCM_RATE bit field in LPASS_TX_CDC_TXn_TX_PATH_CTL
ranges from 0 to 6.
In the current implementation of tx-macro, the value
read is mapped directly to the sample rate instead of
the indices. Change is to correct this.
Add the delay based on pcm_rate in va-macro as well.
Change-Id: I6cb7e58e71f2a25356608611f1dfed83171706f6
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
The number of HIFI FIR coeff will not be retained if power collapsed,
need to be written right before FIR_START is kicked off.
Change-Id: I034949eb7748f8b2e5b21445fa10f4f1df66a7bf
Previously code will not write coefficients if there are exactly 100 coeffs
in first coeffs write. Or if user update coeffs on the fly with one group
unchanged.
Change-Id: Id4e8af06dec6b247f4a79a797d5b61668fd1e7f4
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
Update regmap default entries of spk protection
registers as per lpass cdc version 2p5.
Change-Id: I7c966eb3edbe9a9c065c03220ef2b9390b1fc723
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Add wsa2 backend dai links only in platforms
which has 4 wsa speakers.
add 2 to the device index parsed from hardware device id
of wsa slave to match the dai names in the msm_dailink.h
Change-Id: Iffe43842123526f4925f9d5bcd8dff0317bac7a7
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
During sound card register init call, if swr pdev
is not initialized yet respective soundwire port
config is not updated to soundwire controller device.
In macro drivers, update swr pdev into macro private
data prior to platform device add.
Change-Id: Ifa67471cfc7a10b102b573df6285e598bb0b5e5e
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Enable HiFi FIR PCM filter on digital codec to support HiFi audio playback on headset.
Change-Id: I5bc03ed45a3fd149c93dc04f33be0a581b519d44
Signed-off-by: Junkai Cai <junkai@codeaurora.org>
Return from config compander during aux path powerup
as aux path compander is not present.
Change-Id: I5ed1557dddfb64c8712d92c75fd58aa98b96355d
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Update correct offset to set IIR1 registers to make sidetone work.
Change-Id: I94cc7f54c5d68954565d683aee0d3e887eebedb3
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Update ch_mask of WSA2 macro to return based on
4-channel DMA support.
Change-Id: Iea4800dc85bf6bf1d250dfca214c58925ea328ab
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
lpass-cdc only support new codec after 2.5 version.
Remove old lpass cdc version check.
Change-Id: I54a53edf5bdb92f78b43d96e9413f64b0e06c306
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Add LPASS-CDC version 2p5 for version read.
Change-Id: I2c9fe054d18fb9f2521c0d007c1736ade31ff24b
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
In va, rx and wsa macros, move schedule_work call to
add the child devices to the point later to where the parent
initialization gets completed.
Change-Id: I2095f1007beae253534b2ed44f988ce55fad6b75
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Auto suspend timer for core vote is triggering before read write complete.
Move the auto suspend of core vote to post read write operation.
Change-Id: I619da358c7c42af45ef480ed0dba2c2cc26e9cc1
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Call BLOCKING_INIT_NOTIFIER_HEAD for lpass-cdc notifier to
reduce warning log during bootup.
Change-Id: I0aa7fec44e857cf170fcd701986f1fa2db03e170
Signed-off-by: Meng Wang <mengw@codeaurora.org>
RX4/5 are added on bolero 2.5 and can be used for wsa1 macro.
Make this change to add RX4/5.
Change-Id: I4fa77fec3cbcb4d01718026cf648e5e7a171ddb2
Signed-off-by: Meng Wang <mengw@codeaurora.org>
In unified compander design, path gain for rx and
wsa macros vary. Update common logic to use
and derive required path_gain setting for respective
macros.
Change-Id: I64dcb4e36a703e8effd069d2c68b7045920a77b0
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
In unified compander, update path_gain to use
upper_gain_int value.
Change-Id: Ibe616eb1cab223cc855e817c5ca09579af9ddfb9
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
In soundwire version 1.7, rx soundwire port2/3
are extended to 32bits to use as PCM port too.
When using for PDM port as well, need to ungate
the ports for functionality to work.
Change-Id: I1815a9337ab21e0000ca7dbfeaac4c01dadec0dc
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Remove bcl decode registers and add new central broadcast
decode registers.
Enable the new central broadcast (CB) block registers during usecase
start and request for bcl data inorder to receive current bcl events.
Change-Id: I4c626e5083328b4cfdb5c956695078985b5c54a5
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
update SOC_SINGLE_MULTI_EXT to byte control for IIR mixer controls.
Change-Id: I94f09b9dd26e4da8a307e0add22634e2ab15aa66
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Update LPASS digital codec driver name for proper enumeration.
Change-Id: Ied6a3697a5e47c0695b6339ec7b4b4561ef6ccbd
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>