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>
Add compander soft reset event that can be requested
from a slave codec to reset at power down to reduce
click and pop noise.
Change-Id: I2f6ff182e258e02979166b0e76b6a1d439b1cf87
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Defer codec macro probes if soundwire pins are not
ready to be accessed yet during boot up.
Change-Id: I20173e49043a076d73cdbb811863afbff87d4a3b
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Add changes to support disabling of soundwire devices
so that soundwire pins can be freed for other purposes
if needed.
Change-Id: Iae14d43c2c3d5380347be4c3b443c209b2612a97
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
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>
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>
Reset the compander power mode register to default
value upon teardown sequence, so that at next startup
use case it has proper power value.
Change-Id: I851e8a62a910d7018ac74e93abee47a615b3e50c
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Observing noise on aux path playback.
Update sequences on digital side and
swr port params as per latest HW sequence
recommendation.
Change-Id: Ic07ec35b091985ef0146957ceca830bd1162e7ec
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Vote for LPASS HW core in soundwire clock request before
soundwire register access to avoid LPASS going to sleep.
Change-Id: I1e54ece19130cf6bd63fbf75a8a0716856c3b73e
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
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>
Enable soundwire gpio before enabling soundwire clock
so that bus clash does not happen when interrupts are
received.
Change-Id: I40983b8837373f1ea7ac8fa6add7c56225ff0592
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Headset Idle detect feature powers off PAs when
there is no signal. Add widget to enable
this feature for headset path.
Change-Id: I4c88057b347e40317578b5eb014053c17d196b85
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
If mclk enable is failed during mclk widget power up event, it would
still send a power down event for the widget during disable, which could
disable the mclk voted by other client like soundwire. Do not disable
mclk during power down if enable is failed during power up.
Change-Id: If782b34f9ef414501590ed8cf681bbe58f1dda76
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
Invoke swr device down callback to set soundwire master
to reset state before setting ssr down flag. This is to
ensure master is reset to proper state after ssr/pdr.
Change-Id: Ifb5548f603ac03b772006314f4723c0ac0176928
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
Reset swr only during init or ssr-pdr scenarios.
Do not reset swr during clock stop, which would
result in bad state of master and cause error
interrupts.
Change-Id: I88e071921409a5b5797aeedb8e7cb57cb5d5bb9a
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
Correct name of widgets for tx macro from
TX SWR_MIC to TX SWR_DMIC. Also assign codec pointer
to rx_priv before calling rx_macro_init_bcl_pmic_reg.
Change-Id: I268d79413c53bcd2d8e7a391859b71b7a7e3f64e
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Add mixer control and routing to enable echo reference
for rx_macro.
Change-Id: Ic1095eaa8024f2cb61722609daae94bc645b263b
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Add support to get the platform specific soundwire port configuration
for soundwire master ports.
Change-Id: Ie1d32a77d534f6c3f397936b85c025b14d01f321
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Update hph_pwr enum value for LOHIFI as per
class-H power options to maintain consistent naming.
Change-Id: Ib7deb8d84bd1163a933d06ae92a51cb29b76e3c8
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Mono playback over RX1 is not happening due to
incorrect channel mask sent to AFE. Update
channel mask for RX to enable playback.
Change-Id: I06eeb565149c635ddbcce39f4260f67b80474335
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
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>
Switch audio drivers to SPDX identifier on msm-4.19.
Change-Id: Ic3f0230a516db251b8d81e8a7e73dbc04d66fe1b
Signed-off-by: Meng Wang <mengw@codeaurora.org>
On headphone(HPH) path, CnP spec is not met.
Handle sequences for bolero and tanggu codecs
as per HW sequences. Disable vdd_buck during
system suspend when no usecase is active.
CRs-Fixed: 2343436
Change-Id: I62f89d829715f07885a97531fdcb2cc3ca0822ef
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
HD2 canceller on analog codec is performing
better and enabling HD2 block on rx macro side
as well impacting THD+N spec. As per HW
recommendation, disable HD2 on digital bolero
rx macro by default. Mixer control option is
provided if required to enable it in future for
any requirements.
CRs-Fixed: 2343436
Change-Id: Ic1696ff9a6dea22a3c2a6071708267e2a024a4c7
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Add callback event in ssr_disable to disable
tanggu PA before regcache_cache_only
to avoid pop after PDR. Also update proper bit
while RX Mute.
Change-Id: I06402269d393ca74c11611482cafbde03f4c62b9
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Add new class-H driver with sequences to support
both class-H and class-AB modes on wcd937x variants.
Change-Id: Ie109f3d951af1e8a0079dd39ab2fe1e9883bd6c2
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Two power modes are supported on bolero digital.
Add support to set required power mode using
mixer control and enable runtime during powerup
sequence.
Change-Id: I4c5a7560984d60745ac98848f1eec1d1f8485323
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Avoid access of gfmux register during SSR/PDR.
Reset the gfmux state to MCLK_MUX0 after
SSR up event in rx macro.
Change-Id: I2ac611049efd3ce9d03bc9dcd912f64887a23679
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Update ignore suspend for AIF in/out and dapm input/output
widgets for bolero and wcd937x codecs to avoid suspend
of codec during active usecase running even after APSS
goes to suspend.
CRs-Fixed: 2321226
Change-Id: I277129e8e657485c56414a385150c4da55382770
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
After switching from native to non-native clip,
observe slowness in clip playback content heard
on headphones. Update mclk_mux for enable sequence
based on native flag and for disable sequence
use the same setting done during enable.
CRs-Fixed: 2322232
Change-Id: I795e0620e0239b53cdfdadaf2d57acfb570c4c3b
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
In bolero and tanggu combination, make bolero parent of tanggu.
Bolero and tanggu can communicate mutually using notifier and
plat_data callback APIs.
Change-Id: Iecd119df7f0ad1ba225c0427f3f42f217146b092
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>