sound:usb:mixer.c: Solving 'Generic AB13X USB Audio' Unlikely volume range.
Dear Maintainers,
I am using a generic "boat" make earphones, which are too loud across different systems with eg: iOS, macOS, Debian Linux. And hence I believe the issue is not with a driver but the headphones.
After connecting this device to laptop I get the following in dmesg logs:
usb 1-5: New USB device found, idVendor=001f, idProduct=0b21, bcdDevice= 1.00 usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-5: Product: AB13X USB Audio usb 1-5: Manufacturer: Generic usb 1-5: SerialNumber: 20210726905926 usb 1-5: Warning! Unlikely big volume range (=11520), cval->res is probably wrong. usb 1-5: [2] FU [PCM Playback Volume] ch = 2, val = -11520/0/1 usb 1-5: Warning! Unlikely big volume range (=8191), cval->res is probably wrong. usb 1-5: [5] FU [Mic Capture Volume] ch = 1, val = 0/8191/1
By using pavucontrol, I am able to get fair sound, after reducing 17dB in Analog Stereo Output and reducing 6dB in Digital Stereo Output.
I believe this issue could be solved by adding a quirk patch to sound/usb/mixer.c:1096 (/* volume control quriks */).
BR,
Sidharth Seela
Quoted 17 lines · Sidharth Seela
Dear Maintainers,
I am using a generic "boat" make earphones, which are too loud across different systems with eg: iOS, macOS, Debian Linux. And hence I believe the issue is not with a driver but the headphones.After connecting this device to laptop I get the following in dmesg logs:
usb 1-5: New USB device found, idVendor=001f, idProduct=0b21, bcdDevice= 1.00 usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-5: Product: AB13X USB Audio usb 1-5: Manufacturer: Generic usb 1-5: SerialNumber: 20210726905926 usb 1-5: Warning! Unlikely big volume range (=11520), cval->res is probably wrong. usb 1-5: [2] FU [PCM Playback Volume] ch = 2, val = -11520/0/1 usb 1-5: Warning! Unlikely big volume range (=8191), cval->res is probably wrong. usb 1-5: [5] FU [Mic Capture Volume] ch = 1, val = 0/8191/1
Quoted 5 lines
By using pavucontrol, I am able to get fair sound, after reducing 17dB in Analog Stereo Output and reducing 6dB in Digital Stereo Output.
I believe this issue could be solved by adding a quirk patch to
sound/usb/mixer.c:1096(/* volume control quriks */).
An oft-seen firmware bug is that it provides the wrong mixer range that confuses the driver. USB audio firmware should provide the above volume range in 1/256 dB level.
Try to figure out the volume level and you'd need to hard-code the actual volume range there for your device.
Takashi
Thankyou Takashi for your reply,
Quoted 3 lines · Takashi Iwai
An oft-seen firmware bug is that it provides the wrong mixer range that confuses the driver. USB audio firmware should provide the above volume range in 1/256 dB level.
If possible, could you explain/ point me to a doc regarding cval->max, cval->min,
and cval->res and its meanings, its relation to power and dB.
Quoted 2 lines
Try to figure out the volume level and you'd need to hard-code the actual volume range there for your device
.
I am able to change the values and load in the module. But unable to exactly understand how the values are related.
Signature · 3 lines
Thanks, Sidharth Seela www.realtimedesign.org