ASoC: ops: Log unknown controls in snd_soc_limit_volume()
Mark Brown
maintainerPATCH v2 1/1 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.
---
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/[email protected]
--- sound/soc/soc-ops.c | 4 ++++ 1 file changed, 4 insertions(+)
sound/soc/soc-ops.c +4 -0
@@ -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,
Signature · 1 line
Mark Brown <[email protected]>
Mark Brown
maintainerQuoted 1 line · Mark Brown
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