summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-04-22 23:34:05 +0300
committerMark Brown <broonie@kernel.org>2026-04-27 00:51:59 +0300
commit0fa63c7ea9e1571f9da9fd4afda22361966b3236 (patch)
treecf185942c3fe42f761df069fd0e999eda23c8cd9
parent0241d6192a11c8f8634ab10a3a26fbdec92a9b08 (diff)
downloadlinux-0fa63c7ea9e1571f9da9fd4afda22361966b3236.tar.xz
ASoC: ops: Log unknown controls in snd_soc_limit_volume()
When we fail to look up the control name in snd_soc_limit_volume() we don't log anything, the error code isn't particularly descriptive and checking the return value of the function at all is a bit erratic among the callers. Since there is no reason why anyone should ever be attempting to limit the volume of a nonexistant control add a log message in the core to improve usability. Link: https://patch.msgid.link/20260422-asoc-limit-volume-error-v2-1-2e2ced321229@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/soc-ops.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c
index bbf277670718..c935571d43e9 100644
--- a/sound/soc/soc-ops.c
+++ b/sound/soc/soc-ops.c
@@ -461,6 +461,10 @@ int snd_soc_limit_volume(struct snd_soc_card *card, const char *name, int max)
mc->platform_max = max;
ret = snd_soc_clip_to_platform_max(kctl);
}
+ } else {
+ /* Some cards blindly add limits for multiple variants. */
+ dev_dbg(card->dev, "Volume limit for unknown control '%s'\n",
+ name);
}
return ret;