mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 09:13:55 +08:00
sound fixes for 6.3-rc5
A collection of small fixes: - A potential deadlock fix for USB-audio, involving some change in PCM core side - A regression fix for probes of USB-audio devices with the vendor-specific PCM format bits - Two regression fixes for the old YMFPCI driver - A few HD-audio quirks as usual -----BEGIN PGP SIGNATURE----- iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmQkN0cOHHRpd2FpQHN1 c2UuZGUACgkQLtJE4w1nLE8xmhAAwKf45KZWeuWs/HtlnJe7tyaS88zyAjdw2JY0 +WiZsjIFruOC2NwHtrIBmpqC8baaCzUTEveorVo/5mHt1KsJmwl5Necz/2CkGmCQ VfAaaDoMMxh75VIod69i6vAY6L5tYjyNOjKrsYixdR90mtTlgCxhZumoAwoB5/2x TJZUL9cmRnHm3V/9eCzb0UOOPYVr/WRleUMovr31uuHHp/owNAKzPh960l+hax9/ Tf1nHPVtq17x/JKagSTKIyNgK53mwT8t+86S5gGgGiVdqGtj5mfxoRdgyRMR17mr WoL1bNX4V6Y/CbRTBxmHqWYb/RHLWvq5fcJRP1BGI/nMds0hCSW2/4ywKZYqgllr sHs1h3HJVl94X/sA5bCHFTB4EQC6n3Ci+TZmIbeAsMaTPq9E1M6jUB+6m3qKfnGk 7YW09vx460jy8X2rK3jdq7EAaCTOaiJzcGXLYlk6G2lyynRHVOh7MGp3opKHZB9k 9LlIdWjchpOZfeizhcpmvUegVKfS2JyIQEIyhGc9StNhFlPGj8+aRHX/U1D0W9op Ad1cnieSiN5b8+MOFJO4LeqOQ+yHYV1WJRNjCRztna2x5j/Hif8aV35JRLoGesnm UYcPcjTiWZVreFYbuKcCOkYRWN8FR9xUkLR1Hxj+BuenvKq5SEZINEokiuQddb2b TUS33XQ= =T5LZ -----END PGP SIGNATURE----- Merge tag 'sound-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes: - A potential deadlock fix for USB-audio, involving some change in PCM core side - A regression fix for probes of USB-audio devices with the vendor-specific PCM format bits - Two regression fixes for the old YMFPCI driver - A few HD-audio quirks as usual" * tag 'sound-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek: Add quirk for Lenovo ZhaoYang CF4620Z ALSA: ymfpci: Fix BUG_ON in probe function ALSA: ymfpci: Create card with device-managed snd_devm_card_new() ALSA: usb-audio: Fix regression on detection of Roland VS-100 ALSA: hda/realtek: Fix support for Dell Precision 3260 ALSA: usb-audio: Fix recursive locking at XRUN during syncing ALSA: hda/conexant: Partial revert of a quirk for Lenovo ALSA: hda/realtek: Add quirks for some Clevo laptops
This commit is contained in:
commit
8bb95a1662
@ -2155,6 +2155,8 @@ int pcm_lib_apply_appl_ptr(struct snd_pcm_substream *substream,
|
||||
ret = substream->ops->ack(substream);
|
||||
if (ret < 0) {
|
||||
runtime->control->appl_ptr = old_appl_ptr;
|
||||
if (ret == -EPIPE)
|
||||
__snd_pcm_xrun(substream);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
@ -980,7 +980,10 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {
|
||||
SND_PCI_QUIRK(0x17aa, 0x3905, "Lenovo G50-30", CXT_FIXUP_STEREO_DMIC),
|
||||
SND_PCI_QUIRK(0x17aa, 0x390b, "Lenovo G50-80", CXT_FIXUP_STEREO_DMIC),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_PINCFG_LENOVO_NOTEBOOK),
|
||||
/* NOTE: we'd need to extend the quirk for 17aa:3977 as the same
|
||||
* PCI SSID is used on multiple Lenovo models
|
||||
*/
|
||||
SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_FIXUP_STEREO_DMIC),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo G50-70", CXT_FIXUP_STEREO_DMIC),
|
||||
SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC),
|
||||
SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", CXT_FIXUP_THINKPAD_ACPI),
|
||||
@ -1003,6 +1006,7 @@ static const struct hda_model_fixup cxt5066_fixup_models[] = {
|
||||
{ .id = CXT_FIXUP_MUTE_LED_GPIO, .name = "mute-led-gpio" },
|
||||
{ .id = CXT_FIXUP_HP_ZBOOK_MUTE_LED, .name = "hp-zbook-mute-led" },
|
||||
{ .id = CXT_FIXUP_HP_MIC_NO_PRESENCE, .name = "hp-mic-fix" },
|
||||
{ .id = CXT_PINCFG_LENOVO_NOTEBOOK, .name = "lenovo-20149" },
|
||||
{}
|
||||
};
|
||||
|
||||
|
@ -2631,6 +2631,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK(0x1558, 0x65f1, "Clevo PC50HS", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK(0x1558, 0x65f5, "Clevo PD50PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK(0x1558, 0x66a2, "Clevo PE60RNE", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK(0x1558, 0x67e5, "Clevo PC70D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
@ -2651,6 +2652,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1558, 0x96e1, "Clevo P960[ER][CDFN]-K", ALC1220_FIXUP_CLEVO_P950),
|
||||
SND_PCI_QUIRK(0x1558, 0x97e1, "Clevo P970[ER][CDFN]", ALC1220_FIXUP_CLEVO_P950),
|
||||
SND_PCI_QUIRK(0x1558, 0x97e2, "Clevo P970RC-M", ALC1220_FIXUP_CLEVO_P950),
|
||||
SND_PCI_QUIRK(0x1558, 0xd502, "Clevo PD50SNE", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
|
||||
SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD),
|
||||
SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530),
|
||||
@ -9260,7 +9262,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK),
|
||||
SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1028, 0x0ac9, "Dell Precision 3260", ALC295_FIXUP_CHROME_BOOK),
|
||||
SND_PCI_QUIRK(0x1028, 0x0ac9, "Dell Precision 3260", ALC283_FIXUP_CHROME_BOOK),
|
||||
SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK),
|
||||
SND_PCI_QUIRK(0x1028, 0x0b1a, "Dell Precision 5570", ALC289_FIXUP_DUAL_SPK),
|
||||
SND_PCI_QUIRK(0x1028, 0x0b37, "Dell Inspiron 16 Plus 7620 2-in-1", ALC295_FIXUP_DELL_INSPIRON_TOP_SPEAKERS),
|
||||
@ -9575,6 +9577,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1558, 0x5101, "Clevo S510WU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x5157, "Clevo W517GU1", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x51a1, "Clevo NS50MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x5630, "Clevo NP50RNJS", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x70a1, "Clevo NB70T[HJK]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x70b3, "Clevo NK70SB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0x70f2, "Clevo NH79EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
@ -9609,6 +9612,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1558, 0x971d, "Clevo N970T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0xa500, "Clevo NL5[03]RU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0xa600, "Clevo NL50NU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0xa671, "Clevo NP70SN[CDE]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0xb018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0xb019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1558, 0xb022, "Clevo NH77D[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
|
||||
@ -9709,6 +9713,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
|
||||
SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
|
||||
SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
|
||||
SND_PCI_QUIRK(0x17aa, 0x9e56, "Lenovo ZhaoYang CF4620Z", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
|
||||
SND_PCI_QUIRK(0x1849, 0x1233, "ASRock NUC Box 1100", ALC233_FIXUP_NO_AUDIO_JACK),
|
||||
SND_PCI_QUIRK(0x1849, 0xa233, "Positivo Master C6300", ALC269_FIXUP_HEADSET_MIC),
|
||||
SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),
|
||||
|
@ -170,7 +170,7 @@ static int snd_card_ymfpci_probe(struct pci_dev *pci,
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
|
||||
err = snd_devm_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
|
||||
sizeof(*chip), &card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
@ -2165,7 +2165,7 @@ static int snd_ymfpci_memalloc(struct snd_ymfpci *chip)
|
||||
chip->work_base = ptr;
|
||||
chip->work_base_addr = ptr_addr;
|
||||
|
||||
snd_BUG_ON(ptr + chip->work_size !=
|
||||
snd_BUG_ON(ptr + PAGE_ALIGN(chip->work_size) !=
|
||||
chip->work_ptr->area + chip->work_ptr->bytes);
|
||||
|
||||
snd_ymfpci_writel(chip, YDSXGR_PLAYCTRLBASE, chip->bank_base_playback_addr);
|
||||
|
@ -455,8 +455,8 @@ static void push_back_to_ready_list(struct snd_usb_endpoint *ep,
|
||||
* This function is used both for implicit feedback endpoints and in low-
|
||||
* latency playback mode.
|
||||
*/
|
||||
void snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep,
|
||||
bool in_stream_lock)
|
||||
int snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep,
|
||||
bool in_stream_lock)
|
||||
{
|
||||
bool implicit_fb = snd_usb_endpoint_implicit_feedback_sink(ep);
|
||||
|
||||
@ -480,7 +480,7 @@ void snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep,
|
||||
spin_unlock_irqrestore(&ep->lock, flags);
|
||||
|
||||
if (ctx == NULL)
|
||||
return;
|
||||
break;
|
||||
|
||||
/* copy over the length information */
|
||||
if (implicit_fb) {
|
||||
@ -495,11 +495,14 @@ void snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep,
|
||||
break;
|
||||
if (err < 0) {
|
||||
/* push back to ready list again for -EAGAIN */
|
||||
if (err == -EAGAIN)
|
||||
if (err == -EAGAIN) {
|
||||
push_back_to_ready_list(ep, ctx);
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
if (!in_stream_lock)
|
||||
notify_xrun(ep);
|
||||
return;
|
||||
return -EPIPE;
|
||||
}
|
||||
|
||||
err = usb_submit_urb(ctx->urb, GFP_ATOMIC);
|
||||
@ -507,13 +510,16 @@ void snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep,
|
||||
usb_audio_err(ep->chip,
|
||||
"Unable to submit urb #%d: %d at %s\n",
|
||||
ctx->index, err, __func__);
|
||||
notify_xrun(ep);
|
||||
return;
|
||||
if (!in_stream_lock)
|
||||
notify_xrun(ep);
|
||||
return -EPIPE;
|
||||
}
|
||||
|
||||
set_bit(ctx->index, &ep->active_mask);
|
||||
atomic_inc(&ep->submitted_urbs);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -52,7 +52,7 @@ int snd_usb_endpoint_implicit_feedback_sink(struct snd_usb_endpoint *ep);
|
||||
int snd_usb_endpoint_next_packet_size(struct snd_usb_endpoint *ep,
|
||||
struct snd_urb_ctx *ctx, int idx,
|
||||
unsigned int avail);
|
||||
void snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep,
|
||||
bool in_stream_lock);
|
||||
int snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep,
|
||||
bool in_stream_lock);
|
||||
|
||||
#endif /* __USBAUDIO_ENDPOINT_H */
|
||||
|
@ -39,8 +39,12 @@ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip,
|
||||
case UAC_VERSION_1:
|
||||
default: {
|
||||
struct uac_format_type_i_discrete_descriptor *fmt = _fmt;
|
||||
if (format >= 64)
|
||||
return 0; /* invalid format */
|
||||
if (format >= 64) {
|
||||
usb_audio_info(chip,
|
||||
"%u:%d: invalid format type 0x%llx is detected, processed as PCM\n",
|
||||
fp->iface, fp->altsetting, format);
|
||||
format = UAC_FORMAT_TYPE_I_PCM;
|
||||
}
|
||||
sample_width = fmt->bBitResolution;
|
||||
sample_bytes = fmt->bSubframeSize;
|
||||
format = 1ULL << format;
|
||||
|
@ -1639,7 +1639,7 @@ static int snd_usb_pcm_playback_ack(struct snd_pcm_substream *substream)
|
||||
* outputs here
|
||||
*/
|
||||
if (!ep->active_mask)
|
||||
snd_usb_queue_pending_output_urbs(ep, true);
|
||||
return snd_usb_queue_pending_output_urbs(ep, true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user