Skip to content

Commit 8bb95a1

Browse files
committed
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
2 parents 4ee7722 + 52aad39 commit 8bb95a1

File tree

9 files changed

+38
-17
lines changed

9 files changed

+38
-17
lines changed

sound/core/pcm_lib.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,6 +2155,8 @@ int pcm_lib_apply_appl_ptr(struct snd_pcm_substream *substream,
21552155
ret = substream->ops->ack(substream);
21562156
if (ret < 0) {
21572157
runtime->control->appl_ptr = old_appl_ptr;
2158+
if (ret == -EPIPE)
2159+
__snd_pcm_xrun(substream);
21582160
return ret;
21592161
}
21602162
}

sound/pci/hda/patch_conexant.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,10 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {
980980
SND_PCI_QUIRK(0x17aa, 0x3905, "Lenovo G50-30", CXT_FIXUP_STEREO_DMIC),
981981
SND_PCI_QUIRK(0x17aa, 0x390b, "Lenovo G50-80", CXT_FIXUP_STEREO_DMIC),
982982
SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC),
983-
SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_PINCFG_LENOVO_NOTEBOOK),
983+
/* NOTE: we'd need to extend the quirk for 17aa:3977 as the same
984+
* PCI SSID is used on multiple Lenovo models
985+
*/
986+
SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_FIXUP_STEREO_DMIC),
984987
SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo G50-70", CXT_FIXUP_STEREO_DMIC),
985988
SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC),
986989
SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", CXT_FIXUP_THINKPAD_ACPI),
@@ -1003,6 +1006,7 @@ static const struct hda_model_fixup cxt5066_fixup_models[] = {
10031006
{ .id = CXT_FIXUP_MUTE_LED_GPIO, .name = "mute-led-gpio" },
10041007
{ .id = CXT_FIXUP_HP_ZBOOK_MUTE_LED, .name = "hp-zbook-mute-led" },
10051008
{ .id = CXT_FIXUP_HP_MIC_NO_PRESENCE, .name = "hp-mic-fix" },
1009+
{ .id = CXT_PINCFG_LENOVO_NOTEBOOK, .name = "lenovo-20149" },
10061010
{}
10071011
};
10081012

