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>
Reset GFMUX reg for va-macro and wsa-macro when adsp is up
after SSR. And check if clock is enabled before accessing
register to avoid kernel panic.
Change-Id: Idce9695be552cab0e8e389cf72eeb7a67a754bf9
Signed-off-by: Meng Wang <mengw@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>
Boost level max setting can be left to default
and not needed to be limited to any value.
Change-Id: Iab5073cedd6e69bb4311af9af54ff409d8bfd24c
Signed-off-by: Karthikeyan Mani <kmani@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>
Add Kcontrol to enable/disable digital mute for WSA RX0
and RX1.
Change-Id: Ib9ee2b01f142fdce5dab92eafe9c4b0c5d65844a
Signed-off-by: Vatsal Bucha <vbucha@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>
Frame sync of bolero macros need to be at 4KHz default
value.
Change-Id: Ia5399a3c4bee7e0f74115e5ffcb1ed51cbd07639
Signed-off-by: Karthikeyan Mani <kmani@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>
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>
For get_channel_map API, return proper channel mask
and channel count for EC ref port on WSA macro.
Change-Id: Ia90f1a1c5e90075d08f01c50349d6a8479be7897
Signed-off-by: Laxminath Kasam <lkasam@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>
The clk users count goes out of sync with the actual
clk requests from clients during SSR/PDR. Increment the
clk users only after the clk request is successful.
Change-Id: I512f037a118f4763a64e7a64f7f559bcfa37a37f
Signed-off-by: Aditya Bavanari <abavanar@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>
Add mixer widgets, routing and mixer controls in order
to support BCL feature on WSA and RX macros
of bolero codec.
CRs-Fixed: 2225097
Change-Id: I463f89a517bb3878e51a6aca0c1d73bc652ab8c5
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
Change max no of channels supported, format and rates
for wsa macro vi feedback.
CRs-Fixed: 2281591
Change-Id: Ie54ce4f63a02d661939ed732b388a3c26dd8ea2f
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Add support for wsa macro sidetone and adie loopback
widgets and route connections.
Change-Id: I5d830bc868e6fa0f0a56474f11867e6dd55ae535
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
ASoC core assigns dai id value to num_dais if
AIF dai-id passed is 0. Since we have different macros
passing AIF dai-id as 0, they are replaced in ASoC core.
To handle this, update AIF dai-id in respective macros
to start with value 1.
Change-Id: I222c088289292aa226c90710e56a8c94af5615cd
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
For ADIE loopback, MCLK needs to be enabled.
Associate the macro MCLK widgets to respective
rx and tx paths in route map.
Change-Id: I5632c3016146c5c5d822ae6fe438010904cf434b
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Update volatile registers list of bolero
VA and WSA macros. Fix sequence for wsa mute
and register access in regmap read/write.
Change-Id: I7984f7e2309933536f3855f6fd4a2e2fd1c4d13b
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
WSA macro supports both ec_legacy and ec_hq.
Add support to capture echo for both types
based on mixer control value.
Change-Id: I3c8a6cd13dabbee3f3687d5e63dc6d4c7bbc4eef
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Add codec entry for bolero codec under proc codecs list.
Update the names of wsa-macro gain offset and mode for
wsa8810 variant to avoid conflict with wcd9335.
Change-Id: Icaa2ef7c2f7253060cd7cccd44130b0b12dc0713
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Add support for WSA digital portion to register
as macro to bolero codec. ASoC dapm and dai
functionality of WSA macro is associated
to bolero codec itself.
Change-Id: Ida9647274e6a0aa392e131a9b08f83b2520802e5
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>