[Bug 278055] USB devices connected to hub not accessible after audio device inactive

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 30 Mar 2024 20:14:39 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278055

            Bug ID: 278055
           Summary: USB devices connected to hub not accessible after
                    audio device inactive
           Product: Base System
           Version: 14.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: usb
          Assignee: usb@FreeBSD.org
          Reporter: fbsdbugs@sapka.me

Hey.

I use a Thinkpad X1 Extreme G2. I have an Ugreen USB hub/switch connected.
There are three devices connected to the hub:
- digital audio converter (Tempotec Sonata HD)
- keyboard (Bastard KB)
- yubikey

My audio setup after connecting hub:

 cat /dev/sndstat
Installed devices:
pcm0: <NVIDIA (0x0094) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0094) (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA (0x0094) (HDMI/DP 8ch)> (play)
pcm3: <Conexant (0x1f86) (Analog 2.0+HP)> (play)
pcm4: <USB audio> (play) default
No devices installed from userspace.


after connecting the hub, everything works fine. I can change the audio device
via

sysctl hw.snd.default_unit=4

However, If I disconnect the hub (switch to another device), the keyboard stops
working. The built-in one on the laptop works.

In my dmesg I can see

pcm4: unregister: channel pcm4:virtual:dsp4.vp1 busy (pid 96759)
pcm4: Waiting for sound application to exit!
pcm4: unregister: channel pcm4:virtual:dsp4.vp1 busy (pid 96759)
pcm4: Waiting for sound application to exit!
pcm4: unregister: channel pcm4:virtual:dsp4.vp1 busy (pid 96759)
pcm4: Waiting for sound application to exit!
pcm4: unregister: channel pcm4:virtual:dsp4.vp1 busy (pid 96759)
pcm4: Waiting for sound application to exit!

When I pkill this PID, reconnect the Hub everything starts working again.

-- 
You are receiving this mail because:
You are the assignee for the bug.