summaryrefslogtreecommitdiffstats
path: root/sound/soc/qcom
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2023-07-06 16:03:07 +0100
committerMark Brown <broonie@kernel.org>2023-07-06 16:03:07 +0100
commit980d97efdb30b8baa74b61fec086becb3aedbb90 (patch)
tree84bf33b0f99ae804894b879ebd007c190c3ab50c /sound/soc/qcom
parente231cd833f6463e9a1d54acae9614b513c74d45e (diff)
parentf09b6e96796056633453cb0d07b720d09f1efc68 (diff)
downloadlinux-stable-980d97efdb30b8baa74b61fec086becb3aedbb90.tar.gz
linux-stable-980d97efdb30b8baa74b61fec086becb3aedbb90.tar.bz2
linux-stable-980d97efdb30b8baa74b61fec086becb3aedbb90.zip
ASoC/soundwire/qdsp6/wcd: fix leaks and probe deferral
Merge series from Johan Hovold <johan+linaro@kernel.org>: I've been hitting a race during boot which breaks probe of the sound card on the Lenovo ThinkPad X13s as I've previously reported here: https://lore.kernel.org/all/ZIHMMFtuDtvdpFAZ@hovoldconsulting.com/ The immediate issue appeared to be a probe deferral that was turned into a hard failure, but addressing that in itself only made things worse as it exposed further bugs. I was hoping someone more familiar with the code in question would look into this, but as this affects users of the X13s and breaks audio on my machine every fifth boot or so, I decided to investigate it myself. As expected, the Qualcomm codec drivers are broken and specifically leak resources on component remove, which in turn breaks sound card probe deferrals. The source of the deferral itself appears to be legitimate and was simply due to some audio component not yet having been registered due to random changes in timing during boot. These issues can most easily be reproduced by simply blacklisting the q6apm_dai module and loading it manually after boot. Included are also two patches that suppresses error messages on component probe deferral to avoid spamming the logs during boot.
Diffstat (limited to 'sound/soc/qcom')
-rw-r--r--sound/soc/qcom/qdsp6/topology.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/qcom/qdsp6/topology.c b/sound/soc/qcom/qdsp6/topology.c
index cccc59b570b9..130b22a34fb3 100644
--- a/sound/soc/qcom/qdsp6/topology.c
+++ b/sound/soc/qcom/qdsp6/topology.c
@@ -1277,8 +1277,8 @@ int audioreach_tplg_init(struct snd_soc_component *component)
ret = snd_soc_tplg_component_load(component, &audioreach_tplg_ops, fw);
if (ret < 0) {
- dev_err(dev, "tplg component load failed%d\n", ret);
- ret = -EINVAL;
+ if (ret != -EPROBE_DEFER)
+ dev_err(dev, "tplg component load failed: %d\n", ret);
}
release_firmware(fw);