USB stack getting confused

Rozhuk Ivan rozhuk.im at gmail.com
Sat Mar 9 22:56:15 UTC 2019


On Sat, 9 Mar 2019 22:40:02 +0100
Hans Petter Selasky <hps at selasky.org> wrote:

> > Same problem with usb sound cards.
> > I try to fix it, but fail with dsp, only mixer can be fixed with
> > small code change. https://reviews.freebsd.org/D11140
> >   
> 
> Hi,
> 
> How will these apps detect that they need to open the new /dev/mixer
> node?
> 
> I mean, after hang is fixed, mixer app will still try to query the
> old file handle forever?
> 

Main problem for me is: usb device lost/reconnected, new device connected,
but FreeBSD does nothink because USB stack hang - it wait for all fd closed for mixer and dsp.

Apps can be rewrited/pathed: on dev lost - get error on operations with fd, then try to reopen it.
I dont remember now how that work in patch, it is undone.
Another OSS issue - apps do not react on hw.snd.default_unit change.

I mitigate reconnect issue in hardware:
- switch to sound via HDMI
- add real LC filter to home power line: I have long USB link from PC to work place USB HUB with
kb, mouse, usb sound ...,and every time after refregerator start/stop I got lost USB link to hub,
LC filter fix this. After that kb, mouse and other usb devices does not replug untill I close
all apps that have opened fd from mixer and dsp.




More information about the freebsd-hackers mailing list