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-4.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"Things look calming down, but people were still busy to plaster over
small holes:

- Two fixes to harden against races in aloop driver

- A correction of a long-standing bug in USB-audio UAC2 processing
unit parser

- As usual suspects, HD-audio: a workaround for Coffee Lake
controller and a few other device-specific fixes

All small and for stable"

* tag 'sound-4.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: aloop: Fix access to not-yet-ready substream via cable
ALSA: aloop: Sync stale timer before release
ALSA: hda/realtek - Fix speaker no sound after system resume
ALSA: hda/realtek - Fix Dell headset Mic can't record
ALSA: hda - Force polling mode on CFL for fixing codec communication
ALSA: usb-audio: Fix parsing descriptor of UAC2 processing unit
ALSA: hda/realtek - Always immediately update mute LED with pin VREF

+41 -5
+2 -2
include/uapi/linux/usb/audio.h
··· 370 370 { 371 371 return (protocol == UAC_VERSION_1) ? 372 372 desc->baSourceID[desc->bNrInPins + 4] : 373 - desc->baSourceID[desc->bNrInPins + 6]; 373 + 2; /* in UAC2, this value is constant */ 374 374 } 375 375 376 376 static inline __u8 *uac_processing_unit_bmControls(struct uac_processing_unit_descriptor *desc, ··· 378 378 { 379 379 return (protocol == UAC_VERSION_1) ? 380 380 &desc->baSourceID[desc->bNrInPins + 5] : 381 - &desc->baSourceID[desc->bNrInPins + 7]; 381 + &desc->baSourceID[desc->bNrInPins + 6]; 382 382 } 383 383 384 384 static inline __u8 uac_processing_unit_iProcessing(struct uac_processing_unit_descriptor *desc,
+15 -2
sound/drivers/aloop.c
··· 192 192 dpcm->timer.expires = 0; 193 193 } 194 194 195 + static inline void loopback_timer_stop_sync(struct loopback_pcm *dpcm) 196 + { 197 + del_timer_sync(&dpcm->timer); 198 + } 199 + 195 200 #define CABLE_VALID_PLAYBACK (1 << SNDRV_PCM_STREAM_PLAYBACK) 196 201 #define CABLE_VALID_CAPTURE (1 << SNDRV_PCM_STREAM_CAPTURE) 197 202 #define CABLE_VALID_BOTH (CABLE_VALID_PLAYBACK|CABLE_VALID_CAPTURE) ··· 330 325 struct loopback_pcm *dpcm = runtime->private_data; 331 326 struct loopback_cable *cable = dpcm->cable; 332 327 int bps, salign; 328 + 329 + loopback_timer_stop_sync(dpcm); 333 330 334 331 salign = (snd_pcm_format_width(runtime->format) * 335 332 runtime->channels) / 8; ··· 666 659 return; 667 660 if (cable->streams[!substream->stream]) { 668 661 /* other stream is still alive */ 662 + spin_lock_irq(&cable->lock); 669 663 cable->streams[substream->stream] = NULL; 664 + spin_unlock_irq(&cable->lock); 670 665 } else { 671 666 /* free the cable */ 672 667 loopback->cables[substream->number][dev] = NULL; ··· 707 698 loopback->cables[substream->number][dev] = cable; 708 699 } 709 700 dpcm->cable = cable; 710 - cable->streams[substream->stream] = dpcm; 711 701 712 702 snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); 713 703 ··· 738 730 runtime->hw = loopback_pcm_hardware; 739 731 else 740 732 runtime->hw = cable->hw; 733 + 734 + spin_lock_irq(&cable->lock); 735 + cable->streams[substream->stream] = dpcm; 736 + spin_unlock_irq(&cable->lock); 737 + 741 738 unlock: 742 739 if (err < 0) { 743 740 free_cable(substream); ··· 757 744 struct loopback *loopback = substream->private_data; 758 745 struct loopback_pcm *dpcm = substream->runtime->private_data; 759 746 760 - loopback_timer_stop(dpcm); 747 + loopback_timer_stop_sync(dpcm); 761 748 mutex_lock(&loopback->cable_lock); 762 749 free_cable(substream); 763 750 mutex_unlock(&loopback->cable_lock);
+5
sound/pci/hda/hda_intel.c
··· 375 375 ((pci)->device == 0x160c)) 376 376 377 377 #define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98) 378 + #define IS_CFL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa348) 378 379 379 380 static char *driver_short_names[] = { 380 381 [AZX_DRIVER_ICH] = "HDA Intel", ··· 1744 1743 chip->bdl_pos_adj = default_bdl_pos_adj(chip); 1745 1744 else 1746 1745 chip->bdl_pos_adj = bdl_pos_adj[dev]; 1746 + 1747 + /* Workaround for a communication error on CFL (bko#199007) */ 1748 + if (IS_CFL(pci)) 1749 + chip->polling_mode = 1; 1747 1750 1748 1751 err = azx_bus_init(chip, model[dev], &pci_hda_io_ops); 1749 1752 if (err < 0) {
+19 -1
sound/pci/hda/patch_realtek.c
··· 3130 3130 3131 3131 alc_update_coef_idx(codec, 0x46, 3 << 12, 0); 3132 3132 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */ 3133 + alc_update_coefex_idx(codec, 0x53, 0x02, 0x8000, 1 << 15); /* Clear bit */ 3134 + alc_update_coefex_idx(codec, 0x53, 0x02, 0x8000, 0 << 15); 3133 3135 } 3134 3136 3135 3137 static void alc256_shutup(struct hda_codec *codec) ··· 3598 3596 pinval = snd_hda_codec_get_pin_target(codec, spec->mute_led_nid); 3599 3597 pinval &= ~AC_PINCTL_VREFEN; 3600 3598 pinval |= enabled ? AC_PINCTL_VREF_HIZ : AC_PINCTL_VREF_80; 3601 - if (spec->mute_led_nid) 3599 + if (spec->mute_led_nid) { 3600 + /* temporarily power up/down for setting VREF */ 3601 + snd_hda_power_up_pm(codec); 3602 3602 snd_hda_set_pin_ctl_cache(codec, spec->mute_led_nid, pinval); 3603 + snd_hda_power_down_pm(codec); 3604 + } 3603 3605 } 3604 3606 3605 3607 /* Make sure the led works even in runtime suspend */ ··· 5503 5497 ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, 5504 5498 ALC298_FIXUP_TPT470_DOCK, 5505 5499 ALC255_FIXUP_DUMMY_LINEOUT_VERB, 5500 + ALC255_FIXUP_DELL_HEADSET_MIC, 5506 5501 }; 5507 5502 5508 5503 static const struct hda_fixup alc269_fixups[] = { ··· 6364 6357 .chained = true, 6365 6358 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE 6366 6359 }, 6360 + [ALC255_FIXUP_DELL_HEADSET_MIC] = { 6361 + .type = HDA_FIXUP_PINS, 6362 + .v.pins = (const struct hda_pintbl[]) { 6363 + { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ 6364 + { } 6365 + }, 6366 + }, 6367 6367 }; 6368 6368 6369 6369 static const struct snd_pci_quirk alc269_fixup_tbl[] = { ··· 6425 6411 SND_PCI_QUIRK(0x1028, 0x082a, "Dell XPS 13 9360", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE), 6426 6412 SND_PCI_QUIRK(0x1028, 0x084b, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB), 6427 6413 SND_PCI_QUIRK(0x1028, 0x084e, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB), 6414 + SND_PCI_QUIRK(0x1028, 0x0871, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC), 6415 + SND_PCI_QUIRK(0x1028, 0x0872, "Dell Precision 3630", ALC255_FIXUP_DELL_HEADSET_MIC), 6428 6416 SND_PCI_QUIRK(0x1028, 0x0873, "Dell Precision 3930", ALC255_FIXUP_DUMMY_LINEOUT_VERB), 6429 6417 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 6430 6418 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), ··· 7170 7154 break; 7171 7155 case 0x10ec0257: 7172 7156 spec->codec_variant = ALC269_TYPE_ALC257; 7157 + spec->shutup = alc256_shutup; 7158 + spec->init_hook = alc256_init; 7173 7159 spec->gen.mixer_nid = 0; 7174 7160 break; 7175 7161 case 0x10ec0215: