Skip to contentSkip to conversation

snd-usb-audio: incorrect PCM volume scaling on Edifier R19U USB speaker (0001:0201)

BUG Miguel Mário Nápoli 2 participants 2 messages Jul 7 – Jul 9 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello,
I'd like to report an issue with USB audio volume scaling on a cheapUSB-powered speaker set, in case it's useful for a mixer quirk fix.
Device: Edifier R19U USB speakers (MVSILICON.INC. controller chip)lsusb: Bus 001 Device 010: ID 0001:0201 Fry's Electronics EDIFIER R19U  (Note: idVendor 0001 is an unofficial/reused ID ("Fry's Electronics"  placeholder), so it may be shared by unrelated devices from other  vendors -- please take that into account if considering a quirk  based on VID/PID matching alone.)
System: Zorin OS 18 (Ubuntu-based), fresh install (< 1 week old)Kernel: 6.17.0-35-genericPipeWire: 1.0.5
Problem description:On connection, the kernel logs a warning about an unusually largevolume range for this device's PCM control:
  usb 1-2: New USB device found, idVendor=0001, idProduct=0201, bcdDevice=0.10  usb 1-2: Product: EDIFIER R19U  usb 1-2: Manufacturer: MVSILICON.INC.  usb 1-2: Warning! Unlikely big volume range (=999), cval->res is probably wrong.  usb 1-2: [9] FU [PCM Playback Volume] ch = 2, val = 0/999/1
As a result, userspace volume controls (tested via PipeWire/WirePlumberand GNOME Sound Settings) display a normal-looking volume percentage(e.g. 69%), while the actual underlying ALSA mixer value stays at 0,producing no audible output at all -- with no mute indicator anywherein the UI.
Confirmed via amixer while PipeWire reported ~69%:
  Simple mixer control 'PCM',0    Capabilities: pvolume pswitch pswitch-joined    Playback channels: Front Left - Front Right    Limits: Playback 0 - 999    Front Left: Playback 0 [0%] [0.00dB] [on]    Front Right: Playback 0 [0%] [0.00dB] [on]
Manually forcing the raw ALSA control resolves it immediately:
  amixer -c <card> sset PCM 999
After this, audio plays correctly and the volume responds normally tofurther adjustments, confirming the hardware/DAC path itself is fine --this looks like a resolution/step (cval->res) miscalculation for thisdevice's 0-999 range, similar to past quirk fixes for other USB audiochips with non-standard volume ranges (e.g. the Logitech c270 webcamfix in sound/usb/mixer.c, volume_control_quirks()). This was not an issue on a previous Ubuntu installation with an olderkernel/PipeWire stack on the same hardware, suggesting this may be aregression in how a newer kernel or PipeWire handles this specificrange, or simply a device that was never covered by an existing quirk.
Current workaround in use (userspace, not a real fix):A udev rule triggers amixer -c <card> sset PCM 999 whenever thedevice is connected (matched by idVendor=0001/idProduct=0201), forcingthe ALSA control to maximum so PipeWire's own volume slider can thenattenuate correctly from there.
Happy to test a patch or provide more logs/output if needed.
Thanks,Miguel Mario NapoliCriciuma/Brazil

#2 lore raw
Quoted 60 lines · Miguel Mário Nápoli

Hello,

I'd like to report an issue with USB audio volume scaling on a cheap USB-powered speaker set, in case it's useful for a mixer quirk fix.

Device: Edifier R19U USB speakers (MVSILICON.INC. controller chip)
lsusb: Bus 001 Device 010: ID 0001:0201 Fry's Electronics EDIFIER R19U
(Note: idVendor 0001 is an unofficial/reused ID ("Fry's Electronics" placeholder), so it may be shared by unrelated devices from other vendors -- please take that into account if considering a quirk based on VID/PID matching alone.)

System: Zorin OS 18 (Ubuntu-based), fresh install (< 1 week old)
Kernel: 6.17.0-35-generic
PipeWire: 1.0.5

Problem description:
On connection, the kernel logs a warning about an unusually large volume range for this device's PCM control:

usb 1-2: New USB device found, idVendor=0001, idProduct=0201, bcdDevice=0.10 usb 1-2: Product: EDIFIER R19U
usb 1-2: Manufacturer: MVSILICON.INC.
usb 1-2: Warning! Unlikely big volume range (=999), cval->res is probably
wrong.
usb 1-2: [9] FU [PCM Playback Volume] ch = 2, val = 0/999/1

As a result, userspace volume controls (tested via PipeWire/WirePlumber and GNOME Sound Settings) display a normal-looking volume percentage (e.g. 69%), while the actual underlying ALSA mixer value stays at 0, producing no audible output at all -- with no mute indicator anywhere in the UI.

Confirmed via amixer while PipeWire reported ~69%:

Simple mixer control 'PCM',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 999
Front Left: Playback 0 [0%] [0.00dB] [on]
Front Right: Playback 0 [0%] [0.00dB] [on]

Manually forcing the raw ALSA control resolves it immediately:

amixer -c <card> sset PCM 999

After this, audio plays correctly and the volume responds normally to further adjustments, confirming the hardware/DAC path itself is fine -- this looks like a resolution/step (cval->res) miscalculation for this device's 0-999 range, similar to past quirk fixes for other USB audio chips with non-standard volume ranges (e.g. the Logitech c270 webcam fix in sound/usb/mixer.c, volume_control_quirks()).

This was not an issue on a previous Ubuntu installation with an older kernel/PipeWire stack on the same hardware, suggesting this may be a regression in how a newer kernel or PipeWire handles this specific range, or simply a device that was never covered by an existing quirk.

Quoted 7 lines

Current workaround in use (userspace, not a real fix):
A udev rule triggers amixer -c <card> sset PCM 999 whenever the device is connected (matched by idVendor=0001/idProduct=0201), forcing the ALSA control to maximum so PipeWire's own volume slider can then attenuate correctly from there.

Happy to test a patch or provide more logs/output if needed.

Have you tried to apply the existing quirk? Judging from the number 999, it might be a linear volume, and you can apply the linear volume quirk. See Documentation/sound/alsa-configuration.rst, the section for snd-usb-audio quirk_flags.

thanks,

Takashi