Skip to content

Commit 6b97119

Browse files
ford-prefecttiwai
authored andcommitted
ALSA: usb: Increase volume range that triggers a warning
On at least the HyperX Cloud III, the range is 18944 (-18944 -> 0 in steps of 1), so the original check for 255 steps is definitely obsolete. Let's give ourselves a little more headroom before we emit a warning. Fixes: 80aceff ("ALSA: usb-audio - Add volume range check and warn if it too big") Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Cc: linux-sound@vger.kernel.org Signed-off-by: Arun Raghavan <arunr@valvesoftware.com> Link: https://patch.msgid.link/20260116225804.3845935-1-arunr@valvesoftware.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 46b8d08 commit 6b97119

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

sound/usb/mixer.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1813,11 +1813,10 @@ static void __build_feature_ctl(struct usb_mixer_interface *mixer,
18131813

18141814
range = (cval->max - cval->min) / cval->res;
18151815
/*
1816-
* Are there devices with volume range more than 255? I use a bit more
1817-
* to be sure. 384 is a resolution magic number found on Logitech
1818-
* devices. It will definitively catch all buggy Logitech devices.
1816+
* There are definitely devices with a range of ~20,000, so let's be
1817+
* conservative and allow for a bit more.
18191818
*/
1820-
if (range > 384) {
1819+
if (range > 65535) {
18211820
usb_audio_warn(mixer->chip,
18221821
"Warning! Unlikely big volume range (=%u), cval->res is probably wrong.",
18231822
range);

0 commit comments

Comments
 (0)