[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260116225804.3845935-1-arunr@valvesoftware.com>
Date: Fri, 16 Jan 2026 14:58:04 -0800
From: Arun Raghavan <arunr@...vesoftware.com>
To: <linux-kernel@...r.kernel.org>
CC: Arun Raghavan <arun@...nraghavan.net>, Arun Raghavan
<arunr@...vesoftware.com>, Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai
<tiwai@...e.com>, <linux-sound@...r.kernel.org>
Subject: [PATCH] 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: 80acefff3bc7 ("ALSA: usb-audio - Add volume range check and warn if it too big")
Cc: Jaroslav Kysela <perex@...ex.cz>
Cc: Takashi Iwai <tiwai@...e.com>
Cc: linux-sound@...r.kernel.org
Signed-off-by: Arun Raghavan <arunr@...vesoftware.com>
---
sound/usb/mixer.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 3af71d42b9b9..90917c6ea871 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1813,11 +1813,10 @@ static void __build_feature_ctl(struct usb_mixer_interface *mixer,
range = (cval->max - cval->min) / cval->res;
/*
- * Are there devices with volume range more than 255? I use a bit more
- * to be sure. 384 is a resolution magic number found on Logitech
- * devices. It will definitively catch all buggy Logitech devices.
+ * There are definitely devices with a range of ~20,000, so let's be
+ * conservative and allow for a bit more.
*/
- if (range > 384) {
+ if (range > 65535) {
usb_audio_warn(mixer->chip,
"Warning! Unlikely big volume range (=%u), cval->res is probably wrong.",
range);
--
2.52.0
Powered by blists - more mailing lists