Pull sound fixes from Takashi Iwai: "Just a few small fixes. The only change to the core code is for a minor race in ALSA OSS sequencer, and the rest are all device-specific fixes (regression fixes and a usual quirk)" * tag 'sound-6.4-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: Add quirk flag for HEM devices to enable native DSD playback ALSA: usb-audio: Fix broken resume due to UAC3 power state ALSA: seq: oss: Fix racy open/close of MIDI devices ASoC: tegra: Fix Master Volume Control ALSA: hda/realtek: Add a quirk for Compaq N14JP6 firmware: cs_dsp: Log correct region name in bin error messages
Unified · Split
| @@ -2124,6 +2124,7 @@ static int cs_dsp_load_coeff(struct cs_dsp *dsp, const struct firmware *firmware · 2123 unmodified lines | ||
| 2124 | 2124 | file, blocks, le32_to_cpu(blk->len), |
| 2125 | 2125 | type, le32_to_cpu(blk->id)); |
| 2126 | 2126 | |
| 2127 | + region_name = cs_dsp_mem_region_name(type); | |
| 2127 | 2128 | mem = cs_dsp_find_region(dsp, type); |
| 2128 | 2129 | if (!mem) { |
| 2129 | 2130 | cs_dsp_err(dsp, "No base for region %x\n", type); |
| @@ -2147,8 +2148,8 @@ static int cs_dsp_load_coeff(struct cs_dsp *dsp, const struct firmware *firmware · 17 unmodified lines | ||
| 2147 | 2148 | reg = dsp->ops->region_to_reg(mem, reg); |
| 2148 | 2149 | reg += offset; |
| 2149 | 2150 | } else { |
| 2150 | − cs_dsp_err(dsp, "No %x for algorithm %x\n", | |
| 2151 | − type, le32_to_cpu(blk->id)); | |
| 2151 | + cs_dsp_err(dsp, "No %s for algorithm %x\n", | |
| 2152 | + region_name, le32_to_cpu(blk->id)); | |
| 2152 | 2153 | } |
| 2153 | 2154 | break; |
| 2154 | 2155 | |
| @@ -37,6 +37,7 @@ struct seq_oss_midi { · 36 unmodified lines | ||
| 37 | 37 | struct snd_midi_event *coder; /* MIDI event coder */ |
| 38 | 38 | struct seq_oss_devinfo *devinfo; /* assigned OSSseq device */ |
| 39 | 39 | snd_use_lock_t use_lock; |
| 40 | + struct mutex open_mutex; | |
| 40 | 41 | }; |
| 41 | 42 | |
| 42 | 43 | |
| @@ -172,6 +173,7 @@ snd_seq_oss_midi_check_new_port(struct snd_seq_port_info *pinfo) · 129 unmodified lines | ||
| 172 | 173 | mdev->flags = pinfo->capability; |
| 173 | 174 | mdev->opened = 0; |
| 174 | 175 | snd_use_lock_init(&mdev->use_lock); |
| 176 | + mutex_init(&mdev->open_mutex); | |
| 175 | 177 | |
| 176 | 178 | /* copy and truncate the name of synth device */ |
| 177 | 179 | strscpy(mdev->name, pinfo->name, sizeof(mdev->name)); |
| @@ -322,15 +324,17 @@ snd_seq_oss_midi_open(struct seq_oss_devinfo *dp, int dev, int fmode) · 144 unmodified lines | ||
| 322 | 324 | int perm; |
| 323 | 325 | struct seq_oss_midi *mdev; |
| 324 | 326 | struct snd_seq_port_subscribe subs; |
| 327 | + int err; | |
| 325 | 328 | |
| 326 | 329 | mdev = get_mididev(dp, dev); |
| 327 | 330 | if (!mdev) |
| 328 | 331 | return -ENODEV; |
| 329 | 332 | |
| 333 | + mutex_lock(&mdev->open_mutex); | |
| 330 | 334 | /* already used? */ |
| 331 | 335 | if (mdev->opened && mdev->devinfo != dp) { |
| 332 | − snd_use_lock_free(&mdev->use_lock); | |
| 333 | − return -EBUSY; | |
| 336 | + err = -EBUSY; | |
| 337 | + goto unlock; | |
| 334 | 338 | } |
| 335 | 339 | |
| 336 | 340 | perm = 0; |
| @@ -340,14 +344,14 @@ snd_seq_oss_midi_open(struct seq_oss_devinfo *dp, int dev, int fmode) · 3 unmodified lines | ||
| 340 | 344 | perm |= PERM_READ; |
| 341 | 345 | perm &= mdev->flags; |
| 342 | 346 | if (perm == 0) { |
| 343 | − snd_use_lock_free(&mdev->use_lock); | |
| 344 | − return -ENXIO; | |
| 347 | + err = -ENXIO; | |
| 348 | + goto unlock; | |
| 345 | 349 | } |
| 346 | 350 | |
| 347 | 351 | /* already opened? */ |
| 348 | 352 | if ((mdev->opened & perm) == perm) { |
| 349 | − snd_use_lock_free(&mdev->use_lock); | |
| 350 | − return 0; | |
| 353 | + err = 0; | |
| 354 | + goto unlock; | |
| 351 | 355 | } |
| 352 | 356 | |
| 353 | 357 | perm &= ~mdev->opened; |
| @@ -372,13 +376,17 @@ snd_seq_oss_midi_open(struct seq_oss_devinfo *dp, int dev, int fmode) · 18 unmodified lines | ||
| 372 | 376 | } |
| 373 | 377 | |
| 374 | 378 | if (! mdev->opened) { |
| 375 | − snd_use_lock_free(&mdev->use_lock); | |
| 376 | − return -ENXIO; | |
| 379 | + err = -ENXIO; | |
| 380 | + goto unlock; | |
| 377 | 381 | } |
| 378 | 382 | |
| 379 | 383 | mdev->devinfo = dp; |
| 384 | + err = 0; | |
| 385 | + | |
| 386 | + unlock: | |
| 387 | + mutex_unlock(&mdev->open_mutex); | |
| 380 | 388 | snd_use_lock_free(&mdev->use_lock); |
| 381 | − return 0; | |
| 389 | + return err; | |
| 382 | 390 | } |
| 383 | 391 | |
| 384 | 392 | /* |
| @@ -393,10 +401,9 @@ snd_seq_oss_midi_close(struct seq_oss_devinfo *dp, int dev) · 8 unmodified lines | ||
| 393 | 401 | mdev = get_mididev(dp, dev); |
| 394 | 402 | if (!mdev) |
| 395 | 403 | return -ENODEV; |
| 396 | − if (! mdev->opened || mdev->devinfo != dp) { | |
| 397 | − snd_use_lock_free(&mdev->use_lock); | |
| 398 | − return 0; | |
| 399 | − } | |
| 404 | + mutex_lock(&mdev->open_mutex); | |
| 405 | + if (!mdev->opened || mdev->devinfo != dp) | |
| 406 | + goto unlock; | |
| 400 | 407 | |
| 401 | 408 | memset(&subs, 0, sizeof(subs)); |
| 402 | 409 | if (mdev->opened & PERM_WRITE) { |
| @@ -415,6 +422,8 @@ snd_seq_oss_midi_close(struct seq_oss_devinfo *dp, int dev) · 12 unmodified lines | ||
| 415 | 422 | mdev->opened = 0; |
| 416 | 423 | mdev->devinfo = NULL; |
| 417 | 424 | |
| 425 | + unlock: | |
| 426 | + mutex_unlock(&mdev->open_mutex); | |
| 418 | 427 | snd_use_lock_free(&mdev->use_lock); |
| 419 | 428 | return 0; |
| 420 | 429 | } |
| @@ -11740,6 +11740,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = { · 11739 unmodified lines | ||
| 11740 | 11740 | SND_PCI_QUIRK(0x1b0a, 0x01b8, "ACER Veriton", ALC662_FIXUP_ACER_VERITON), |
| 11741 | 11741 | SND_PCI_QUIRK(0x1b35, 0x1234, "CZC ET26", ALC662_FIXUP_CZC_ET26), |
| 11742 | 11742 | SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T), |
| 11743 | + SND_PCI_QUIRK(0x1c6c, 0x1239, "Compaq N14JP6-V2", ALC897_FIXUP_HP_HSMIC_VERB), | |
| 11743 | 11744 | |
| 11744 | 11745 | #if 0 |
| 11745 | 11746 | /* Below is a quirk table taken from the old code. |
| @@ -117,6 +117,9 @@ int tegra_pcm_open(struct snd_soc_component *component, · 116 unmodified lines | ||
| 117 | 117 | return ret; |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | + /* Set wait time to 500ms by default */ | |
| 121 | + substream->wait_time = 500; | |
| 122 | + | |
| 120 | 123 | return 0; |
| 121 | 124 | } |
| 122 | 125 | EXPORT_SYMBOL_GPL(tegra_pcm_open); |
| @@ -650,6 +650,10 @@ static int snd_usb_pcm_prepare(struct snd_pcm_substream *substream) · 649 unmodified lines | ||
| 650 | 650 | goto unlock; |
| 651 | 651 | } |
| 652 | 652 | |
| 653 | + ret = snd_usb_pcm_change_state(subs, UAC3_PD_STATE_D0); | |
| 654 | + if (ret < 0) | |
| 655 | + goto unlock; | |
| 656 | + | |
| 653 | 657 | again: |
| 654 | 658 | if (subs->sync_endpoint) { |
| 655 | 659 | ret = snd_usb_endpoint_prepare(chip, subs->sync_endpoint); |
| @@ -2191,6 +2191,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { · 2190 unmodified lines | ||
| 2191 | 2191 | QUIRK_FLAG_DSD_RAW), |
| 2192 | 2192 | VENDOR_FLG(0x2ab6, /* T+A devices */ |
| 2193 | 2193 | QUIRK_FLAG_DSD_RAW), |
| 2194 | + VENDOR_FLG(0x3336, /* HEM devices */ | |
| 2195 | + QUIRK_FLAG_DSD_RAW), | |
| 2194 | 2196 | VENDOR_FLG(0x3353, /* Khadas devices */ |
| 2195 | 2197 | QUIRK_FLAG_DSD_RAW), |
| 2196 | 2198 | VENDOR_FLG(0x3842, /* EVGA */ |