Commit c531577b authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'sound-4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "This contains the fixes for a few reported regression for HD-audio and
  USB-audio. All small, trivial, and boring"

* tag 'sound-4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Fix applying MSI dual-codec mobo quirk
  ALSA: usb: Avoid VLA in mixer_us16x08.c
  ALSA: usb: Fix a typo in Tascam US-16x08 mixer element
  Revert "ALSA: usb-audio: purge needless variable length array"
parents f8e72db3 d2c3b14e
...@@ -2324,11 +2324,11 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { ...@@ -2324,11 +2324,11 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_MBA11_VREF), SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_MBA11_VREF),
SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD), SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD),
SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD),
SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE), SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE),
SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS), SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD),
SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS), SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX), SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD), SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD),
SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD), SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD),
......
...@@ -698,16 +698,18 @@ static int snd_us16x08_meter_get(struct snd_kcontrol *kcontrol, ...@@ -698,16 +698,18 @@ static int snd_us16x08_meter_get(struct snd_kcontrol *kcontrol,
struct snd_usb_audio *chip = elem->head.mixer->chip; struct snd_usb_audio *chip = elem->head.mixer->chip;
struct snd_us16x08_meter_store *store = elem->private_data; struct snd_us16x08_meter_store *store = elem->private_data;
u8 meter_urb[64]; u8 meter_urb[64];
char tmp[sizeof(mix_init_msg2)] = {0};
switch (kcontrol->private_value) { switch (kcontrol->private_value) {
case 0: case 0: {
snd_us16x08_send_urb(chip, (char *)mix_init_msg1, char tmp[sizeof(mix_init_msg1)];
sizeof(mix_init_msg1));
memcpy(tmp, mix_init_msg1, sizeof(mix_init_msg1));
snd_us16x08_send_urb(chip, tmp, 4);
snd_us16x08_recv_urb(chip, meter_urb, snd_us16x08_recv_urb(chip, meter_urb,
sizeof(meter_urb)); sizeof(meter_urb));
kcontrol->private_value++; kcontrol->private_value++;
break; break;
}
case 1: case 1:
snd_us16x08_recv_urb(chip, meter_urb, snd_us16x08_recv_urb(chip, meter_urb,
sizeof(meter_urb)); sizeof(meter_urb));
...@@ -718,15 +720,18 @@ static int snd_us16x08_meter_get(struct snd_kcontrol *kcontrol, ...@@ -718,15 +720,18 @@ static int snd_us16x08_meter_get(struct snd_kcontrol *kcontrol,
sizeof(meter_urb)); sizeof(meter_urb));
kcontrol->private_value++; kcontrol->private_value++;
break; break;
case 3: case 3: {
char tmp[sizeof(mix_init_msg2)];
memcpy(tmp, mix_init_msg2, sizeof(mix_init_msg2)); memcpy(tmp, mix_init_msg2, sizeof(mix_init_msg2));
tmp[2] = snd_get_meter_comp_index(store); tmp[2] = snd_get_meter_comp_index(store);
snd_us16x08_send_urb(chip, tmp, sizeof(mix_init_msg2)); snd_us16x08_send_urb(chip, tmp, 10);
snd_us16x08_recv_urb(chip, meter_urb, snd_us16x08_recv_urb(chip, meter_urb,
sizeof(meter_urb)); sizeof(meter_urb));
kcontrol->private_value = 0; kcontrol->private_value = 0;
break; break;
} }
}
for (set = 0; set < 6; set++) for (set = 0; set < 6; set++)
get_meter_levels_from_urb(set, store, meter_urb); get_meter_levels_from_urb(set, store, meter_urb);
...@@ -1135,7 +1140,7 @@ static const struct snd_us16x08_control_params eq_controls[] = { ...@@ -1135,7 +1140,7 @@ static const struct snd_us16x08_control_params eq_controls[] = {
.control_id = SND_US16X08_ID_EQLOWMIDWIDTH, .control_id = SND_US16X08_ID_EQLOWMIDWIDTH,
.type = USB_MIXER_U8, .type = USB_MIXER_U8,
.num_channels = 16, .num_channels = 16,
.name = "EQ MidQLow Q", .name = "EQ MidLow Q",
}, },
{ /* EQ mid high gain */ { /* EQ mid high gain */
.kcontrol_new = &snd_us16x08_eq_gain_ctl, .kcontrol_new = &snd_us16x08_eq_gain_ctl,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment