All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: usb-audio: Add dB map quirk for Razer Barracuda X 2.4
@ 2026-07-22  1:09 Markus Lindner
  2026-07-24  9:10 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Lindner @ 2026-07-22  1:09 UTC (permalink / raw)
  To: perex, tiwai; +Cc: alsa-devel, linux-kernel, Markus Lindner

The Razer Barracuda X 2.4 GHz USB headset dongle (0x1532:0x0552)
reports a minimum volume register value of cval->min = -16800.

In UAC 1/256 dB units, -16800 corresponds to -65.625 dB. However,
stock ALSA misinterprets this raw integer as 1/100 dB units
(-168.00 dB), causing user-space audio servers (PipeWire /
PulseAudio) to map their volume curves against an incorrectly wide
range.

Add an explicit usbmix_dB_map entry overriding Unit 2 to -6562
(-65.62 dB) to accurately report the physical hardware
attenuation bounds.

Signed-off-by: Markus Lindner <lindner.markus@outlook.at>
---
 sound/usb/mixer_maps.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c
index faac7df1fb..4d8dca04f8 100644
--- a/sound/usb/mixer_maps.c
+++ b/sound/usb/mixer_maps.c
@@ -344,6 +344,16 @@ static const struct usbmix_name_map bose_soundlink_map[] = {
 	{ 0 }	/* terminator */
 };
 
+/*
+ * Razer Barracuda X 2.4: Firmware reports cval->min = -16800 in 1/256 dB units
+ * (-65.62 dB), which stock ALSA misinterprets as a -168 dB floor
+ */
+static const struct usbmix_dB_map razer_barracuda_x_2_4_dB = {-6562, 0};
+static const struct usbmix_name_map razer_barracuda_x_2_4_map[] = {
+	{ 2, NULL, .dB = &razer_barracuda_x_2_4_dB },
+	{ 0 }   /* terminator */
+};
+
 /* Sennheiser Communications Headset [PC 8], the dB value is reported as -6 negative maximum  */
 static const struct usbmix_dB_map sennheiser_pc8_dB = {-9500, 0};
 static const struct usbmix_name_map sennheiser_pc8_map[] = {
@@ -689,6 +699,11 @@ static const struct usbmix_ctl_map usbmix_ctl_maps[] = {
 		.id = USB_ID(0x17aa, 0x1046),
 		.map = lenovo_p620_rear_map,
 	},
+	{
+		/* Razer Barracuda X 2.4 */
+		.id = USB_ID(0x1532, 0x0552),
+		.map = razer_barracuda_x_2_4_map,
+	},
 	{
 		/* Sennheiser Communications Headset [PC 8] */
 		.id = USB_ID(0x1395, 0x0025),
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: usb-audio: Add dB map quirk for Razer Barracuda X 2.4
  2026-07-22  1:09 [PATCH] ALSA: usb-audio: Add dB map quirk for Razer Barracuda X 2.4 Markus Lindner
@ 2026-07-24  9:10 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2026-07-24  9:10 UTC (permalink / raw)
  To: Markus Lindner; +Cc: perex, tiwai, alsa-devel, linux-kernel

On Wed, 22 Jul 2026 03:09:18 +0200,
Markus Lindner wrote:
> 
> The Razer Barracuda X 2.4 GHz USB headset dongle (0x1532:0x0552)
> reports a minimum volume register value of cval->min = -16800.
> 
> In UAC 1/256 dB units, -16800 corresponds to -65.625 dB. However,
> stock ALSA misinterprets this raw integer as 1/100 dB units
> (-168.00 dB), causing user-space audio servers (PipeWire /
> PulseAudio) to map their volume curves against an incorrectly wide
> range.
> 
> Add an explicit usbmix_dB_map entry overriding Unit 2 to -6562
> (-65.62 dB) to accurately report the physical hardware
> attenuation bounds.
> 
> Signed-off-by: Markus Lindner <lindner.markus@outlook.at>

Applied now.

But at the next time, please submit to linux-sound@vger.kernel.org
instead of alsa-devel ML.  alsa-devel ML is only for user-space stuff
for now.


thanks,

Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-24  9:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-22  1:09 [PATCH] ALSA: usb-audio: Add dB map quirk for Razer Barracuda X 2.4 Markus Lindner
2026-07-24  9:10 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.