sound/pci/hda/patch_realtek.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2631,6 +2631,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
26312631
SND_PCI_QUIRK(0x1558, 0x65e5, "Clevo PC50D[PRS](?:-D|-G)?", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
26322632
SND_PCI_QUIRK(0x1558, 0x65f1, "Clevo PC50HS", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
26332633
SND_PCI_QUIRK(0x1558, 0x65f5, "Clevo PD50PN[NRT]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2634+
SND_PCI_QUIRK(0x1558, 0x66a2, "Clevo PE60RNE", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
26342635
SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
26352636
SND_PCI_QUIRK(0x1558, 0x67e1, "Clevo PB71[DE][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
26362637
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[] = {
26512652
SND_PCI_QUIRK(0x1558, 0x96e1, "Clevo P960[ER][CDFN]-K", ALC1220_FIXUP_CLEVO_P950),
26522653
SND_PCI_QUIRK(0x1558, 0x97e1, "Clevo P970[ER][CDFN]", ALC1220_FIXUP_CLEVO_P950),
26532654
SND_PCI_QUIRK(0x1558, 0x97e2, "Clevo P970RC-M", ALC1220_FIXUP_CLEVO_P950),
2655+
SND_PCI_QUIRK(0x1558, 0xd502, "Clevo PD50SNE", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
26542656
SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD),
26552657
SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD),
26562658
SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530),
@@ -9260,7 +9262,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
92609262
SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precision 5560", ALC289_FIXUP_DUAL_SPK),
92619263
SND_PCI_QUIRK(0x1028, 0x0a9d, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
92629264
SND_PCI_QUIRK(0x1028, 0x0a9e, "Dell Latitude 5430", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE),
9263-
SND_PCI_QUIRK(0x1028, 0x0ac9, "Dell Precision 3260", ALC295_FIXUP_CHROME_BOOK),
9265+
SND_PCI_QUIRK(0x1028, 0x0ac9, "Dell Precision 3260", ALC283_FIXUP_CHROME_BOOK),
92649266
SND_PCI_QUIRK(0x1028, 0x0b19, "Dell XPS 15 9520", ALC289_FIXUP_DUAL_SPK),
92659267
SND_PCI_QUIRK(0x1028, 0x0b1a, "Dell Precision 5570", ALC289_FIXUP_DUAL_SPK),
92669268
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[] = {
95759577
SND_PCI_QUIRK(0x1558, 0x5101, "Clevo S510WU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
95769578
SND_PCI_QUIRK(0x1558, 0x5157, "Clevo W517GU1", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
95779579
SND_PCI_QUIRK(0x1558, 0x51a1, "Clevo NS50MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9580+
SND_PCI_QUIRK(0x1558, 0x5630, "Clevo NP50RNJS", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
95789581
SND_PCI_QUIRK(0x1558, 0x70a1, "Clevo NB70T[HJK]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
95799582
SND_PCI_QUIRK(0x1558, 0x70b3, "Clevo NK70SB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
95809583
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[] = {
96099612
SND_PCI_QUIRK(0x1558, 0x971d, "Clevo N970T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
96109613
SND_PCI_QUIRK(0x1558, 0xa500, "Clevo NL5[03]RU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
96119614
SND_PCI_QUIRK(0x1558, 0xa600, "Clevo NL50NU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
9615+
SND_PCI_QUIRK(0x1558, 0xa671, "Clevo NP70SN[CDE]", ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
96129616
SND_PCI_QUIRK(0x1558, 0xb018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
96139617
SND_PCI_QUIRK(0x1558, 0xb019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
96149618
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[] = {
97099713
SND_PCI_QUIRK(0x17aa, 0x511e, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
97109714
SND_PCI_QUIRK(0x17aa, 0x511f, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
97119715
SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
9716+
SND_PCI_QUIRK(0x17aa, 0x9e56, "Lenovo ZhaoYang CF4620Z", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
97129717
SND_PCI_QUIRK(0x1849, 0x1233, "ASRock NUC Box 1100", ALC233_FIXUP_NO_AUDIO_JACK),
97139718
SND_PCI_QUIRK(0x1849, 0xa233, "Positivo Master C6300", ALC269_FIXUP_HEADSET_MIC),
97149719
SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),

sound/pci/ymfpci/ymfpci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ static int snd_card_ymfpci_probe(struct pci_dev *pci,
170170
return -ENOENT;
171171
}
172172

173-
err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
173+
err = snd_devm_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
174174
sizeof(*chip), &card);
175175
if (err < 0)
176176
return err;

sound/pci/ymfpci/ymfpci_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2165,7 +2165,7 @@ static int snd_ymfpci_memalloc(struct snd_ymfpci *chip)
21652165
chip->work_base = ptr;
21662166
chip->work_base_addr = ptr_addr;
21672167

2168-
snd_BUG_ON(ptr + chip->work_size !=
2168+
snd_BUG_ON(ptr + PAGE_ALIGN(chip->work_size) !=
21692169
chip->work_ptr->area + chip->work_ptr->bytes);
21702170

21712171
snd_ymfpci_writel(chip, YDSXGR_PLAYCTRLBASE, chip->bank_base_playback_addr);

sound/usb/endpoint.c

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,8 @@ static void push_back_to_ready_list(struct snd_usb_endpoint *ep,
455455
* This function is used both for implicit feedback endpoints and in low-
456456
* latency playback mode.
457457
*/
458-
void snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep,
459-
bool in_stream_lock)
458+
int snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep,
459+
bool in_stream_lock)
460460
{
461461
bool implicit_fb = snd_usb_endpoint_implicit_feedback_sink(ep);
462462

@@ -480,7 +480,7 @@ void snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep,
480480
spin_unlock_irqrestore(&ep->lock, flags);
481481

482482
if (ctx == NULL)
483-
return;
483+
break;
484484

485485
/* copy over the length information */
486486
if (implicit_fb) {
@@ -495,25 +495,31 @@ void snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep,
495495
break;
496496
if (err < 0) {
497497
/* push back to ready list again for -EAGAIN */
498-
if (err == -EAGAIN)
498+
if (err == -EAGAIN) {
499499
push_back_to_ready_list(ep, ctx);
500-
else
500+
break;
501+
}
502+
503+
if (!in_stream_lock)
501504
notify_xrun(ep);
502-
return;
505+
return -EPIPE;
503506
}
504507

505508
err = usb_submit_urb(ctx->urb, GFP_ATOMIC);
506509
if (err < 0) {
507510
usb_audio_err(ep->chip,
508511
"Unable to submit urb #%d: %d at %s\n",
509512
ctx->index, err, __func__);
510-
notify_xrun(ep);
511-
return;
513+
if (!in_stream_lock)
514+
notify_xrun(ep);
515+
return -EPIPE;
512516
}
513517

514518
set_bit(ctx->index, &ep->active_mask);
515519
atomic_inc(&ep->submitted_urbs);
516520
}
521+
522+
return 0;
517523
}
518524

519525
/*

sound/usb/endpoint.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ int snd_usb_endpoint_implicit_feedback_sink(struct snd_usb_endpoint *ep);
5252
int snd_usb_endpoint_next_packet_size(struct snd_usb_endpoint *ep,
5353
struct snd_urb_ctx *ctx, int idx,
5454
unsigned int avail);
55-
void snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep,
56-
bool in_stream_lock);
55+
int snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep,
56+
bool in_stream_lock);
5757

5858
#endif /* __USBAUDIO_ENDPOINT_H */

sound/usb/format.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip,
3939
case UAC_VERSION_1:
4040
default: {
4141
struct uac_format_type_i_discrete_descriptor *fmt = _fmt;
42-
if (format >= 64)
43-
return 0; /* invalid format */
42+
if (format >= 64) {
43+
usb_audio_info(chip,
44+
"%u:%d: invalid format type 0x%llx is detected, processed as PCM\n",
45+
fp->iface, fp->altsetting, format);
46+
format = UAC_FORMAT_TYPE_I_PCM;
47+
}
4448
sample_width = fmt->bBitResolution;
4549
sample_bytes = fmt->bSubframeSize;
4650
format = 1ULL << format;

sound/usb/pcm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1639,7 +1639,7 @@ static int snd_usb_pcm_playback_ack(struct snd_pcm_substream *substream)
16391639
* outputs here
16401640
*/
16411641
if (!ep->active_mask)
1642-
snd_usb_queue_pending_output_urbs(ep, true);
1642+
return snd_usb_queue_pending_output_urbs(ep, true);
16431643
return 0;
16441644
}
16451645

0 commit comments

Comments
 (0)