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

Pull sound fixes from Takashi Iwai:
"A couple of regression fixes and a fix for mutex deadlock at
hog-unplug, as well as other device-specific fixes:

- A commit to avoid the spurious unsolicited interrupt on HD-audio
bus caused a stall at shutdown, so it's reverted now.

- The recent support of AMD/Nvidia audio component binding caused a
mutex deadlock; fixed by splitting to another mutex

- The device hot-unplug and the ALSA timer close combo may lead to
another mutex deadlock; fixed by moving put_device() calls

- Usual device-specific small quirks for HD- and USB-audio drivers

- An old error check fix in FireWire driver"

* tag 'sound-5.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: timer: Fix mutex deadlock at releasing card
ALSA: hda - Fix mutex deadlock in HDMI codec driver
Revert "ALSA: hda: Flush interrupts on disabling"
ALSA: bebob: Fix prototype of helper function to return negative value
ALSA: hda/realtek - Fix 2 front mics of codec 0x623
ALSA: hda/realtek - Add support for ALC623
ALSA: usb-audio: Add DSD support for Gustard U16/X26 USB Interface

+37 -16
+17 -7
sound/core/timer.c
··· 226 226 return 0; 227 227 } 228 228 229 - static int snd_timer_close_locked(struct snd_timer_instance *timeri); 229 + static int snd_timer_close_locked(struct snd_timer_instance *timeri, 230 + struct device **card_devp_to_put); 230 231 231 232 /* 232 233 * open a timer instance ··· 239 238 { 240 239 struct snd_timer *timer; 241 240 struct snd_timer_instance *timeri = NULL; 241 + struct device *card_dev_to_put = NULL; 242 242 int err; 243 243 244 244 mutex_lock(&register_mutex); ··· 263 261 list_add_tail(&timeri->open_list, &snd_timer_slave_list); 264 262 err = snd_timer_check_slave(timeri); 265 263 if (err < 0) { 266 - snd_timer_close_locked(timeri); 264 + snd_timer_close_locked(timeri, &card_dev_to_put); 267 265 timeri = NULL; 268 266 } 269 267 goto unlock; ··· 315 313 timeri = NULL; 316 314 317 315 if (timer->card) 318 - put_device(&timer->card->card_dev); 316 + card_dev_to_put = &timer->card->card_dev; 319 317 module_put(timer->module); 320 318 goto unlock; 321 319 } ··· 325 323 timer->num_instances++; 326 324 err = snd_timer_check_master(timeri); 327 325 if (err < 0) { 328 - snd_timer_close_locked(timeri); 326 + snd_timer_close_locked(timeri, &card_dev_to_put); 329 327 timeri = NULL; 330 328 } 331 329 332 330 unlock: 333 331 mutex_unlock(&register_mutex); 332 + /* put_device() is called after unlock for avoiding deadlock */ 333 + if (card_dev_to_put) 334 + put_device(card_dev_to_put); 334 335 *ti = timeri; 335 336 return err; 336 337 } ··· 343 338 * close a timer instance 344 339 * call this with register_mutex down. 345 340 */ 346 - static int snd_timer_close_locked(struct snd_timer_instance *timeri) 341 + static int snd_timer_close_locked(struct snd_timer_instance *timeri, 342 + struct device **card_devp_to_put) 347 343 { 348 344 struct snd_timer *timer = timeri->timer; 349 345 struct snd_timer_instance *slave, *tmp; ··· 401 395 timer->hw.close(timer); 402 396 /* release a card refcount for safe disconnection */ 403 397 if (timer->card) 404 - put_device(&timer->card->card_dev); 398 + *card_devp_to_put = &timer->card->card_dev; 405 399 module_put(timer->module); 406 400 } 407 401 ··· 413 407 */ 414 408 int snd_timer_close(struct snd_timer_instance *timeri) 415 409 { 410 + struct device *card_dev_to_put = NULL; 416 411 int err; 417 412 418 413 if (snd_BUG_ON(!timeri)) 419 414 return -ENXIO; 420 415 421 416 mutex_lock(&register_mutex); 422 - err = snd_timer_close_locked(timeri); 417 + err = snd_timer_close_locked(timeri, &card_dev_to_put); 423 418 mutex_unlock(&register_mutex); 419 + /* put_device() is called after unlock for avoiding deadlock */ 420 + if (card_dev_to_put) 421 + put_device(card_dev_to_put); 424 422 return err; 425 423 } 426 424 EXPORT_SYMBOL(snd_timer_close);
+1 -2
sound/firewire/bebob/bebob_stream.c
··· 252 252 return err; 253 253 } 254 254 255 - static unsigned int 256 - map_data_channels(struct snd_bebob *bebob, struct amdtp_stream *s) 255 + static int map_data_channels(struct snd_bebob *bebob, struct amdtp_stream *s) 257 256 { 258 257 unsigned int sec, sections, ch, channels; 259 258 unsigned int pcm, midi, location;
-2
sound/hda/hdac_controller.c
··· 447 447 list_for_each_entry(azx_dev, &bus->stream_list, list) 448 448 snd_hdac_stream_updateb(azx_dev, SD_CTL, SD_INT_MASK, 0); 449 449 450 - synchronize_irq(bus->irq); 451 - 452 450 /* disable SIE for all streams */ 453 451 snd_hdac_chip_writeb(bus, INTCTL, 0); 454 452
+1 -1
sound/pci/hda/hda_intel.c
··· 1348 1348 } 1349 1349 1350 1350 if (bus->chip_init) { 1351 - azx_stop_chip(chip); 1352 1351 azx_clear_irq_pending(chip); 1353 1352 azx_stop_all_streams(chip); 1353 + azx_stop_chip(chip); 1354 1354 } 1355 1355 1356 1356 if (bus->irq >= 0)
+6 -4
sound/pci/hda/patch_hdmi.c
··· 145 145 struct snd_array pins; /* struct hdmi_spec_per_pin */ 146 146 struct hdmi_pcm pcm_rec[16]; 147 147 struct mutex pcm_lock; 148 + struct mutex bind_lock; /* for audio component binding */ 148 149 /* pcm_bitmap means which pcms have been assigned to pins*/ 149 150 unsigned long pcm_bitmap; 150 151 int pcm_used; /* counter of pcm_rec[] */ ··· 2259 2258 struct hdmi_spec *spec = codec->spec; 2260 2259 int pin_idx; 2261 2260 2262 - mutex_lock(&spec->pcm_lock); 2261 + mutex_lock(&spec->bind_lock); 2263 2262 spec->use_jack_detect = !codec->jackpoll_interval; 2264 2263 for (pin_idx = 0; pin_idx < spec->num_pins; pin_idx++) { 2265 2264 struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx); ··· 2276 2275 snd_hda_jack_detect_enable_callback(codec, pin_nid, 2277 2276 jack_callback); 2278 2277 } 2279 - mutex_unlock(&spec->pcm_lock); 2278 + mutex_unlock(&spec->bind_lock); 2280 2279 return 0; 2281 2280 } 2282 2281 ··· 2383 2382 spec->ops = generic_standard_hdmi_ops; 2384 2383 spec->dev_num = 1; /* initialize to 1 */ 2385 2384 mutex_init(&spec->pcm_lock); 2385 + mutex_init(&spec->bind_lock); 2386 2386 snd_hdac_register_chmap_ops(&codec->core, &spec->chmap); 2387 2387 2388 2388 spec->chmap.ops.get_chmap = hdmi_get_chmap; ··· 2453 2451 int i; 2454 2452 2455 2453 spec = container_of(acomp->audio_ops, struct hdmi_spec, drm_audio_ops); 2456 - mutex_lock(&spec->pcm_lock); 2454 + mutex_lock(&spec->bind_lock); 2457 2455 spec->use_acomp_notifier = use_acomp; 2458 2456 spec->codec->relaxed_resume = use_acomp; 2459 2457 /* reprogram each jack detection logic depending on the notifier */ ··· 2463 2461 get_pin(spec, i)->pin_nid, 2464 2462 use_acomp); 2465 2463 } 2466 - mutex_unlock(&spec->pcm_lock); 2464 + mutex_unlock(&spec->bind_lock); 2467 2465 } 2468 2466 2469 2467 /* enable / disable the notifier via master bind / unbind */
+11
sound/pci/hda/patch_realtek.c
··· 409 409 case 0x10ec0672: 410 410 alc_update_coef_idx(codec, 0xd, 0, 1<<14); /* EAPD Ctrl */ 411 411 break; 412 + case 0x10ec0623: 413 + alc_update_coef_idx(codec, 0x19, 1<<13, 0); 414 + break; 412 415 case 0x10ec0668: 413 416 alc_update_coef_idx(codec, 0x7, 3<<13, 0); 414 417 break; ··· 2923 2920 ALC269_TYPE_ALC225, 2924 2921 ALC269_TYPE_ALC294, 2925 2922 ALC269_TYPE_ALC300, 2923 + ALC269_TYPE_ALC623, 2926 2924 ALC269_TYPE_ALC700, 2927 2925 }; 2928 2926 ··· 2959 2955 case ALC269_TYPE_ALC225: 2960 2956 case ALC269_TYPE_ALC294: 2961 2957 case ALC269_TYPE_ALC300: 2958 + case ALC269_TYPE_ALC623: 2962 2959 case ALC269_TYPE_ALC700: 2963 2960 ssids = alc269_ssids; 2964 2961 break; ··· 7221 7216 SND_PCI_QUIRK(0x17aa, 0x312f, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 7222 7217 SND_PCI_QUIRK(0x17aa, 0x313c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 7223 7218 SND_PCI_QUIRK(0x17aa, 0x3151, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), 7219 + SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), 7220 + SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), 7224 7221 SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI), 7225 7222 SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC), 7226 7223 SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI), ··· 8023 8016 case 0x10ec0300: 8024 8017 spec->codec_variant = ALC269_TYPE_ALC300; 8025 8018 spec->gen.mixer_nid = 0; /* no loopback on ALC300 */ 8019 + break; 8020 + case 0x10ec0623: 8021 + spec->codec_variant = ALC269_TYPE_ALC623; 8026 8022 break; 8027 8023 case 0x10ec0700: 8028 8024 case 0x10ec0701: ··· 9228 9218 HDA_CODEC_ENTRY(0x10ec0298, "ALC298", patch_alc269), 9229 9219 HDA_CODEC_ENTRY(0x10ec0299, "ALC299", patch_alc269), 9230 9220 HDA_CODEC_ENTRY(0x10ec0300, "ALC300", patch_alc269), 9221 + HDA_CODEC_ENTRY(0x10ec0623, "ALC623", patch_alc269), 9231 9222 HDA_CODEC_REV_ENTRY(0x10ec0861, 0x100340, "ALC660", patch_alc861), 9232 9223 HDA_CODEC_ENTRY(0x10ec0660, "ALC660-VD", patch_alc861vd), 9233 9224 HDA_CODEC_ENTRY(0x10ec0861, "ALC861", patch_alc861),
+1
sound/usb/quirks.c
··· 1657 1657 case 0x23ba: /* Playback Designs */ 1658 1658 case 0x25ce: /* Mytek devices */ 1659 1659 case 0x278b: /* Rotel? */ 1660 + case 0x292b: /* Gustard/Ess based devices */ 1660 1661 case 0x2ab6: /* T+A devices */ 1661 1662 case 0x3842: /* EVGA */ 1662 1663 case 0xc502: /* HiBy devices */