From: Federico Cuello Date: Tue, 8 May 2018 22:13:38 +0000 (+0200) Subject: ALSA: usb: mixer: volume quirk for CM102-A+/102S+ X-Git-Tag: Ubuntu-4.15.0-33.36~268 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=79932087c1851ae9f8de2a7b35f5d4338f7397eb;p=mirror_ubuntu-bionic-kernel.git ALSA: usb: mixer: volume quirk for CM102-A+/102S+ BugLink: http://bugs.launchpad.net/bugs/1782846 commit 21493316a3c4598f308d5a9fa31cc74639c4caff upstream. Currently it's not possible to set volume lower than 26% (it just mutes). Also fixes this warning: Warning! Unlikely big volume range (=9472), cval->res is probably wrong. [13] FU [PCM Playback Volume] ch = 2, val = -9473/-1/1 , and volume works fine for full range. Signed-off-by: Federico Cuello Cc: Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman Signed-off-by: Kamal Mostafa Signed-off-by: Khalid Elmously --- diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 20b28a5a1456..5d6cd4eb8101 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -911,6 +911,14 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval, } break; + case USB_ID(0x0d8c, 0x0103): + if (!strcmp(kctl->id.name, "PCM Playback Volume")) { + usb_audio_info(chip, + "set volume quirk for CM102-A+/102S+\n"); + cval->min = -256; + } + break; + case USB_ID(0x0471, 0x0101): case USB_ID(0x0471, 0x0104): case USB_ID(0x0471, 0x0105):