ALSA: usb-audio: Don't create a mixer element with bogus volume range
authorTakashi Iwai <tiwai@suse.de>
Fri, 14 Feb 2020 14:49:28 +0000 (15:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2020 11:14:34 +0000 (13:14 +0200)
commit0cafae90a24e0c55ccb2443b398e6a6f7e52ed50
tree326f8dfc7fd9ba5146a0122562d27c09d9b4c63d
parentac6724d49f654ecb722f84c33ebb8ece64958182
ALSA: usb-audio: Don't create a mixer element with bogus volume range

[ Upstream commit e9a0ef0b5ddcbc0d56c65aefc0f18d16e6f71207 ]

Some USB-audio descriptors provide a bogus volume range (e.g. volume
min and max are identical), which confuses user-space.
This patch makes the driver skipping such a control element.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206221
Link: https://lore.kernel.org/r/20200214144928.23628-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/usb/mixer.c