]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: codecs: wcd934x: do not switch off SIDO Buck when codec is in use
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Thu, 7 Apr 2022 09:43:13 +0000 (10:43 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 7 Apr 2022 17:29:38 +0000 (18:29 +0100)
commit4d82e6f64e2a44853dff569930d27812f2ff9e95
treebfce2a1d95811ea03e3fa12c38bdb2467014112f
parentbb82b67db42ed6e129fa044ac02f826e01c363d0
ASoC: codecs: wcd934x: do not switch off SIDO Buck when codec is in use

SIDO(Single-Inductor Dual-Ouput) Buck powers up both analog and digital
circuits along with internal memory, powering off this is the last thing
that codec should do when going to very low power.

Current code was powering off this Buck if there are no users of sysclk,
which is not correct. Powering off this buck will result in no register access.
This code path was never tested until recently after adding pm support
in SoundWire controller. Fix this by removing the buck poweroff when the
codec is active and also the code that is not used.

Without this patch all the read/write transactions will never complete and
results in SLIMBus Errors like:

qcom,slim-ngd qcom,slim-ngd.1: Tx:MT:0x0, MC:0x60, LA:0xcf failed:-110
wcd934x-codec wcd934x-codec.1.auto: ASoC: error at soc_component_read_no_lock
on wcd934x-codec.1.auto for register: [0x00000d05] -110
qcom,slim-ngd-ctrl 171c0000.slim: Error Interrupt received 0x82000000

Reported-by: Amit Pundir <amit.pundir@linaro.org>
Fixes: 085a135f2f68 ("ASoC: wcd934x: add support to wcd9340/wcd9341 codec")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Amit Pundir <amit.pundir@linaro.org>
Link: https://lore.kernel.org/r/20220407094313.2880-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wcd934x.c