summaryrefslogtreecommitdiff
path: root/sound/usb
diff options
context:
space:
mode:
authorChris Chiu <chiu@endlessm.com>2020-05-26 14:26:13 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-03 08:21:23 +0200
commit4adcf889e66b4cc0fd609b9764585bf071fb7a0e (patch)
treef9704177d08a485ad90e923e4b20aac495336eb8 /sound/usb
parent8c71b0bd64dfa87de6308c3069eeb50a61f13537 (diff)
ALSA: usb-audio: mixer: volume quirk for ESS Technology Asus USB DAC
[ Upstream commit 4020d1ccbe55bdf67b31d718d2400506eaf4b43f ] 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>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/mixer.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 583edacc9fe8..f55afe3a98e3 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1171,6 +1171,14 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval,
cval->res = 384;
}
break;
+ case USB_ID(0x0495, 0x3042): /* ESS Technology Asus USB DAC */
+ if ((strstr(kctl->id.name, "Playback Volume") != NULL) ||
+ strstr(kctl->id.name, "Capture Volume") != NULL) {
+ cval->min >>= 8;
+ cval->max = 0;
+ cval->res = 1;
+ }
+ break;
}
}