sound/soc/soc-ops.c | 4 ++++ 1 file changed, 4 insertions(+)
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.
Signed-off-by: Mark Brown <broonie@kernel.org>
---
Changes in v2:
- Lower the print to a dev_dbg() since some cards do blindly add limits
for multiple variants they handle so would see warnings.
- Link to v1: https://patch.msgid.link/20260421-asoc-limit-volume-error-v1-1-dcd0102576a6@kernel.org
---
sound/soc/soc-ops.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c
index f966d4e13c7f..1fc87cd5ea2f 100644
--- a/sound/soc/soc-ops.c
+++ b/sound/soc/soc-ops.c
@@ -503,6 +503,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;
---
base-commit: 028ef9c96e96197026887c0f092424679298aae8
change-id: 20260421-asoc-limit-volume-error-ca28188dc7c9
Best regards,
--
Mark Brown <broonie@kernel.org>
On Wed, 22 Apr 2026 21:34:05 +0100, Mark Brown wrote:
> ASoC: ops: Log unknown controls in snd_soc_limit_volume()
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.2
Thanks!
[1/1] ASoC: ops: Log unknown controls in snd_soc_limit_volume()
https://git.kernel.org/broonie/sound/c/0fa63c7ea9e1
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
© 2016 - 2026 Red Hat, Inc.