]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ALSA: usb-audio: Add helper function for volume range checks
authorRong Zhang <i@rong.moe>
Tue, 3 Mar 2026 19:47:57 +0000 (03:47 +0800)
committerTakashi Iwai <tiwai@suse.de>
Wed, 4 Mar 2026 11:05:57 +0000 (12:05 +0100)
commit1060dbbbb2f260e4755dbd8d2f53f5a1894397d8
tree31723156ef1a6830212aa4ac512886d67ce2e6ce
parent41d78cb724f4b40b7548af420ccfe524b14023bb
ALSA: usb-audio: Add helper function for volume range checks

When a potentially insane volume range is found, the volume control
parameters will be printed in WARN level instead of DEBUG level.
Currently, it's done by emitting a open-coded usb_audio_warn() in the
corresponding check.

The following changes are about to add more checks against volumen
ranges. As the first step, extract the current check logic into a helper
function to improve readability.

No functional change intended.

Signed-off-by: Rong Zhang <i@rong.moe>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260303194805.266158-3-i@rong.moe
sound/usb/mixer.c