]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ALSA: hda: Return -EINVAL for invalid volume/switch inputs
authorTakashi Iwai <tiwai@suse.de>
Sun, 16 Jun 2024 07:34:43 +0000 (09:34 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 18 Jun 2024 10:00:18 +0000 (12:00 +0200)
commit5bae83007bdd71919a38d5c6db020ef43e2299c6
tree7812351aeef644bb856ff4048703134862cf41fa
parent10457f5042b4890a667e2f15a2e783490dda44d2
ALSA: hda: Return -EINVAL for invalid volume/switch inputs

So far the HD-audio driver has been tolerant about the input values
and accepts any values by correcting the amp volume and switch values
internally.  But now our own selftest starts complaining about this
behavior, so let's be picky and change the behavior to return -EINVAL
for invalid input values instead.

Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Closes: https://lore.kernel.org/r/1d44be36-9bb9-4d82-8953-5ae2a4f09405@molgen.mpg.de
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/20240616073454.16512-3-tiwai@suse.de
sound/pci/hda/hda_codec.c