Skip to content

Commit c256443

Browse files
Cryolitiagregkh
authored andcommitted
ALSA: usb-audio: move mixer_quirks' min_mute into common quirk
[ Upstream commit 2c3ca8c ] We have found more and more devices that have the same problem, that the mixer's minimum value is muted. Accroding to pipewire's MR[1] and Arch Linux wiki[2], this should be a very common problem in USB audio devices. Move the quirk into common quirk,as a preparation of more devices' quirk's patch coming on the road[3]. 1. https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/2514 2. https://wiki.archlinux.org/index.php?title=PipeWire&oldid=804138#No_sound_from_USB_DAC_until_30%_volume 3. On the road, in the physical sense. We have been buying ton of these devices for testing the problem. Tested-by: Guoli An <anguoli@uniontech.com> Signed-off-by: Cryolitia PukNgae <cryolitia@uniontech.com> Link: https://patch.msgid.link/20250827-sound-quirk-min-mute-v1-1-4717aa8a4f6a@uniontech.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 6074537 commit c256443

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

sound/usb/mixer_quirks.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4484,16 +4484,12 @@ void snd_usb_mixer_fu_apply_quirk(struct usb_mixer_interface *mixer,
44844484
if (unitid == 7 && cval->control == UAC_FU_VOLUME)
44854485
snd_dragonfly_quirk_db_scale(mixer, cval, kctl);
44864486
break;
4487+
}
4488+
44874489
/* lowest playback value is muted on some devices */
4488-
case USB_ID(0x0572, 0x1b09): /* Conexant Systems (Rockwell), Inc. */
4489-
case USB_ID(0x0d8c, 0x000c): /* C-Media */
4490-
case USB_ID(0x0d8c, 0x0014): /* C-Media */
4491-
case USB_ID(0x19f7, 0x0003): /* RODE NT-USB */
4492-
case USB_ID(0x2d99, 0x0026): /* HECATE G2 GAMING HEADSET */
4490+
if (mixer->chip->quirk_flags & QUIRK_FLAG_MIXER_MIN_MUTE)
44934491
if (strstr(kctl->id.name, "Playback"))
44944492
cval->min_mute = 1;
4495-
break;
4496-
}
44974493

44984494
/* ALSA-ify some Plantronics headset control names */
44994495
if (USB_ID_VENDOR(mixer->chip->usb_id) == 0x047f &&

sound/usb/quirks.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2196,6 +2196,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
21962196
QUIRK_FLAG_SET_IFACE_FIRST),
21972197
DEVICE_FLG(0x0556, 0x0014, /* Phoenix Audio TMX320VC */
21982198
QUIRK_FLAG_GET_SAMPLE_RATE),
2199+
DEVICE_FLG(0x0572, 0x1b09, /* Conexant Systems (Rockwell), Inc. */
2200+
QUIRK_FLAG_MIXER_MIN_MUTE),
21992201
DEVICE_FLG(0x05a3, 0x9420, /* ELP HD USB Camera */
22002202
QUIRK_FLAG_GET_SAMPLE_RATE),
22012203
DEVICE_FLG(0x05a7, 0x1020, /* Bose Companion 5 */
@@ -2242,8 +2244,10 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
22422244
QUIRK_FLAG_GET_SAMPLE_RATE),
22432245
DEVICE_FLG(0x0c45, 0x636b, /* Microdia JP001 USB Camera */
22442246
QUIRK_FLAG_GET_SAMPLE_RATE),
2245-
DEVICE_FLG(0x0d8c, 0x0014, /* USB Audio Device */
2246-
QUIRK_FLAG_CTL_MSG_DELAY_1M),
2247+
DEVICE_FLG(0x0d8c, 0x000c, /* C-Media */
2248+
QUIRK_FLAG_MIXER_MIN_MUTE),
2249+
DEVICE_FLG(0x0d8c, 0x0014, /* C-Media */
2250+
QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_MIXER_MIN_MUTE),
22472251
DEVICE_FLG(0x0ecb, 0x205c, /* JBL Quantum610 Wireless */
22482252
QUIRK_FLAG_FIXED_RATE),
22492253
DEVICE_FLG(0x0ecb, 0x2069, /* JBL Quantum810 Wireless */
@@ -2290,6 +2294,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
22902294
QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY),
22912295
DEVICE_FLG(0x1901, 0x0191, /* GE B850V3 CP2114 audio interface */
22922296
QUIRK_FLAG_GET_SAMPLE_RATE),
2297+
DEVICE_FLG(0x19f7, 0x0003, /* RODE NT-USB */
2298+
QUIRK_FLAG_MIXER_MIN_MUTE),
22932299
DEVICE_FLG(0x19f7, 0x0035, /* RODE NT-USB+ */
22942300
QUIRK_FLAG_GET_SAMPLE_RATE),
22952301
DEVICE_FLG(0x1bcf, 0x2281, /* HD Webcam */
@@ -2350,6 +2356,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
23502356
QUIRK_FLAG_CTL_MSG_DELAY_1M),
23512357
DEVICE_FLG(0x2d95, 0x8021, /* VIVO USB-C-XE710 HEADSET */
23522358
QUIRK_FLAG_CTL_MSG_DELAY_1M),
2359+
DEVICE_FLG(0x2d99, 0x0026, /* HECATE G2 GAMING HEADSET */
2360+
QUIRK_FLAG_MIXER_MIN_MUTE),
23532361
DEVICE_FLG(0x2fc6, 0xf0b7, /* iBasso DC07 Pro */
23542362
QUIRK_FLAG_CTL_MSG_DELAY_1M),
23552363
DEVICE_FLG(0x30be, 0x0101, /* Schiit Hel */

sound/usb/usbaudio.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ extern bool snd_usb_skip_validation;
196196
* for the given endpoint.
197197
* QUIRK_FLAG_MIC_RES_16 and QUIRK_FLAG_MIC_RES_384
198198
* Set the fixed resolution for Mic Capture Volume (mostly for webcams)
199+
* QUIRK_FLAG_MIXER_MIN_MUTE
200+
* Set minimum volume control value as mute for devices where the lowest
201+
* playback value represents muted state instead of minimum audible volume
199202
*/
200203

201204
#define QUIRK_FLAG_GET_SAMPLE_RATE (1U << 0)
@@ -222,5 +225,6 @@ extern bool snd_usb_skip_validation;
222225
#define QUIRK_FLAG_FIXED_RATE (1U << 21)
223226
#define QUIRK_FLAG_MIC_RES_16 (1U << 22)
224227
#define QUIRK_FLAG_MIC_RES_384 (1U << 23)
228+
#define QUIRK_FLAG_MIXER_MIN_MUTE (1U << 24)
225229

226230
#endif /* __USBAUDIO_H */

0 commit comments

Comments
 (0)