Commit a238ac2d authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'sound-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into master

Pull sound fixes from Takashi Iwai:
 "No surprise here, just a few device-specific small fixes: two fixes
  for USB LINE6 and one for USB-audio drivers wrt syzkaller fuzzer
  issues, while the rest are all HD-audio Realtek quirks"

* tag 'sound-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda/realtek - fixup for yet another Intel reference board
  ALSA: hda/realtek - Enable Speaker for ASUS UX563
  ALSA: hda/realtek - Enable Speaker for ASUS UX533 and UX534
  ALSA: hda/realtek: Enable headset mic of Acer TravelMate B311R-31 with ALC256
  ALSA: hda/realtek: enable headset mic of ASUS ROG Zephyrus G14(G401) series with ALC289
  ALSA: hda/realtek - change to suitable link model for ASUS platform
  ALSA: usb-audio: Fix race against the error recovery URB submission
  ALSA: line6: Sync the pending work cancel at disconnection
  ALSA: line6: Perform sanity check for each URB creation
parents 88825726 5734e509
...@@ -6152,6 +6152,8 @@ enum { ...@@ -6152,6 +6152,8 @@ enum {
ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS, ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS,
ALC269VC_FIXUP_ACER_HEADSET_MIC, ALC269VC_FIXUP_ACER_HEADSET_MIC,
ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE, ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE,
ALC289_FIXUP_ASUS_G401,
ALC256_FIXUP_ACER_MIC_NO_PRESENCE,
}; };
static const struct hda_fixup alc269_fixups[] = { static const struct hda_fixup alc269_fixups[] = {
...@@ -7117,7 +7119,7 @@ static const struct hda_fixup alc269_fixups[] = { ...@@ -7117,7 +7119,7 @@ static const struct hda_fixup alc269_fixups[] = {
{ } { }
}, },
.chained = true, .chained = true,
.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC .chain_id = ALC269_FIXUP_HEADSET_MIC
}, },
[ALC294_FIXUP_ASUS_HEADSET_MIC] = { [ALC294_FIXUP_ASUS_HEADSET_MIC] = {
.type = HDA_FIXUP_PINS, .type = HDA_FIXUP_PINS,
...@@ -7126,7 +7128,7 @@ static const struct hda_fixup alc269_fixups[] = { ...@@ -7126,7 +7128,7 @@ static const struct hda_fixup alc269_fixups[] = {
{ } { }
}, },
.chained = true, .chained = true,
.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC .chain_id = ALC269_FIXUP_HEADSET_MIC
}, },
[ALC294_FIXUP_ASUS_SPK] = { [ALC294_FIXUP_ASUS_SPK] = {
.type = HDA_FIXUP_VERBS, .type = HDA_FIXUP_VERBS,
...@@ -7134,6 +7136,8 @@ static const struct hda_fixup alc269_fixups[] = { ...@@ -7134,6 +7136,8 @@ static const struct hda_fixup alc269_fixups[] = {
/* Set EAPD high */ /* Set EAPD high */
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x40 }, { 0x20, AC_VERB_SET_COEF_INDEX, 0x40 },
{ 0x20, AC_VERB_SET_PROC_COEF, 0x8800 }, { 0x20, AC_VERB_SET_PROC_COEF, 0x8800 },
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x0f },
{ 0x20, AC_VERB_SET_PROC_COEF, 0x7774 },
{ } { }
}, },
.chained = true, .chained = true,
...@@ -7359,6 +7363,22 @@ static const struct hda_fixup alc269_fixups[] = { ...@@ -7359,6 +7363,22 @@ static const struct hda_fixup alc269_fixups[] = {
.chained = true, .chained = true,
.chain_id = ALC269_FIXUP_HEADSET_MIC .chain_id = ALC269_FIXUP_HEADSET_MIC
}, },
[ALC289_FIXUP_ASUS_G401] = {
.type = HDA_FIXUP_PINS,
.v.pins = (const struct hda_pintbl[]) {
{ 0x19, 0x03a11020 }, /* headset mic with jack detect */
{ }
},
},
[ALC256_FIXUP_ACER_MIC_NO_PRESENCE] = {
.type = HDA_FIXUP_PINS,
.v.pins = (const struct hda_pintbl[]) {
{ 0x19, 0x02a11120 }, /* use as headset mic, without its own jack detect */
{ }
},
.chained = true,
.chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
},
}; };
static const struct snd_pci_quirk alc269_fixup_tbl[] = { static const struct snd_pci_quirk alc269_fixup_tbl[] = {
...@@ -7387,6 +7407,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { ...@@ -7387,6 +7407,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC), SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC), SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC),
SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC), SND_PCI_QUIRK(0x1025, 0x1330, "Acer TravelMate X514-51T", ALC255_FIXUP_ACER_HEADSET_MIC),
SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS), SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS),
SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X), SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X),
...@@ -7530,6 +7551,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { ...@@ -7530,6 +7551,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK), SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK),
SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC), SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),
SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC), SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC),
SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE),
SND_PCI_QUIRK(0x1043, 0x19ce, "ASUS B9450FA", ALC294_FIXUP_ASUS_HPE), SND_PCI_QUIRK(0x1043, 0x19ce, "ASUS B9450FA", ALC294_FIXUP_ASUS_HPE),
SND_PCI_QUIRK(0x1043, 0x19e1, "ASUS UX581LV", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1043, 0x19e1, "ASUS UX581LV", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
...@@ -7539,6 +7561,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { ...@@ -7539,6 +7561,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC), SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC),
SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_G401),
SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2), SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2),
SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC), SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC),
SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC), SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC),
...@@ -7558,6 +7581,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { ...@@ -7558,6 +7581,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC), SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC),
SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC), SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE), SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE),
SND_PCI_QUIRK(0x10ec, 0x1230, "Intel Reference board", ALC225_FIXUP_HEADSET_JACK),
SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE), SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE),
SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC), SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),
SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),
......
...@@ -286,6 +286,8 @@ int line6_create_audio_in_urbs(struct snd_line6_pcm *line6pcm) ...@@ -286,6 +286,8 @@ int line6_create_audio_in_urbs(struct snd_line6_pcm *line6pcm)
urb->interval = LINE6_ISO_INTERVAL; urb->interval = LINE6_ISO_INTERVAL;
urb->error_count = 0; urb->error_count = 0;
urb->complete = audio_in_callback; urb->complete = audio_in_callback;
if (usb_urb_ep_type_check(urb))
return -EINVAL;
} }
return 0; return 0;
......
...@@ -840,7 +840,7 @@ void line6_disconnect(struct usb_interface *interface) ...@@ -840,7 +840,7 @@ void line6_disconnect(struct usb_interface *interface)
if (WARN_ON(usbdev != line6->usbdev)) if (WARN_ON(usbdev != line6->usbdev))
return; return;
cancel_delayed_work(&line6->startup_work); cancel_delayed_work_sync(&line6->startup_work);
if (line6->urb_listen != NULL) if (line6->urb_listen != NULL)
line6_stop_listen(line6); line6_stop_listen(line6);
......
...@@ -431,6 +431,8 @@ int line6_create_audio_out_urbs(struct snd_line6_pcm *line6pcm) ...@@ -431,6 +431,8 @@ int line6_create_audio_out_urbs(struct snd_line6_pcm *line6pcm)
urb->interval = LINE6_ISO_INTERVAL; urb->interval = LINE6_ISO_INTERVAL;
urb->error_count = 0; urb->error_count = 0;
urb->complete = audio_out_callback; urb->complete = audio_out_callback;
if (usb_urb_ep_type_check(urb))
return -EINVAL;
} }
return 0; return 0;
......
...@@ -1499,6 +1499,8 @@ void snd_usbmidi_disconnect(struct list_head *p) ...@@ -1499,6 +1499,8 @@ void snd_usbmidi_disconnect(struct list_head *p)
spin_unlock_irq(&umidi->disc_lock); spin_unlock_irq(&umidi->disc_lock);
up_write(&umidi->disc_rwsem); up_write(&umidi->disc_rwsem);
del_timer_sync(&umidi->error_timer);
for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) { for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
struct snd_usb_midi_endpoint *ep = &umidi->endpoints[i]; struct snd_usb_midi_endpoint *ep = &umidi->endpoints[i];
if (ep->out) if (ep->out)
...@@ -1525,7 +1527,6 @@ void snd_usbmidi_disconnect(struct list_head *p) ...@@ -1525,7 +1527,6 @@ void snd_usbmidi_disconnect(struct list_head *p)
ep->in = NULL; ep->in = NULL;
} }
} }
del_timer_sync(&umidi->error_timer);
} }
EXPORT_SYMBOL(snd_usbmidi_disconnect); EXPORT_SYMBOL(snd_usbmidi_disconnect);
...@@ -2301,16 +2302,22 @@ void snd_usbmidi_input_stop(struct list_head *p) ...@@ -2301,16 +2302,22 @@ void snd_usbmidi_input_stop(struct list_head *p)
} }
EXPORT_SYMBOL(snd_usbmidi_input_stop); EXPORT_SYMBOL(snd_usbmidi_input_stop);
static void snd_usbmidi_input_start_ep(struct snd_usb_midi_in_endpoint *ep) static void snd_usbmidi_input_start_ep(struct snd_usb_midi *umidi,
struct snd_usb_midi_in_endpoint *ep)
{ {
unsigned int i; unsigned int i;
unsigned long flags;
if (!ep) if (!ep)
return; return;
for (i = 0; i < INPUT_URBS; ++i) { for (i = 0; i < INPUT_URBS; ++i) {
struct urb *urb = ep->urbs[i]; struct urb *urb = ep->urbs[i];
urb->dev = ep->umidi->dev; spin_lock_irqsave(&umidi->disc_lock, flags);
snd_usbmidi_submit_urb(urb, GFP_KERNEL); if (!atomic_read(&urb->use_count)) {
urb->dev = ep->umidi->dev;
snd_usbmidi_submit_urb(urb, GFP_ATOMIC);
}
spin_unlock_irqrestore(&umidi->disc_lock, flags);
} }
} }
...@@ -2326,7 +2333,7 @@ void snd_usbmidi_input_start(struct list_head *p) ...@@ -2326,7 +2333,7 @@ void snd_usbmidi_input_start(struct list_head *p)
if (umidi->input_running || !umidi->opened[1]) if (umidi->input_running || !umidi->opened[1])
return; return;
for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i)
snd_usbmidi_input_start_ep(umidi->endpoints[i].in); snd_usbmidi_input_start_ep(umidi, umidi->endpoints[i].in);
umidi->input_running = 1; umidi->input_running = 1;
} }
EXPORT_SYMBOL(snd_usbmidi_input_start); EXPORT_SYMBOL(snd_usbmidi_input_start);
......
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