Skip to content

Commit 4adcf88

Browse files
Chris Chiugregkh
authored andcommitted
ALSA: usb-audio: mixer: volume quirk for ESS Technology Asus USB DAC
[ Upstream commit 4020d1c ] The Asus USB DAC is a USB type-C audio dongle for connecting to the headset and headphone. The volume minimum value -23040 which is 0xa600 in hexadecimal with the resolution value 1 indicates this should be endianness issue caused by the firmware bug. Add a volume quirk to fix the volume control problem. Also fixes this warning: Warning! Unlikely big volume range (=23040), cval->res is probably wrong. [5] FU [Headset Capture Volume] ch = 1, val = -23040/0/1 Warning! Unlikely big volume range (=23040), cval->res is probably wrong. [7] FU [Headset Playback Volume] ch = 1, val = -23040/0/1 Signed-off-by: Chris Chiu <chiu@endlessm.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20200526062613.55401-1-chiu@endlessm.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 8c71b0b commit 4adcf88

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎sound/usb/mixer.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,6 +1171,14 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval,
11711171
cval->res = 384;
11721172
}
11731173
break;
1174+
case USB_ID(0x0495, 0x3042): /* ESS Technology Asus USB DAC */
1175+
if ((strstr(kctl->id.name, "Playback Volume") != NULL) ||
1176+
strstr(kctl->id.name, "Capture Volume") != NULL) {
1177+
cval->min >>= 8;
1178+
cval->max = 0;
1179+
cval->res = 1;
1180+
}
1181+
break;
11741182
}
11751183
}
11761184

0 commit comments

Comments
 (0)