Bug 214493
Summary: | [Regression] Missing audio profile for soundcard after 5.11 upgrade for USB interface | ||
---|---|---|---|
Product: | Drivers | Reporter: | Sebastian Rose (rose-sebastian) |
Component: | Sound(ALSA) | Assignee: | Jaroslav Kysela (perex) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | tiwai |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 5.11 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
alsa-info.sh 5.14
alsa-info.sh 5.14-.8 alsa-info.sh output for 5.14.8 after patching |
Description
Sebastian Rose
2021-09-22 19:15:59 UTC
There is a copy & paste error in the description. The list of profiles for 5.10 looks like this: ``` Profiles: off: Off (sinks: 0, sources: 0, priority: 0, available: yes) output:analog-surround-71+input:multichannel-input: Analog Surround 7.1 Output + Multichannel Input (sinks: 1, sources: 1, priority: 1201, available: yes) output:analog-surround-71: Analog Surround 7.1 Output (sinks: 1, sources: 0, priority: 1200, available: yes) pro-audio: Pro Audio (sinks: 1, sources: 1, priority: 1, available: yes) input:multichannel-input: Multichannel Input (sinks: 0, sources: 1, priority: 1, available: yes) ``` First off, could you verify whether the problem remains with the latest 5.14.x stable tree or 5.15-rc3? If yes, please give the output of alsa-info.sh. Run the script with --no-upload option and attach to Bugzilla. Created attachment 299013 [details]
alsa-info.sh 5.14
It happens with the latest stable kernel as well, 5.14.8. List of profiles looks like this
```
Profiles:
off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
output:analog-surround-71: Analog Surround 7.1 Output (sinks: 1, sources: 0, priority: 1200, available: yes)
pro-audio: Pro Audio (sinks: 1, sources: 1, priority: 1, available: yes)
input:multichannel-input: Multichannel Input (sinks: 0, sources: 1, priority: 1, available: yes)
```
I've attached the requested alsa-info.sh output.
Thanks. And reverting the commit on top of 5.14.x fixes the problem? Also, define HW_CONST_DEBUG in sound/usb/pcm.c, and check the kernel debug messages at plugging and configuring PulesAudio. It might help understanding what's going on. Since you have multiple usb devices, better to plug it later to get the messages only from the Scarlett device. (In reply to Takashi Iwai from comment #4) > Thanks. And reverting the commit on top of 5.14.x fixes the problem? Strangely enough, it does not. Just reverting 506c203cc3de6e26666b8476d287dee81595d6dc does not work. After some digging around I found it necessary to revert ``` commit be4a338596a40b914d906dcfae94286841aceacc Merge: 757fed1d0898 4961167bf748 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu Jan 28 09:06:52 2021 -0800 Merge tag 'sound-5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Although the incoming fixes haven't settled down yet, all changes here are small and mostly device-specific fixes, so nothing look worrisome. - Yet another USB-audio regression fixes - HD-audio ID fix and device-specific quirks - SOF Intel / SoundWire fixes including topology - ASoC Qualcomm and Mediatek fixes" * tag 'sound-5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (24 commits) ALSA: hda/via: Apply the workaround generically for Clevo machines ASoC: Intel: sof_sdw: set proper flags for Dell TGL-H SKU 0A5E ASoC: qcom: lpass: Fix out-of-bounds DAI ID lookup ASoC: mediatek: mt8192-mt6359: add format constraints for RT5682 ASoC: ak4458: correct reset polarity ASoC: SOF: SND_INTEL_DSP_CONFIG dependency ASoC: SOF: Intel: soundwire: fix select/depend unmet dependencies ALSA: hda: intel-dsp-config: add PCI id for TGL-H ALSA: usb-audio: workaround for iface reset issue ALSA: pcm: One more dependency for hw constraints ALSA: hda/realtek: Enable headset of ASUS B1400CEPE with ALC256 ASoC: Intel: Skylake: Zero snd_ctl_elem_value ASoC: Intel: Skylake: skl-topology: Fix OOPs ib skl_tplg_complete ASoC: qcom: Fix number of HDMI RDMA channels on sc7180 ASoC: mediatek: mt8183-da7219: ignore TDM DAI link by default ASoC: mediatek: mt8183-mt6358: ignore TDM DAI link by default ASoC: topology: Properly unregister DAI on removal ASoC: topology: Fix memory corruption in soc_tplg_denum_create_values() ASoC: qcom: lpass-ipq806x: fix bitwidth regmap field ASoC: AMD Renoir - refine DMI entries for some Lenovo products ... ``` as well. Since that is a merge commit, I reverted it towards mainline (-m 1 option). Reverting be4a338596a40b914d906dcfae94286841aceacc against 5.14.8 gives a lot of merge conflicts but reverting against 5.11 works. I assume there is a commit in there somewhere that in conjunction with `506c203cc3de6e26666b8476d287dee81595d6dc` causes the issue. It seems like git bisect led me down a stray path, I'm pretty sure that 506c203cc3de6e26666b8476d287dee81595d6dc is not at fault. Sorry for the bad lead. With some more testing I've managed to whittle the issue down to a single commit that I'm able to revert on top of 5.14.8 which fixes the issue. Reverting [fe773b8711e3be4190994ea54bf7a5a0564245a1](https://lore.kernel.org/all/20210123155842.22652-1-tiwai@suse.de/) makes the correct list of profiles show up ``` Profiles: off: Off (sinks: 0, sources: 0, priority: 0, available: yes) output:analog-surround-71+input:multichannel-input: Analog Surround 7.1 Output + Multichannel Input (sinks: 1, sources: 1, priority: 1201, available: yes) output:analog-surround-71: Analog Surround 7.1 Output (sinks: 1, sources: 0, priority: 1200, available: yes) pro-audio: Pro Audio (sinks: 1, sources: 1, priority: 1, available: yes) input:multichannel-input: Multichannel Input (sinks: 0, sources: 1, priority: 1, available: yes) ``` Running 5.14.8 without reverting this commit causes the output:analog-surround-71+input:multichannel-input profile to go missing. Thanks for the input. So it seems that your device needs the validation like MOTU ones. Interesting that this rather makes the things re-appearing, instead of restricting. Or it might be some cargo effect that casually make BIOS happier. Who knows. Allowing validation is a good thing in general, so I'd happily add the vendor id 0x1235 there. Could you verify that it works like below? --- a/sound/usb/format.c +++ b/sound/usb/format.c @@ -471,6 +471,7 @@ static int validate_sample_rate_table_v2v3(struct snd_usb_audio *chip, * known devices. */ switch (USB_ID_VENDOR(chip->usb_id)) { + case 0x1235: /* Focusrite-Novation */ case 0x07fd: /* MOTU */ break; default: Unfortunately, there has been a major rewrite of quirk handling in 5.15, and we'd need two different fixes. Thanks for the help. I can confirm that adding the vendor id for Focusrite-Novation makes the missing profile appear. What changed in 5.15, can I help somehow? (In reply to Sebastian Rose from comment #9) > Thanks for the help. I can confirm that adding the vendor id for > Focusrite-Novation makes the missing profile appear. Good to hear. Could you upload alsa-info.sh outputs before and after the patch? > What changed in 5.15, > can I help somehow? Don't worry, it's just that a different patch is needed for 5.15 due to the code change. It'd be like below instead: --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -1900,6 +1900,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { QUIRK_FLAG_CTL_MSG_DELAY | QUIRK_FLAG_IFACE_DELAY), VENDOR_FLG(0x07fd, /* MOTU */ QUIRK_FLAG_VALIDATE_RATES), + VENDOR_FLG(0x1235, /* Focusrite Novation */ + QUIRK_FLAG_VALIDATE_RATES), VENDOR_FLG(0x152a, /* Thesycon devices */ QUIRK_FLAG_DSD_RAW), VENDOR_FLG(0x1de7, /* Phoenix Audio */ But it means that the patch can't be backported to 5.14.x and older, hence a step for stable trees would be slightly complicated (an individual patch has to be submitted to stable). After checking the alsa-info.sh outputs to understand what really mattered, I'm going to submit the fix to the upstream. Created attachment 299075 [details]
alsa-info.sh 5.14-.8
alsa-info.sh output for 5.14.8 before patching
Created attachment 299077 [details]
alsa-info.sh output for 5.14.8 after patching
alsa-info.sh output for 5.14.8 after applying the proposed patch
Thanks! This revealed that the sample rate validation made some rates excluded from the audioformat lists, and this ended up for the driver picking up the right entry. I submitted the proper for 5.15 kernel to the upstream and will merge it soon later: https://lore.kernel.org/r/20211004074050.28241-1-tiwai@suse.de The fix for 5.14.x kernel will be submitted later to stable tree once after the 5.15 fix landed in Linus tree. Until then, please keep your local fix. Amazing, it makes the audio interface usable again with recent kernels, thank you! |