diff options
author | Takashi Iwai <tiwai@suse.de> | 2018-05-15 07:30:23 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-05-15 07:30:23 +0200 |
commit | 8def12d9cd45b6abad87c5dc5a88a18c739762be (patch) | |
tree | 232020665442fb2c8bd55f4878c1735535dfd8a7 /sound/usb | |
parent | ALSA: hda/ca0132: fix array_size.cocci warnings (diff) | |
parent | ALSA: usb-audio: Use Class Specific EP for UAC3 devices. (diff) | |
download | linux-8def12d9cd45b6abad87c5dc5a88a18c739762be.tar.xz linux-8def12d9cd45b6abad87c5dc5a88a18c739762be.zip |
Merge branch 'for-linus' into for-next
Back-merge of UAC3 fixes for applying further enhancements.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/mixer.c | 8 | ||||
-rw-r--r-- | sound/usb/stream.c | 9 |
2 files changed, 16 insertions, 1 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 4987982250d5..173979e05e63 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -965,6 +965,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): diff --git a/sound/usb/stream.c b/sound/usb/stream.c index de8bbb304199..bce315240955 100644 --- a/sound/usb/stream.c +++ b/sound/usb/stream.c @@ -576,7 +576,7 @@ static int parse_uac_endpoint_attributes(struct snd_usb_audio *chip, if (protocol == UAC_VERSION_1) { attributes = csep->bmAttributes; - } else { + } else if (protocol == UAC_VERSION_2) { struct uac2_iso_endpoint_descriptor *csep2 = (struct uac2_iso_endpoint_descriptor *) csep; @@ -585,6 +585,13 @@ static int parse_uac_endpoint_attributes(struct snd_usb_audio *chip, /* emulate the endpoint attributes of a v1 device */ if (csep2->bmControls & UAC2_CONTROL_PITCH) attributes |= UAC_EP_CS_ATTR_PITCH_CONTROL; + } else { /* UAC_VERSION_3 */ + struct uac3_iso_endpoint_descriptor *csep3 = + (struct uac3_iso_endpoint_descriptor *) csep; + + /* emulate the endpoint attributes of a v1 device */ + if (le32_to_cpu(csep3->bmControls) & UAC2_CONTROL_PITCH) + attributes |= UAC_EP_CS_ATTR_PITCH_CONTROL; } return attributes; |