Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull sound fixes from Takashi Iwai:
"Nothing to worry at this stage but all nice small changes:

- A regression fix for AMD GPU detection in HD-audio

- A long-standing sleep-in-atomic fix for an ice1724 device

- Usual suspects, the device-specific quirks for HD- and USB-audio"

* tag 'sound-5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda/realtek - Enable the bass speaker of ASUS UX431FLC
ALSA: ice1724: Fix sleep-in-atomic in Infrasonic Quartet support code
ALSA: hda/realtek - Add Bass Speaker and fixed dac for bass speaker
ALSA: hda - Apply sync-write workaround to old Intel platforms, too
ALSA: hda/hdmi - fix atpx_present when CLASS is not VGA
ALSA: usb-audio: fix set_format altsetting sanity check
ALSA: hda/realtek - Add headset Mic no shutup for ALC283
ALSA: usb-audio: set the interface format after resume on Dell WD19

+92 -29
+16 -5
sound/pci/hda/hda_intel.c
··· 282 282 283 283 /* quirks for old Intel chipsets */ 284 284 #define AZX_DCAPS_INTEL_ICH \ 285 - (AZX_DCAPS_OLD_SSYNC | AZX_DCAPS_NO_ALIGN_BUFSIZE) 285 + (AZX_DCAPS_OLD_SSYNC | AZX_DCAPS_NO_ALIGN_BUFSIZE |\ 286 + AZX_DCAPS_SYNC_WRITE) 286 287 287 288 /* quirks for Intel PCH */ 288 289 #define AZX_DCAPS_INTEL_PCH_BASE \ 289 290 (AZX_DCAPS_NO_ALIGN_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY |\ 290 - AZX_DCAPS_SNOOP_TYPE(SCH)) 291 + AZX_DCAPS_SNOOP_TYPE(SCH) | AZX_DCAPS_SYNC_WRITE) 291 292 292 293 /* PCH up to IVB; no runtime PM; bind with i915 gfx */ 293 294 #define AZX_DCAPS_INTEL_PCH_NOPM \ ··· 303 302 #define AZX_DCAPS_INTEL_HASWELL \ 304 303 (/*AZX_DCAPS_ALIGN_BUFSIZE |*/ AZX_DCAPS_COUNT_LPIB_DELAY |\ 305 304 AZX_DCAPS_PM_RUNTIME | AZX_DCAPS_I915_COMPONENT |\ 306 - AZX_DCAPS_SNOOP_TYPE(SCH)) 305 + AZX_DCAPS_SNOOP_TYPE(SCH) | AZX_DCAPS_SYNC_WRITE) 307 306 308 307 /* Broadwell HDMI can't use position buffer reliably, force to use LPIB */ 309 308 #define AZX_DCAPS_INTEL_BROADWELL \ 310 309 (/*AZX_DCAPS_ALIGN_BUFSIZE |*/ AZX_DCAPS_POSFIX_LPIB |\ 311 310 AZX_DCAPS_PM_RUNTIME | AZX_DCAPS_I915_COMPONENT |\ 312 - AZX_DCAPS_SNOOP_TYPE(SCH)) 311 + AZX_DCAPS_SNOOP_TYPE(SCH) | AZX_DCAPS_SYNC_WRITE) 313 312 314 313 #define AZX_DCAPS_INTEL_BAYTRAIL \ 315 314 (AZX_DCAPS_INTEL_PCH_BASE | AZX_DCAPS_I915_COMPONENT) ··· 1411 1410 acpi_handle dhandle, atpx_handle; 1412 1411 acpi_status status; 1413 1412 1414 - while ((pdev = pci_get_class(PCI_BASE_CLASS_DISPLAY << 16, pdev)) != NULL) { 1413 + while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) { 1414 + dhandle = ACPI_HANDLE(&pdev->dev); 1415 + if (dhandle) { 1416 + status = acpi_get_handle(dhandle, "ATPX", &atpx_handle); 1417 + if (!ACPI_FAILURE(status)) { 1418 + pci_dev_put(pdev); 1419 + return true; 1420 + } 1421 + } 1422 + } 1423 + while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_OTHER << 8, pdev)) != NULL) { 1415 1424 dhandle = ACPI_HANDLE(&pdev->dev); 1416 1425 if (dhandle) { 1417 1426 status = acpi_get_handle(dhandle, "ATPX", &atpx_handle);
+33 -15
sound/pci/hda/patch_realtek.c
··· 501 501 struct alc_spec *spec = codec->spec; 502 502 503 503 switch (codec->core.vendor_id) { 504 + case 0x10ec0283: 504 505 case 0x10ec0286: 505 506 case 0x10ec0288: 506 507 case 0x10ec0298: ··· 5905 5904 ALC256_FIXUP_ASUS_HEADSET_MIC, 5906 5905 ALC256_FIXUP_ASUS_MIC_NO_PRESENCE, 5907 5906 ALC299_FIXUP_PREDATOR_SPK, 5908 - ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC, 5909 5907 ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, 5910 - ALC294_FIXUP_ASUS_INTSPK_GPIO, 5908 + ALC289_FIXUP_DELL_SPK2, 5909 + ALC289_FIXUP_DUAL_SPK, 5910 + ALC294_FIXUP_SPK2_TO_DAC1, 5911 + ALC294_FIXUP_ASUS_DUAL_SPK, 5912 + 5911 5913 }; 5912 5914 5913 5915 static const struct hda_fixup alc269_fixups[] = { ··· 6985 6981 { } 6986 6982 } 6987 6983 }, 6988 - [ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC] = { 6989 - .type = HDA_FIXUP_PINS, 6990 - .v.pins = (const struct hda_pintbl[]) { 6991 - { 0x14, 0x411111f0 }, /* disable confusing internal speaker */ 6992 - { 0x19, 0x04a11150 }, /* use as headset mic, without its own jack detect */ 6993 - { } 6994 - }, 6995 - .chained = true, 6996 - .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 6997 - }, 6998 6984 [ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE] = { 6999 6985 .type = HDA_FIXUP_PINS, 7000 6986 .v.pins = (const struct hda_pintbl[]) { ··· 6995 7001 .chained = true, 6996 7002 .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE 6997 7003 }, 6998 - [ALC294_FIXUP_ASUS_INTSPK_GPIO] = { 7004 + [ALC289_FIXUP_DELL_SPK2] = { 7005 + .type = HDA_FIXUP_PINS, 7006 + .v.pins = (const struct hda_pintbl[]) { 7007 + { 0x17, 0x90170130 }, /* bass spk */ 7008 + { } 7009 + }, 7010 + .chained = true, 7011 + .chain_id = ALC269_FIXUP_DELL4_MIC_NO_PRESENCE 7012 + }, 7013 + [ALC289_FIXUP_DUAL_SPK] = { 7014 + .type = HDA_FIXUP_FUNC, 7015 + .v.func = alc285_fixup_speaker2_to_dac1, 7016 + .chained = true, 7017 + .chain_id = ALC289_FIXUP_DELL_SPK2 7018 + }, 7019 + [ALC294_FIXUP_SPK2_TO_DAC1] = { 7020 + .type = HDA_FIXUP_FUNC, 7021 + .v.func = alc285_fixup_speaker2_to_dac1, 7022 + .chained = true, 7023 + .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC 7024 + }, 7025 + [ALC294_FIXUP_ASUS_DUAL_SPK] = { 6999 7026 .type = HDA_FIXUP_FUNC, 7000 7027 /* The GPIO must be pulled to initialize the AMP */ 7001 7028 .v.func = alc_fixup_gpio4, 7002 7029 .chained = true, 7003 - .chain_id = ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC 7030 + .chain_id = ALC294_FIXUP_SPK2_TO_DAC1 7004 7031 }, 7032 + 7005 7033 }; 7006 7034 7007 7035 static const struct snd_pci_quirk alc269_fixup_tbl[] = { ··· 7096 7080 SND_PCI_QUIRK(0x1028, 0x08ad, "Dell WYSE AIO", ALC225_FIXUP_DELL_WYSE_AIO_MIC_NO_PRESENCE), 7097 7081 SND_PCI_QUIRK(0x1028, 0x08ae, "Dell WYSE NB", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE), 7098 7082 SND_PCI_QUIRK(0x1028, 0x0935, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB), 7083 + SND_PCI_QUIRK(0x1028, 0x097e, "Dell Precision", ALC289_FIXUP_DUAL_SPK), 7084 + SND_PCI_QUIRK(0x1028, 0x097d, "Dell Precision", ALC289_FIXUP_DUAL_SPK), 7099 7085 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 7100 7086 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 7101 7087 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), ··· 7185 7167 SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK), 7186 7168 SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A), 7187 7169 SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), 7188 - SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_INTSPK_GPIO), 7170 + SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK), 7189 7171 SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC), 7190 7172 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), 7191 7173 SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC),
+6 -3
sound/pci/ice1712/ice1724.c
··· 647 647 unsigned long flags; 648 648 unsigned char mclk_change; 649 649 unsigned int i, old_rate; 650 + bool call_set_rate = false; 650 651 651 652 if (rate > ice->hw_rates->list[ice->hw_rates->count - 1]) 652 653 return -EINVAL; ··· 671 670 * setting clock rate for internal clock mode */ 672 671 old_rate = ice->get_rate(ice); 673 672 if (force || (old_rate != rate)) 674 - ice->set_rate(ice, rate); 673 + call_set_rate = true; 675 674 else if (rate == ice->cur_rate) { 676 675 spin_unlock_irqrestore(&ice->reg_lock, flags); 677 676 return 0; ··· 679 678 } 680 679 681 680 ice->cur_rate = rate; 681 + spin_unlock_irqrestore(&ice->reg_lock, flags); 682 + 683 + if (call_set_rate) 684 + ice->set_rate(ice, rate); 682 685 683 686 /* setting master clock */ 684 687 mclk_change = ice->set_mclk(ice, rate); 685 - 686 - spin_unlock_irqrestore(&ice->reg_lock, flags); 687 688 688 689 if (mclk_change && ice->gpio.i2s_mclk_changed) 689 690 ice->gpio.i2s_mclk_changed(ice);
+1
sound/usb/card.h
··· 145 145 struct snd_usb_endpoint *sync_endpoint; 146 146 unsigned long flags; 147 147 bool need_setup_ep; /* (re)configure EP at prepare? */ 148 + bool need_setup_fmt; /* (re)configure fmt after resume? */ 148 149 unsigned int speed; /* USB_SPEED_XXX */ 149 150 150 151 u64 formats; /* format bitmasks (all or'ed) */
+21 -4
sound/usb/pcm.c
··· 506 506 if (WARN_ON(!iface)) 507 507 return -EINVAL; 508 508 alts = usb_altnum_to_altsetting(iface, fmt->altsetting); 509 - altsd = get_iface_desc(alts); 510 - if (WARN_ON(altsd->bAlternateSetting != fmt->altsetting)) 509 + if (WARN_ON(!alts)) 511 510 return -EINVAL; 511 + altsd = get_iface_desc(alts); 512 512 513 - if (fmt == subs->cur_audiofmt) 513 + if (fmt == subs->cur_audiofmt && !subs->need_setup_fmt) 514 514 return 0; 515 515 516 516 /* close the old interface */ 517 - if (subs->interface >= 0 && subs->interface != fmt->iface) { 517 + if (subs->interface >= 0 && (subs->interface != fmt->iface || subs->need_setup_fmt)) { 518 518 if (!subs->stream->chip->keep_iface) { 519 519 err = usb_set_interface(subs->dev, subs->interface, 0); 520 520 if (err < 0) { ··· 527 527 subs->interface = -1; 528 528 subs->altset_idx = 0; 529 529 } 530 + 531 + if (subs->need_setup_fmt) 532 + subs->need_setup_fmt = false; 530 533 531 534 /* set interface */ 532 535 if (iface->cur_altsetting != alts) { ··· 1731 1728 subs->data_endpoint->retire_data_urb = retire_playback_urb; 1732 1729 subs->running = 0; 1733 1730 return 0; 1731 + case SNDRV_PCM_TRIGGER_SUSPEND: 1732 + if (subs->stream->chip->setup_fmt_after_resume_quirk) { 1733 + stop_endpoints(subs, true); 1734 + subs->need_setup_fmt = true; 1735 + return 0; 1736 + } 1737 + break; 1734 1738 } 1735 1739 1736 1740 return -EINVAL; ··· 1770 1760 subs->data_endpoint->retire_data_urb = retire_capture_urb; 1771 1761 subs->running = 1; 1772 1762 return 0; 1763 + case SNDRV_PCM_TRIGGER_SUSPEND: 1764 + if (subs->stream->chip->setup_fmt_after_resume_quirk) { 1765 + stop_endpoints(subs, true); 1766 + subs->need_setup_fmt = true; 1767 + return 0; 1768 + } 1769 + break; 1773 1770 } 1774 1771 1775 1772 return -EINVAL;
+2 -1
sound/usb/quirks-table.h
··· 3466 3466 .vendor_name = "Dell", 3467 3467 .product_name = "WD19 Dock", 3468 3468 .profile_name = "Dell-WD15-Dock", 3469 - .ifnum = QUIRK_NO_INTERFACE 3469 + .ifnum = QUIRK_ANY_INTERFACE, 3470 + .type = QUIRK_SETUP_FMT_AFTER_RESUME 3470 3471 } 3471 3472 }, 3472 3473 /* MOTU Microbook II */
+11
sound/usb/quirks.c
··· 508 508 return snd_usb_create_mixer(chip, quirk->ifnum, 0); 509 509 } 510 510 511 + 512 + static int setup_fmt_after_resume_quirk(struct snd_usb_audio *chip, 513 + struct usb_interface *iface, 514 + struct usb_driver *driver, 515 + const struct snd_usb_audio_quirk *quirk) 516 + { 517 + chip->setup_fmt_after_resume_quirk = 1; 518 + return 1; /* Continue with creating streams and mixer */ 519 + } 520 + 511 521 /* 512 522 * audio-interface quirks 513 523 * ··· 556 546 [QUIRK_AUDIO_EDIROL_UAXX] = create_uaxx_quirk, 557 547 [QUIRK_AUDIO_ALIGN_TRANSFER] = create_align_transfer_quirk, 558 548 [QUIRK_AUDIO_STANDARD_MIXER] = create_standard_mixer_quirk, 549 + [QUIRK_SETUP_FMT_AFTER_RESUME] = setup_fmt_after_resume_quirk, 559 550 }; 560 551 561 552 if (quirk->type < QUIRK_TYPE_COUNT) {
+2 -1
sound/usb/usbaudio.h
··· 33 33 wait_queue_head_t shutdown_wait; 34 34 unsigned int txfr_quirk:1; /* Subframe boundaries on transfers */ 35 35 unsigned int tx_length_quirk:1; /* Put length specifier in transfers */ 36 - 36 + unsigned int setup_fmt_after_resume_quirk:1; /* setup the format to interface after resume */ 37 37 int num_interfaces; 38 38 int num_suspended_intf; 39 39 int sample_rate_read_error; ··· 98 98 QUIRK_AUDIO_EDIROL_UAXX, 99 99 QUIRK_AUDIO_ALIGN_TRANSFER, 100 100 QUIRK_AUDIO_STANDARD_MIXER, 101 + QUIRK_SETUP_FMT_AFTER_RESUME, 101 102 102 103 QUIRK_TYPE_COUNT 103 104 };