Bugzilla – Bug 1178203
sound is broken at 5.3.18-lp152.44-default with Steinberg UR22C card
Last modified: 2022-12-23 12:58:03 UTC
Hello, I am running openSUSE Leap 15.2 and found that recent update to kernel-default-5.3.18-lp152.44 introduced the following 100% reproducible issue with audio for me. pulseaudio-13.0-lp152.2.3.x86_64 I use external USB sound card Steinber UR22C card with the following device/vendor IDs: Bus 004 Device 003: ID 0499:172f Yamaha Corp. The device is handled by snd_usb_audio kernel module. Steps to reproduce: 1. Update to kernel-default-5.3.18-lp152.44 2. Run some YouTube video in Firefox MozillaFirefox-78.4.0-lp152.2.24.1.x86_64 3. Start Telegram Desktop from the recent flatpak package during the video play: # flatpak run org.telegram.desktop Actual result: At this moment, the sound hangs in the Firefox instance, both video and audio stop and YouTube UI became irresponsible (for instance, I cannot rewind the video in player). It feels like some sound sink call in FireFox is unexpectedly blocked for some reason. There is also no any sound in any other applications. I have not found a way to recover from this state, except restarting pulseaudio server. Expected result: Sound keeps playing during Telegram Desktop startup. I suppose that the issue may be related to https://github.com/openSUSE/kernel/commit/7c5b892e0871655fea3294ffac6fa3cc3400b60d
Did you install alsa-plugins-pulse package? Just to be sure. Recently we noticed that pipewire got installed along with Firefox update, and this changes the default ALSA device setup. If alsa-plugins-pulse is installed and PULSEAUDIO_ENABLE=yes set in /etc/sysconfig/sound, it should override to PA as expected, but otherwise it can cause a problem. And, if it's really a kernel regression, do you get the system working properly when you boot with the older kernel? In that case, please upload the alsa-info.sh outputs on both working and non-working cases. Run the script with --no-upload option, and use attachments.
... and scratch my previous comment, now I see the suggested commit showing the implicit fb quirk for this device, which explains the situation. It's a long-standing problem with those devices and we're still working on it, but the fix is still not present yet. As a quick workaround, you may try to pass a module option for the quirk aliasing. e.g. Create a modprobe conf file /etc/modprobe.d/60-UR22C.conf containing the following line options snd-usb-audio quirk_alias=0499172f:04991111 which should prevent applying the quirk matching to 0499:172f.
(In reply to Takashi Iwai from comment #2) > ... and scratch my previous comment, now I see the suggested commit showing > the implicit fb quirk for this device, which explains the situation. > > It's a long-standing problem with those devices and we're still working on > it, but the fix is still not present yet. > > As a quick workaround, you may try to pass a module option for the quirk > aliasing. e.g. Create a modprobe conf file /etc/modprobe.d/60-UR22C.conf > containing the following line > options snd-usb-audio quirk_alias=0499172f:04991111 > > which should prevent applying the quirk matching to 0499:172f. Thanks. quirk_alias fixes the issue for me.
Created attachment 843085 [details] alsa-info.sh output for 5.3.18-lp152.47-default
OK, then could you check which PCM setups are used in the working state? While playing / recording with PA, check the contents of /proc/asound/card*/pcm0[pc]/hw_params. And, boot without quirk_alias workaround (to be broken state), and check the kernel messages whether you get any error from snd-usb-audio driver, especially about the endpoint. Also check hw_params proc files.
So, I've found the following. There is are no any messages in dmesg related to the sound issue under any circumstances. pcm0c is the following: access: MMAP_INTERLEAVED format: S32_LE subformat: STD channels: 2 rate: 44100 (44100/1) period_size: 44100 buffer_size: 88200 pcm0p has two different content depending on the application is in use: access: MMAP_INTERLEAVED format: S32_LE subformat: STD channels: 2 rate: 44100 (44100/1) period_size: 44100 buffer_size: 88200 or access: MMAP_INTERLEAVED format: S32_LE subformat: STD channels: 2 rate: 48000 (48000/1) period_size: 44100 buffer_size: 88200 Firefox can have both depending on the web-page. I've also managed to learn that the Telegram triggers pcm0p to be 44100 at its startup for a while, while doesn't make any sound. So, my issue is probably triggered when pcm0p is 48000 by the playing Firefox and then Telegram wants it to be 44100. I've also noticed that when I use quirk_alias, then there is some sound glitch instead of the initially described malfunction. The glitch sounds like the Firefox sound frequency becomes lower.
Could you try a test KMP available at OBS home:tiwai:bsc1178203 repo? http://download.opensuse.org/repositories/home:/tiwai:/bsc1178203/standard/ Just install usb-audio-kmp-default, reboot and retest. It's totally untested and might give a bad result, so just for testing. Once after testing, you can uninstall the KMP again via "zypper rm", and it'll be back again to the original state.
(In reply to Takashi Iwai from comment #7) > Could you try a test KMP available at OBS home:tiwai:bsc1178203 repo? > http://download.opensuse.org/repositories/home:/tiwai:/bsc1178203/standard/ > > Just install usb-audio-kmp-default, reboot and retest. > It's totally untested and might give a bad result, so just for testing. > > Once after testing, you can uninstall the KMP again via "zypper rm", and > it'll be back again to the original state. Hi, I've installed usb-audio-kmp-default and disabled the quirk_alias. Now I see the same behavior as initially. Sound hangs at frequency conflict.
Which version did you test? The latest one is v2 and shown in rpm changelog. Also, boot with snd-usb-audio.dyndbg=+p option so that the debug prints are enabled. Then plug, retest and give the kernel debug messages.
Created attachment 843372 [details] dmesg output I've tested updated "v2" version package. And the issue is gone now, but I think I need more testing. Attached here is debug output.
(In reply to Matwey Kornilov from comment #10) > Created attachment 843372 [details] > dmesg output > > I've tested updated "v2" version package. And the issue is gone now, but I > think I need more testing. > > Attached here is debug output. With "v2" package my recording device (analog input) is missed from audio-system. What could be wrong with it?
(In reply to Matwey Kornilov from comment #11) > (In reply to Matwey Kornilov from comment #10) > > Created attachment 843372 [details] > > dmesg output > > > > I've tested updated "v2" version package. And the issue is gone now, but I > > think I need more testing. > > > > Attached here is debug output. > > With "v2" package my recording device (analog input) is missed from > audio-system. What could be wrong with it? Could you elaborate? Do you mean that PulseAudio didn't enumerate the capture device? Or how did you test and see the problem? If it's PA, we need the log of PA start up. You can kill pulseaudio once, and restart with more verbosity to take the start up log, too. In anyway, please give alsa-info.sh output after KMP installation.
Created attachment 843387 [details] alsa-info.sh output for default kernel
Created attachment 843388 [details] alsa-info.sh output for kmp package
Created attachment 843389 [details] pactl list sources for default kernel
Created attachment 843390 [details] pactl list sources for kmp package
PulseAudio misses source #2 when kmp is installed.
Created attachment 843391 [details] pulseaudio startup log
Created attachment 843392 [details] pulseaudio startup log with log-level=debug
Hrm, PA is chatty bug doesn't give the really necessary information in the log... Could you give the PA log without KMP for comparison? I suspect "Slave PCM not usable" indicating *some* error, but not sure whether that's persistent or not.
Created attachment 843416 [details] pulseaudio startup log with default kernel
Created attachment 843417 [details] pulseaudio startup log with default kernel and log-level=debug
Thanks. It showed indeed the difference of the suspected error message with "Slave PCM: not usable", so this is likely the error, but what the hell it can be :) Meanwhile I updated the KMP again with v3 patch set, and hopefully this may work better (although I'm not quite sure). Let's give it a try.
Meanwhile I found a few other issues in the previous patches. Now the revised v4 is being built. Please give it a try later.
(In reply to Takashi Iwai from comment #24) > Meanwhile I found a few other issues in the previous patches. > Now the revised v4 is being built. Please give it a try later. I've just installed * Tue Nov 10 2020 tiwai@suse.de - v6 and the initial issue is returned.
Sigh, the problem is really much deeper than I expected. Now v7 is being built. Let's cross fingers.
(In reply to Takashi Iwai from comment #26) > Sigh, the problem is really much deeper than I expected. > Now v7 is being built. Let's cross fingers. I've tried v8-rev2, initial issue is still present and the capture device is present also (as it was in v6).
Just to be sure, it's all through pulseaudio and you have alsa-plugins-pulse package installed? Could you dmesg output with the dyndbg enabled?
Also, can I get the lsusb -v output for the device? This should have been asked at first...
Created attachment 843497 [details] dmesg output for v8 during the hung issue
Created attachment 843498 [details] lsusb -vvv output for the device
(In reply to Takashi Iwai from comment #28) > Just to be sure, it's all through pulseaudio and you have alsa-plugins-pulse > package installed? > > Could you dmesg output with the dyndbg enabled? Yes, pulseaudio in use. The package version is alsa-plugins-pulse-1.1.5-lp152.4.1.x86_64
Created attachment 843502 [details] dmesg output for v8 after boot
Can you test the newer kernel instead of Leap 15.2 (5.3.y)? The patch set grew much and is no longer easily applicable to Leap 15.2 kernel. If it's OK, I can provide a 5.9.y test kernel with the patches.
(In reply to Takashi Iwai from comment #34) > Can you test the newer kernel instead of Leap 15.2 (5.3.y)? The patch set > grew much and is no longer easily applicable to Leap 15.2 kernel. > If it's OK, I can provide a 5.9.y test kernel with the patches. Sure, I can if the kernel can be installed through RPM. I also can try to pass the device to virtual machine and do debugging stuff there as a backup plan.
OK, now a test kernel is being built in OBS home:tiwai:bsc1178203-tw repo. It'll finish usually in an hour later or so. Please give it a try later.
Unfortunately there was a bug in the last build. Now rebuilding with the updated patches. Please wait for a while.
I am trying 5.9.8-4.g8c20c3a-default. There are no capture and playback devices in the system. dmesg output (dyndbg enabled) is the following: [ 4.836963] usb 2-1.5: new high-speed USB device number 3 using ehci-pci [ 4.946209] usb 2-1.5: New USB device found, idVendor=0499, idProduct=172f, bcdDevice= 1.01 [ 4.946210] usb 2-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 4.946211] usb 2-1.5: Product: Steinberg UR22C [ 4.946212] usb 2-1.5: Manufacturer: Yamaha Corporation [ 13.206749] usb 2-1.5: No valid sample rate available for 1:1 [ 13.210994] usb 2-1.5: No valid sample rate available for 2:1
Created attachment 843662 [details] alsa-info output for 5.9.8-4.g8c20c3a-default
Created attachment 843663 [details] pactl list sinks output for 5.9.8-4.g8c20c3a-default
Created attachment 843664 [details] pactl list sources for 5.9.8-4.g8c20c3a-default
(In reply to Matwey Kornilov from comment #38) > I am trying 5.9.8-4.g8c20c3a-default. There are no capture and playback > devices in the system. > > dmesg output (dyndbg enabled) is the following: > > [ 4.836963] usb 2-1.5: new high-speed USB device number 3 using ehci-pci > [ 4.946209] usb 2-1.5: New USB device found, idVendor=0499, > idProduct=172f, bcdDevice= 1.01 > [ 4.946210] usb 2-1.5: New USB device strings: Mfr=1, Product=2, > SerialNumber=0 > [ 4.946211] usb 2-1.5: Product: Steinberg UR22C > [ 4.946212] usb 2-1.5: Manufacturer: Yamaha Corporation > [ 13.206749] usb 2-1.5: No valid sample rate available for 1:1 > [ 13.210994] usb 2-1.5: No valid sample rate available for 2:1 Damn, it means that this device doesn't follow the UAC2 spec the new patch expected. Lovely details... Now I fixed up this and a few others, re-uploaded again. The new kernel is being built. Please give it a try later again. Thanks!
(In reply to Takashi Iwai from comment #42) > (In reply to Matwey Kornilov from comment #38) > > I am trying 5.9.8-4.g8c20c3a-default. There are no capture and playback > > devices in the system. > > > > dmesg output (dyndbg enabled) is the following: > > > > [ 4.836963] usb 2-1.5: new high-speed USB device number 3 using ehci-pci > > [ 4.946209] usb 2-1.5: New USB device found, idVendor=0499, > > idProduct=172f, bcdDevice= 1.01 > > [ 4.946210] usb 2-1.5: New USB device strings: Mfr=1, Product=2, > > SerialNumber=0 > > [ 4.946211] usb 2-1.5: Product: Steinberg UR22C > > [ 4.946212] usb 2-1.5: Manufacturer: Yamaha Corporation > > [ 13.206749] usb 2-1.5: No valid sample rate available for 1:1 > > [ 13.210994] usb 2-1.5: No valid sample rate available for 2:1 > > Damn, it means that this device doesn't follow the UAC2 spec the new patch > expected. Lovely details... It is strange that UAC2 is unsupported, the device says "32 bit/192kHz" on its case, but I am not sure what does it mean. > > Now I fixed up this and a few others, re-uploaded again. The new kernel is > being built. Please give it a try later again. Thanks!
It's certain a UAC2 device, that's no doubt. Maybe the firmware simply doesn't implement a specific feature; the alternate setting validation control of the audio stream doesn't look like a mandatory implementation, after all, but it was required for some other devices (e.g. MOTU).
I am running 5.9.8-5.ge3d40d3-default and it seems to be working fine. The initial issue is gone. Both capture and playback devices are available. I'll be running it for some time to do my usual stuff and see if any new differences appeared.
I think it is still fine for me. Could you please CC me if you are going to send the series upstream?
The current latest patches are found in my sound.git tree test/usb-hacks-wip branch: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/log/?h=test/usb-hacks-wip I'm going to submit them in the early next week.
I'm building a test Leap 15.2 kernel with the latest patches in OBS home:tiwai:bsc1178203-leap repo. Please give it a try later.
5.3.18-lp152.2.gd5809e1-default doesn't work for me. Moreover, all my USB devices (including mouse and keyboard) are disabled, so I can login the host only by SSH. [ 13.513391] ehci-pci 0000:00:1d.0: fatal error [ 13.513394] ehci-pci 0000:00:1d.0: HC died; cleaning up [ 13.513449] usb 4-1.5: 1:1: cannot get freq (v2/v3): err -19 [ 13.513451] usb 4-1.5: 1:1: cannot set freq 192000 (v2/v3): err -19 [ 13.513478] usb 4-1.5: parse_audio_format_rates_v2v3(): unable to retrieve number of sample rates (clock 1) [ 13.513682] usbcore: registered new interface driver snd-usb-audio [ 13.519457] usb 4-1: USB disconnect, device number 2 [ 13.519458] usb 4-1.5: USB disconnect, device number 3 [ 13.522288] usb 4-1.6: USB disconnect, device number 4
(In reply to Matwey Kornilov from comment #49) > 5.3.18-lp152.2.gd5809e1-default doesn't work for me. Moreover, all my USB > devices (including mouse and keyboard) are disabled That's weird. Could you check the kernel in OBS Kernel:openSUSE-15.2 repo? If the similar USB problem is seen on mouse/keyboard, it must be a regression there, not the sound patches. Meanwhile, I'm updating the test kernel again with the official patches based on the latest openSUSE-15.2 branch. Let's test it after Kernel:openSUSE-15.2.
(In reply to Takashi Iwai from comment #50) > (In reply to Matwey Kornilov from comment #49) > > 5.3.18-lp152.2.gd5809e1-default doesn't work for me. Moreover, all my USB > > devices (including mouse and keyboard) are disabled > > That's weird. Could you check the kernel in OBS Kernel:openSUSE-15.2 repo? > If the similar USB problem is seen on mouse/keyboard, it must be a > regression there, not the sound patches. > > Meanwhile, I'm updating the test kernel again with the official patches > based on the latest openSUSE-15.2 branch. Let's test it after > Kernel:openSUSE-15.2. 5.3.18-lp152.141.ge9ea6a0-default from Kernel:openSUSE-15.2 works fine. USB devices are present.
OK, thanks. Then I'm building another TW kernel in OBS home:tiwai:bsc1178203-tw2 repo. It's based on the latest TW and the latest sound patch set. Let's see whether this breaks similarly. If this works but (patched) Leap doesn't, it's incompatibility in some base code. If this doesn't work, OTOH, it's a regression in the recent change after the code you've tested beforehand. Also, OBS home:tiwai:bsc1178203-leap is being built again, now it's based on the working Leap kernel git commit. If tw2 kernel above worked, let's try this one again.
I tested 5.3.18-lp152.2.gd5809e1-default on my machine with a UAC1 device, and it worked. So the breakage appears device-specific, at least.
(In reply to Takashi Iwai from comment #52) > OK, thanks. > > Then I'm building another TW kernel in OBS home:tiwai:bsc1178203-tw2 repo. > It's based on the latest TW and the latest sound patch set. Let's see > whether this breaks similarly. If this works but (patched) Leap doesn't, > it's incompatibility in some base code. If this doesn't work, OTOH, it's a > regression in the recent change after the code you've tested beforehand. > > Also, OBS home:tiwai:bsc1178203-leap is being built again, now it's based on > the working Leap kernel git commit. If tw2 kernel above worked, let's try > this one again. 5.9.10-1.g43fc8bf-default from home:tiwai:bsc1178203-tw2 works fine. I will test kernel from home:tiwai:bsc1178203-leap
(In reply to Matwey Kornilov from comment #54) > 5.9.10-1.g43fc8bf-default from home:tiwai:bsc1178203-tw2 works fine. OK, that's good. > I will test kernel from home:tiwai:bsc1178203-leap Any news on this?
(In reply to Takashi Iwai from comment #55) > (In reply to Matwey Kornilov from comment #54) > > 5.9.10-1.g43fc8bf-default from home:tiwai:bsc1178203-tw2 works fine. > > OK, that's good. > > > I will test kernel from home:tiwai:bsc1178203-leap > > Any news on this? I've just tried 5.3.18-lp152.5.g5895410-default It also breaks USB as previously. If I physically unplug the sound card from USB port before booting the PC, then USB works as usual.
It's a pity. I really find anything obvious in the patched USB-audio driver code, hence it must be somewhere else, either in the USB layer or in the sound core. What happens if you plug in the USB audio device with the patched Leap 15.2 kernel after the boot? Does it fail similarly? The dmesg output after the plug might show something...
(In reply to Takashi Iwai from comment #57) > It's a pity. I really find anything obvious s/anything/nothing/ Also, just to be sure, could you test with 5.10-rc kernel in OBS Kernel:HEAD repo? It doesn't contain any fix for the implicit fb yet, but it has one significant difference in the quirk handling since 5.9, and Leap 15.2 backport also carries it.
(In reply to Takashi Iwai from comment #58) > (In reply to Takashi Iwai from comment #57) > > It's a pity. I really find anything obvious > > s/anything/nothing/ > > Also, just to be sure, could you test with 5.10-rc kernel in OBS Kernel:HEAD > repo? > It doesn't contain any fix for the implicit fb yet, but it has one > significant difference in the quirk handling since 5.9, and Leap 15.2 > backport also carries it. Sorry for the delay. Testing 5.10.0-rc5-2.ge84a0b5-default now, USB works fine.
OK, then could you try later the kernel in OBS home:tiwai:bsc1178203-leap-base (which is being built now)? This contain only the backports to sync with 5.10 usb-audio code base. Once after confirming this kernel works, we may try to test a la git bisect for the rest of update patches.
I am running 5.3.18-lp152.1.g9d818a4-default USB works fine. Initial sound issue is present.
Then boot with the latest 15.2 update kernel, install the corresponding kernel-default-devel, too. I attach the git bundle for building the update modules. You can use it like: % git clone /somewhere/usb-audio-kmp.bundle % cd usb-audio-kmp % ./make.sh -j8 modules % sudo ./install.sh and the USB-audio modules will be installed on /lib/modules/$VERSION/updates/ Reboot and retest. Confirm that you get the same problem again (broken USB). You can remove the whole /lib/modules/$VERSION/updates to make it working again. Then, do git bisect: % cd usb-audio-kmp % git bisect start % git bisect bad HEAD % git bisect good 69b42abb227bc3a554568d9d89b5907845f82faf % ./make.sh -j8 modules % sudo ./install.sh and retest, answer with "git bisect good" or "git bisect bad", and repeat until you identify the culprit commit.
Created attachment 844072 [details] usb-audio-kmp.bundle
(In reply to Takashi Iwai from comment #62) > Then boot with the latest 15.2 update kernel, install the corresponding > kernel-default-devel, too. > > I attach the git bundle for building the update modules. You can use it > like: > > % git clone /somewhere/usb-audio-kmp.bundle > % cd usb-audio-kmp > % ./make.sh -j8 modules > % sudo ./install.sh > > and the USB-audio modules will be installed on /lib/modules/$VERSION/updates/ > Reboot and retest. Confirm that you get the same problem again (broken USB). > You can remove the whole /lib/modules/$VERSION/updates to make it working > again. > > Then, do git bisect: > % cd usb-audio-kmp > % git bisect start > % git bisect bad HEAD > % git bisect good 69b42abb227bc3a554568d9d89b5907845f82faf > % ./make.sh -j8 modules > % sudo ./install.sh > > and retest, answer with "git bisect good" or "git bisect bad", and repeat > until you identify the culprit commit. Could you please advise where is HEAD supposed to reference on? It references master, and there is no master branch in the bundle. So I get "HEAD points to an unborn branch (master)" and empty repo.
(In reply to Matwey Kornilov from comment #64) > (In reply to Takashi Iwai from comment #62) > > Then boot with the latest 15.2 update kernel, install the corresponding > > kernel-default-devel, too. > > > > I attach the git bundle for building the update modules. You can use it > > like: > > > > % git clone /somewhere/usb-audio-kmp.bundle > > % cd usb-audio-kmp > > % ./make.sh -j8 modules > > % sudo ./install.sh > > > > and the USB-audio modules will be installed on /lib/modules/$VERSION/updates/ > > Reboot and retest. Confirm that you get the same problem again (broken USB). > > You can remove the whole /lib/modules/$VERSION/updates to make it working > > again. > > > > Then, do git bisect: > > % cd usb-audio-kmp > > % git bisect start > > % git bisect bad HEAD > > % git bisect good 69b42abb227bc3a554568d9d89b5907845f82faf > > % ./make.sh -j8 modules > > % sudo ./install.sh > > > > and retest, answer with "git bisect good" or "git bisect bad", and repeat > > until you identify the culprit commit. > > Could you please advise where is HEAD supposed to reference on? It > references master, and there is no master branch in the bundle. So I get > "HEAD points to an unborn branch (master)" and empty repo. Sorry, I've just found: git checkout origin/master.
(In reply to Takashi Iwai from comment #63) > Created attachment 844072 [details] > usb-audio-kmp.bundle I've found the commit breaking USB for me: commit 9b88996bf670573ae6e0345b87fdc709d848d9ec Author: Takashi Iwai <tiwai@suse.de> Date: Mon Nov 23 09:53:09 2020 +0100 ALSA: usb-audio: Check valid altsetting at parsing rates for UAC2/3 I've double-checked that the previous one works fine: commit 9b88996bf670573ae6e0345b87fdc709d848d9ec Author: Takashi Iwai <tiwai@suse.de> Date: Mon Nov 23 09:53:09 2020 +0100 ALSA: usb-audio: Check valid altsetting at parsing rates for UAC2/3
(In reply to Matwey Kornilov from comment #66) > (In reply to Takashi Iwai from comment #63) > > Created attachment 844072 [details] > > usb-audio-kmp.bundle > > I've found the commit breaking USB for me: > > commit 9b88996bf670573ae6e0345b87fdc709d848d9ec > Author: Takashi Iwai <tiwai@suse.de> > Date: Mon Nov 23 09:53:09 2020 +0100 > > ALSA: usb-audio: Check valid altsetting at parsing rates for UAC2/3 > > > > I've double-checked that the previous one works fine: > > commit 9b88996bf670573ae6e0345b87fdc709d848d9ec > Author: Takashi Iwai <tiwai@suse.de> > Date: Mon Nov 23 09:53:09 2020 +0100 > > ALSA: usb-audio: Check valid altsetting at parsing rates for UAC2/3 Oops. Sorry. This one is working :-) commit e4c0179d63f44652cd3c04b6572ce116e562d1e3 (HEAD, refs/bisect/good-e4c0179d63f44652cd3c04b6572ce116e562d1e3) Author: Takashi Iwai <tiwai@suse.de> Date: Mon Nov 23 09:53:08 2020 +0100 ALSA: usb-audio: Don't call usb_set_interface() at trigger callback
Thanks! That's an interesting result. I expected the culprit would be a bit later commit. Then, could you check whether the hack below makes the first bad commit working? --- a/sound/usb/format.c +++ b/sound/usb/format.c @@ -424,6 +424,8 @@ static bool check_valid_altsetting_v2v3(struct snd_usb_audio *chip, int iface, u64 data; int err; + return true; + /* we assume 64bit is enough for any altsettings */ if (snd_BUG_ON(altsetting >= 64 - 8)) return false; That is, check_valid_altsetting_v2v3() always returns true. Also, try an alternative change: --- a/sound/usb/format.c +++ b/sound/usb/format.c @@ -485,6 +485,8 @@ static int validate_sample_rate_table_v2v3(struct snd_usb_audio *chip, } } + usb_set_interface(dev, fp->iface, 0); + if (!nr_rates) { usb_audio_dbg(chip, "No valid sample rate available for %d:%d, assuming a firmware bug\n", This adds the interface reset after the loop in validate_sample_rate_table_v2v3().
Hi, The first patch fixes USB. The second one does not.
OK, thanks. Then how about the following one instead? @@ -476,10 +476,12 @@ static int validate_sample_rate_table_v2v3(struct snd_usb_audio *chip, err = snd_usb_set_sample_rate_v2v3(chip, fp, clock, fp->rate_table[i]); if (err < 0) - continue; + goto next; if (check_valid_altsetting_v2v3(chip, fp->iface, fp->altsetting)) table[nr_rates++] = fp->rate_table[i]; + next: + usb_set_interface(dev, fp->iface, 0); /* clear interface at each time */ } if (!nr_rates) {
Still no success.
OK, thanks. Then it seems that we have to ignore the whole validation for your device, maybe the all Yamaha devices. And, if you carry this workaround, does the full backport work? Also, 5.10-rc kernel with the patches did work, right? If so, it should be some downstream-only fix to be put to Leap 15.2 kernel code.
SUSE-SU-2020:3764-1: An update that solves 11 vulnerabilities and has 62 fixes is now available. Category: security (important) Bug References: 1139944,1149032,1152489,1153274,1154353,1155518,1158775,1160634,1161099,1167773,1170139,1171558,1173504,1174852,1175721,1175918,1175995,1176109,1176200,1176481,1176586,1176855,1176956,1177066,1177070,1177353,1177397,1177666,1178182,1178203,1178227,1178286,1178401,1178426,1178590,1178634,1178635,1178653,1178669,1178740,1178755,1178756,1178762,1178782,1178838,1178853,1178886,1179001,1179012,1179014,1179015,1179045,1179076,1179082,1179107,1179140,1179141,1179160,1179201,1179211,1179217,1179419,1179424,1179425,1179426,1179427,1179429,1179432,1179442,1179550,1179578,1179601,1179639 CVE References: CVE-2020-15436,CVE-2020-15437,CVE-2020-25669,CVE-2020-25705,CVE-2020-27777,CVE-2020-27786,CVE-2020-28915,CVE-2020-28941,CVE-2020-29369,CVE-2020-29371,CVE-2020-4788 JIRA References: Sources used: SUSE Linux Enterprise Module for Realtime 15-SP2 (src): kernel-rt-5.3.18-19.1, kernel-rt_debug-5.3.18-19.1, kernel-source-rt-5.3.18-19.1, kernel-syms-rt-5.3.18-19.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
(In reply to Takashi Iwai from comment #72) > OK, thanks. Then it seems that we have to ignore the whole validation for > your device, maybe the all Yamaha devices. > > And, if you carry this workaround, does the full backport work? > Also, 5.10-rc kernel with the patches did work, right? If so, it should be > some downstream-only fix to be put to Leap 15.2 kernel code. 5.3.18-lp152.57-default + usb-audio from bundle + "return true" patch works well: both USB and sound are fine. I think I didn't test 5.10-rc + patches. Do you have ready package? I've also tried to reproduce USB issue in a virtual machine with no luck, so probably the issue is somewhere deeper than in snd code. At least 5.9 kernel works fine with USB and sound at the same hardware.
(In reply to Matwey Kornilov from comment #75) > (In reply to Takashi Iwai from comment #72) > > OK, thanks. Then it seems that we have to ignore the whole validation for > > your device, maybe the all Yamaha devices. > > > > And, if you carry this workaround, does the full backport work? > > Also, 5.10-rc kernel with the patches did work, right? If so, it should be > > some downstream-only fix to be put to Leap 15.2 kernel code. > > > 5.3.18-lp152.57-default + usb-audio from bundle + "return true" patch works > well: both USB and sound are fine. OK, then I'm going to queue the upstream patches plug a downstream workaround for this to Leap 15.2/15.3. > I think I didn't test 5.10-rc + patches. Do you have ready package? linux-next already contains it, so the kernel in OBS Kernel:linux-next should be the one. It's kernel-vanilla. You've already tested 5.9 + patches in OBS home:tiwai:bsc1178203-tw repo, so it should work. > I've also tried to reproduce USB issue in a virtual machine with no luck, so > probably the issue is somewhere deeper than in snd code. At least 5.9 kernel > works fine with USB and sound at the same hardware. I guess it's something in the USB core layer, as it's related with the interface reset behavior.
Now I pushed the patches to SLE15-SP2/for-next branch, so that those will be taken to Leap 15.2 later. In addition, the attached patch is applied on the top.
Created attachment 844439 [details] Workaround patch
Now merged. Let's close.
SUSE-SU-2021:0096-1: An update that solves 12 vulnerabilities and has 93 fixes is now available. Category: security (moderate) Bug References: 1040855,1044120,1044767,1055117,1065729,1094840,1109695,1115431,1138374,1139944,1149032,1152457,1152472,1152489,1155518,1156315,1156395,1158775,1161099,1165933,1168952,1171000,1171078,1171688,1172145,1172733,1174486,1175079,1175480,1175995,1176396,1176942,1176956,1177326,1177500,1177666,1177679,1177733,1178049,1178203,1178270,1178590,1178612,1178634,1178660,1178756,1178780,1179204,1179434,1179435,1179519,1179575,1179578,1179601,1179604,1179639,1179652,1179656,1179670,1179671,1179672,1179673,1179675,1179676,1179677,1179678,1179679,1179680,1179681,1179682,1179683,1179684,1179685,1179687,1179688,1179689,1179690,1179703,1179704,1179707,1179709,1179710,1179711,1179712,1179713,1179714,1179715,1179716,1179745,1179763,1179888,1179892,1179896,1179960,1179963,1180027,1180029,1180031,1180052,1180056,1180086,1180117,1180258,1180261,1180506 CVE References: CVE-2020-0444,CVE-2020-0465,CVE-2020-0466,CVE-2020-11668,CVE-2020-27068,CVE-2020-27786,CVE-2020-27825,CVE-2020-27830,CVE-2020-29370,CVE-2020-29373,CVE-2020-29660,CVE-2020-29661 JIRA References: Sources used: SUSE Linux Enterprise Module for Public Cloud 15-SP2 (src): kernel-azure-5.3.18-18.32.1, kernel-source-azure-5.3.18-18.32.1, kernel-syms-azure-5.3.18-18.32.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
SUSE-SU-2021:0108-1: An update that solves 13 vulnerabilities and has 89 fixes is now available. Category: security (important) Bug References: 1040855,1044120,1044767,1055117,1065729,1094840,1109695,1115431,1138374,1149032,1152457,1152472,1152489,1155518,1156315,1156395,1163727,1165933,1167657,1168952,1171000,1171078,1171688,1172145,1172733,1174486,1175079,1175480,1176396,1176942,1177326,1177500,1177666,1177679,1177733,1178049,1178203,1178270,1178612,1178660,1178780,1179107,1179204,1179419,1179434,1179435,1179519,1179575,1179604,1179652,1179656,1179670,1179671,1179672,1179673,1179675,1179676,1179677,1179678,1179679,1179680,1179681,1179682,1179683,1179684,1179685,1179687,1179688,1179689,1179690,1179703,1179704,1179707,1179709,1179710,1179711,1179712,1179713,1179714,1179715,1179716,1179745,1179763,1179888,1179892,1179896,1179960,1179963,1180027,1180029,1180031,1180052,1180056,1180086,1180117,1180258,1180261,1180349,1180506,1180541,1180559,1180566 CVE References: CVE-2020-0444,CVE-2020-0465,CVE-2020-0466,CVE-2020-11668,CVE-2020-27068,CVE-2020-27777,CVE-2020-27825,CVE-2020-27830,CVE-2020-29370,CVE-2020-29373,CVE-2020-29660,CVE-2020-29661,CVE-2020-36158 JIRA References: Sources used: SUSE Linux Enterprise Module for Realtime 15-SP2 (src): kernel-rt-5.3.18-22.1, kernel-rt_debug-5.3.18-22.1, kernel-source-rt-5.3.18-22.1, kernel-syms-rt-5.3.18-22.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
This is an autogenerated message for OBS integration: This bug (1178203) was mentioned in https://build.opensuse.org/request/show/862934 15.2 / kernel-source
SUSE-SU-2021:0117-1: An update that solves 15 vulnerabilities and has 98 fixes is now available. Category: security (moderate) Bug References: 1040855,1044120,1044767,1055117,1065729,1094840,1109695,1115431,1138374,1139944,1149032,1152457,1152472,1152489,1155518,1156315,1156395,1158775,1161099,1163727,1165933,1167657,1168952,1171000,1171078,1171688,1172145,1172733,1174486,1175079,1175480,1175995,1176396,1176942,1176956,1177326,1177500,1177666,1177679,1177733,1178049,1178203,1178270,1178372,1178590,1178612,1178634,1178660,1178756,1178780,1179107,1179204,1179419,1179434,1179435,1179519,1179575,1179578,1179601,1179604,1179639,1179652,1179656,1179670,1179671,1179672,1179673,1179675,1179676,1179677,1179678,1179679,1179680,1179681,1179682,1179683,1179684,1179685,1179687,1179688,1179689,1179690,1179703,1179704,1179707,1179709,1179710,1179711,1179712,1179713,1179714,1179715,1179716,1179745,1179763,1179888,1179892,1179896,1179960,1179963,1180027,1180029,1180031,1180052,1180056,1180086,1180117,1180258,1180261,1180506,1180541,1180559,1180566 CVE References: CVE-2020-0444,CVE-2020-0465,CVE-2020-0466,CVE-2020-11668,CVE-2020-27068,CVE-2020-27777,CVE-2020-27786,CVE-2020-27825,CVE-2020-27830,CVE-2020-28374,CVE-2020-29370,CVE-2020-29373,CVE-2020-29660,CVE-2020-29661,CVE-2020-36158 JIRA References: Sources used: SUSE Linux Enterprise Workstation Extension 15-SP2 (src): kernel-default-5.3.18-24.46.1 SUSE Linux Enterprise Module for Live Patching 15-SP2 (src): kernel-default-5.3.18-24.46.1, kernel-livepatch-SLE15-SP2_Update_9-1-5.3.1 SUSE Linux Enterprise Module for Legacy Software 15-SP2 (src): kernel-default-5.3.18-24.46.1 SUSE Linux Enterprise Module for Development Tools 15-SP2 (src): kernel-docs-5.3.18-24.46.1, kernel-obs-build-5.3.18-24.46.1, kernel-preempt-5.3.18-24.46.1, kernel-source-5.3.18-24.46.1, kernel-syms-5.3.18-24.46.1 SUSE Linux Enterprise Module for Basesystem 15-SP2 (src): kernel-default-5.3.18-24.46.1, kernel-default-base-5.3.18-24.46.1.9.19.1, kernel-preempt-5.3.18-24.46.1, kernel-source-5.3.18-24.46.1 SUSE Linux Enterprise High Availability 15-SP2 (src): kernel-default-5.3.18-24.46.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
openSUSE-SU-2021:0060-1: An update that solves 17 vulnerabilities and has 99 fixes is now available. Category: security (important) Bug References: 1040855,1044120,1044767,1055117,1065729,1094840,1109695,1115431,1138374,1139944,1149032,1152457,1152472,1152489,1155518,1156315,1156395,1158775,1161099,1163727,1165933,1168952,1171000,1171078,1171688,1172145,1172733,1174486,1175079,1175389,1175480,1175995,1176396,1176846,1176942,1176956,1177326,1177500,1177666,1177679,1177733,1178049,1178203,1178270,1178372,1178590,1178612,1178634,1178660,1178756,1178780,1179107,1179204,1179419,1179434,1179435,1179519,1179575,1179578,1179601,1179604,1179639,1179652,1179656,1179670,1179671,1179672,1179673,1179675,1179676,1179677,1179678,1179679,1179680,1179681,1179682,1179683,1179684,1179685,1179687,1179688,1179689,1179690,1179703,1179704,1179707,1179709,1179710,1179711,1179712,1179713,1179714,1179715,1179716,1179745,1179763,1179878,1179888,1179892,1179896,1179960,1179963,1180027,1180029,1180031,1180052,1180056,1180086,1180117,1180258,1180261,1180506,1180541,1180559,1180566,1180773 CVE References: CVE-2020-0444,CVE-2020-0465,CVE-2020-0466,CVE-2020-11668,CVE-2020-25639,CVE-2020-27068,CVE-2020-27777,CVE-2020-27786,CVE-2020-27825,CVE-2020-27830,CVE-2020-27835,CVE-2020-28374,CVE-2020-29370,CVE-2020-29373,CVE-2020-29660,CVE-2020-29661,CVE-2020-36158 JIRA References: Sources used: openSUSE Leap 15.2 (src): kernel-debug-5.3.18-lp152.60.1, kernel-default-5.3.18-lp152.60.1, kernel-docs-5.3.18-lp152.60.1, kernel-kvmsmall-5.3.18-lp152.60.1, kernel-obs-build-5.3.18-lp152.60.1, kernel-obs-qa-5.3.18-lp152.60.1, kernel-preempt-5.3.18-lp152.60.1, kernel-source-5.3.18-lp152.60.1, kernel-syms-5.3.18-lp152.60.1
openSUSE-SU-2021:0242-1: An update that solves 79 vulnerabilities and has 676 fixes is now available. Category: security (moderate) Bug References: 1034995,1040855,1043347,1044120,1044767,1055014,1055117,1055186,1058115,1061843,1065600,1065729,1066382,1071995,1077428,1085030,1094244,1094840,1109695,1115431,1120163,1129923,1133021,1134760,1136666,1138374,1139944,1148868,1149032,1152148,1152457,1152472,1152489,1153274,1154353,1154488,1154492,1154824,1155518,1155798,1156315,1156395,1157169,1158050,1158242,1158265,1158748,1158765,1158775,1158983,1159058,1159781,1159867,1159886,1160388,1160634,1160947,1161099,1161495,1162002,1162063,1162209,1162400,1162702,1163592,1163727,1164648,1164777,1164780,1165211,1165455,1165629,1165692,1165933,1165975,1166146,1166166,1166340,1166965,1166985,1167030,1167104,1167527,1167651,1167657,1167773,1167851,1168230,1168461,1168468,1168779,1168838,1168952,1168959,1169021,1169094,1169194,1169263,1169514,1169681,1169763,1169771,1169790,1169795,1170011,1170139,1170232,1170284,1170415,1170442,1170617,1170621,1170774,1170879,1170891,1170895,1171000,1171068,1171073,1171078,1171117,1171150,1171156,1171189,1171191,1171218,1171219,1171220,1171236,1171242,1171246,1171285,1171293,1171374,1171390,1171391,1171392,1171417,1171426,1171507,1171513,1171514,1171529,1171530,1171558,1171634,1171644,1171662,1171675,1171688,1171699,1171709,1171730,1171732,1171736,1171739,1171742,1171743,1171759,1171773,1171774,1171775,1171776,1171777,1171778,1171779,1171780,1171781,1171782,1171783,1171784,1171785,1171786,1171787,1171788,1171789,1171790,1171791,1171792,1171793,1171794,1171795,1171796,1171797,1171798,1171799,1171810,1171827,1171828,1171832,1171833,1171834,1171835,1171839,1171840,1171841,1171842,1171843,1171844,1171849,1171857,1171868,1171904,1171915,1171982,1171983,1171988,1172017,1172046,1172061,1172062,1172063,1172064,1172065,1172066,1172067,1172068,1172069,1172073,1172086,1172095,1172108,1172145,1172169,1172170,1172197,1172201,1172208,1172223,1172247,1172317,1172342,1172343,1172344,1172365,1172366,1172374,1172391,1172393,1172394,1172418,1172419,1172453,1172458,1172467,1172484,1172537,1172543,1172687,1172719,1172733,1172739,1172751,1172757,1172759,1172775,1172781,1172782,1172783,1172814,1172823,1172841,1172871,1172873,1172938,1172939,1172940,1172956,1172963,1172983,1172984,1172985,1172986,1172987,1172988,1172989,1172990,1172999,1173017,1173068,1173074,1173085,1173115,1173139,1173206,1173267,1173271,1173280,1173284,1173428,1173438,1173461,1173468,1173485,1173514,1173552,1173573,1173625,1173746,1173776,1173798,1173813,1173817,1173818,1173820,1173822,1173823,1173824,1173825,1173826,1173827,1173828,1173830,1173831,1173832,1173833,1173834,1173836,1173837,1173838,1173839,1173841,1173843,1173844,1173845,1173847,1173849,1173860,1173894,1173941,1173954,1174002,1174003,1174018,1174026,1174029,1174072,1174098,1174110,1174111,1174116,1174126,1174127,1174128,1174129,1174146,1174185,1174205,1174244,1174263,1174264,1174331,1174332,1174333,1174345,1174356,1174358,1174362,1174387,1174396,1174398,1174407,1174409,1174411,1174438,1174462,1174484,1174486,1174513,1174527,1174625,1174627,1174645,1174689,1174699,1174737,1174748,1174757,1174762,1174770,1174771,1174777,1174805,1174824,1174825,1174852,1174865,1174880,1174897,1174899,1174906,1174969,1175009,1175010,1175011,1175012,1175013,1175014,1175015,1175016,1175017,1175018,1175019,1175020,1175021,1175052,1175079,1175112,1175116,1175128,1175149,1175175,1175176,1175180,1175181,1175182,1175183,1175184,1175185,1175186,1175187,1175188,1175189,1175190,1175191,1175192,1175195,1175199,1175213,1175232,1175263,1175284,1175296,1175306,1175344,1175345,1175346,1175347,1175367,1175377,1175440,1175480,1175493,1175546,1175550,1175599,1175621,1175654,1175667,1175691,1175718,1175721,1175749,1175768,1175769,1175770,1175771,1175772,1175774,1175775,1175787,1175807,1175834,1175873,1175882,1175898,1175918,1175952,1175995,1175996,1175997,1175998,1175999,1176000,1176001,1176019,1176022,1176038,1176063,1176069,1176109,1176137,1176180,1176200,1176235,1176236,1176237,1176242,1176354,1176357,1176358,1176359,1176360,1176361,1176362,1176363,1176364,1176365,1176366,1176367,1176381,1176396,1176400,1176423,1176449,1176481,1176485,1176486,1176507,1176536,1176537,1176538,1176539,1176540,1176541,1176542,1176543,1176544,1176545,1176546,1176548,1176558,1176559,1176564,1176586,1176587,1176588,1176659,1176698,1176699,1176700,1176713,1176721,1176722,1176725,1176732,1176763,1176775,1176788,1176789,1176833,1176855,1176869,1176877,1176907,1176925,1176942,1176956,1176962,1176979,1176980,1176983,1176990,1177021,1177030,1177066,1177070,1177086,1177090,1177109,1177121,1177193,1177194,1177206,1177258,1177271,1177281,1177283,1177284,1177285,1177286,1177297,1177326,1177353,1177384,1177397,1177410,1177411,1177470,1177500,1177511,1177617,1177666,1177679,1177681,1177683,1177687,1177694,1177697,1177698,1177703,1177719,1177724,1177725,1177726,1177733,1177739,1177749,1177750,1177754,1177755,1177765,1177766,1177799,1177801,1177814,1177817,1177820,1177854,1177855,1177856,1177861,1178002,1178049,1178079,1178123,1178166,1178173,1178175,1178176,1178177,1178182,1178183,1178184,1178185,1178186,1178190,1178191,1178203,1178227,1178246,1178255,1178270,1178286,1178307,1178330,1178393,1178395,1178401,1178426,1178461,1178579,1178581,1178584,1178585,1178589,1178590,1178612,1178634,1178635,1178653,1178659,1178660,1178661,1178669,1178686,1178740,1178755,1178756,1178762,1178780,1178838,1178853,1178886,1179001,1179012,1179014,1179015,1179045,1179076,1179082,1179107,1179140,1179141,1179160,1179201,1179204,1179211,1179217,1179419,1179424,1179425,1179426,1179427,1179429,1179432,1179434,1179435,1179442,1179519,1179550,1179575,1179578,1179601,1179604,1179639,1179652,1179656,1179670,1179671,1179672,1179673,1179675,1179676,1179677,1179678,1179679,1179680,1179681,1179682,1179683,1179684,1179685,1179687,1179688,1179689,1179690,1179703,1179704,1179707,1179709,1179710,1179711,1179712,1179713,1179714,1179715,1179716,1179745,1179763,1179887,1179888,1179892,1179896,1179960,1179963,1180027,1180029,1180031,1180052,1180056,1180086,1180117,1180258,1180261,1180349,1180506,1180541,1180559,1180566,173030,744692,789311,954532,995541 CVE References: CVE-2019-19462,CVE-2019-20810,CVE-2019-20812,CVE-2020-0110,CVE-2020-0305,CVE-2020-0404,CVE-2020-0427,CVE-2020-0431,CVE-2020-0432,CVE-2020-0444,CVE-2020-0465,CVE-2020-0466,CVE-2020-0543,CVE-2020-10135,CVE-2020-10711,CVE-2020-10732,CVE-2020-10751,CVE-2020-10757,CVE-2020-10766,CVE-2020-10767,CVE-2020-10768,CVE-2020-10773,CVE-2020-10781,CVE-2020-11668,CVE-2020-12351,CVE-2020-12352,CVE-2020-12652,CVE-2020-12656,CVE-2020-12769,CVE-2020-12771,CVE-2020-12888,CVE-2020-13143,CVE-2020-13974,CVE-2020-14314,CVE-2020-14331,CVE-2020-14351,CVE-2020-14356,CVE-2020-14385,CVE-2020-14386,CVE-2020-14390,CVE-2020-14416,CVE-2020-15393,CVE-2020-15436,CVE-2020-15437,CVE-2020-15780,CVE-2020-16120,CVE-2020-16166,CVE-2020-1749,CVE-2020-24490,CVE-2020-2521,CVE-2020-25212,CVE-2020-25284,CVE-2020-25285,CVE-2020-25641,CVE-2020-25643,CVE-2020-25645,CVE-2020-25656,CVE-2020-25668,CVE-2020-25669,CVE-2020-25704,CVE-2020-25705,CVE-2020-26088,CVE-2020-27068,CVE-2020-27777,CVE-2020-27786,CVE-2020-27825,CVE-2020-27830,CVE-2020-28915,CVE-2020-28941,CVE-2020-28974,CVE-2020-29369,CVE-2020-29370,CVE-2020-29371,CVE-2020-29373,CVE-2020-29660,CVE-2020-29661,CVE-2020-36158,CVE-2020-4788,CVE-2020-8694 JIRA References: Sources used: openSUSE Leap 15.2 (src): kernel-rt-5.3.18-lp152.3.5.1, kernel-rt_debug-5.3.18-lp152.3.5.1, kernel-source-rt-5.3.18-lp152.3.5.1, kernel-syms-rt-5.3.18-lp152.3.5.1