Skip to content

Commit 7c9a0fc

Browse files
committed
Merge tag 'sound-4.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "We have a core fix in the compat code for covering a potential race (double references), but it's a very minor change. The rest are all small device-specific quirks, as well as a correction of the new UAC3 support code" * tag 'sound-4.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: Use Class Specific EP for UAC3 devices. ALSA: hda/realtek - Clevo P950ER ALC1220 Fixup ALSA: usb: mixer: volume quirk for CM102-A+/102S+ ALSA: hda: Add Lenovo C50 All in one to the power_save blacklist ALSA: control: fix a redundant-copy issue
2 parents 3e9245c + c99f080 commit 7c9a0fc

File tree

5 files changed

+20
-3
lines changed

5 files changed

+20
-3
lines changed

sound/core/control_compat.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,7 @@ static int snd_ctl_elem_add_compat(struct snd_ctl_file *file,
396396
if (copy_from_user(&data->id, &data32->id, sizeof(data->id)) ||
397397
copy_from_user(&data->type, &data32->type, 3 * sizeof(u32)))
398398
goto error;
399-
if (get_user(data->owner, &data32->owner) ||
400-
get_user(data->type, &data32->type))
399+
if (get_user(data->owner, &data32->owner))
401400
goto error;
402401
switch (data->type) {
403402
case SNDRV_CTL_ELEM_TYPE_BOOLEAN:

sound/pci/hda/hda_intel.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2210,6 +2210,8 @@ static struct snd_pci_quirk power_save_blacklist[] = {
22102210
SND_PCI_QUIRK(0x1849, 0x0c0c, "Asrock B85M-ITX", 0),
22112211
/* https://bugzilla.redhat.com/show_bug.cgi?id=1525104 */
22122212
SND_PCI_QUIRK(0x1043, 0x8733, "Asus Prime X370-Pro", 0),
2213+
/* https://bugzilla.redhat.com/show_bug.cgi?id=1572975 */
2214+
SND_PCI_QUIRK(0x17aa, 0x36a7, "Lenovo C50 All in one", 0),
22132215
/* https://bugzilla.kernel.org/show_bug.cgi?id=198611 */
22142216
SND_PCI_QUIRK(0x17aa, 0x2227, "Lenovo X1 Carbon 3rd Gen", 0),
22152217
{}

sound/pci/hda/patch_realtek.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2363,6 +2363,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
23632363
SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
23642364
SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
23652365
SND_PCI_QUIRK(0x1558, 0x9501, "Clevo P950HR", ALC1220_FIXUP_CLEVO_P950),
2366+
SND_PCI_QUIRK(0x1558, 0x95e2, "Clevo P950ER", ALC1220_FIXUP_CLEVO_P950),
23662367
SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD),
23672368
SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD),
23682369
SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530),

sound/usb/mixer.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -967,6 +967,14 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval,
967967
}
968968
break;
969969

970+
case USB_ID(0x0d8c, 0x0103):
971+
if (!strcmp(kctl->id.name, "PCM Playback Volume")) {
972+
usb_audio_info(chip,
973+
"set volume quirk for CM102-A+/102S+\n");
974+
cval->min = -256;
975+
}
976+
break;
977+
970978
case USB_ID(0x0471, 0x0101):
971979
case USB_ID(0x0471, 0x0104):
972980
case USB_ID(0x0471, 0x0105):

sound/usb/stream.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ static int parse_uac_endpoint_attributes(struct snd_usb_audio *chip,
576576

577577
if (protocol == UAC_VERSION_1) {
578578
attributes = csep->bmAttributes;
579-
} else {
579+
} else if (protocol == UAC_VERSION_2) {
580580
struct uac2_iso_endpoint_descriptor *csep2 =
581581
(struct uac2_iso_endpoint_descriptor *) csep;
582582

@@ -585,6 +585,13 @@ static int parse_uac_endpoint_attributes(struct snd_usb_audio *chip,
585585
/* emulate the endpoint attributes of a v1 device */
586586
if (csep2->bmControls & UAC2_CONTROL_PITCH)
587587
attributes |= UAC_EP_CS_ATTR_PITCH_CONTROL;
588+
} else { /* UAC_VERSION_3 */
589+
struct uac3_iso_endpoint_descriptor *csep3 =
590+
(struct uac3_iso_endpoint_descriptor *) csep;
591+
592+
/* emulate the endpoint attributes of a v1 device */
593+
if (le32_to_cpu(csep3->bmControls) & UAC2_CONTROL_PITCH)
594+
attributes |= UAC_EP_CS_ATTR_PITCH_CONTROL;
588595
}
589596

590597
return attributes;

0 commit comments

Comments
 (0)