Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Mar 2019 01:56:08 +0300
From:      Rozhuk Ivan <rozhuk.im@gmail.com>
To:        Hans Petter Selasky <hps@selasky.org>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, FreeBSD Hackers <freebsd-hackers@freebsd.org>, "O'Connor, Daniel" <darius@dons.net.au>
Subject:   Re: USB stack getting confused
Message-ID:  <20190310015608.4d32e14f@rimwks>
In-Reply-To: <e2f04e0b-0f52-686a-5253-caa25a498182@selasky.org>
References:  <E0371188-FD0A-47E1-8378-40239F5C6622@dons.net.au> <f3e6e30b-8b62-546b-2b51-e841f2e645bd@selasky.org> <3B29D870-41F9-46AF-B9F3-03106DEC417D@dons.net.au> <20190309152613.GM2492@kib.kiev.ua> <ea6e2690-1ad7-6c06-49e5-c528013f26c0@selasky.org> <20190309162640.GN2492@kib.kiev.ua> <20190309222827.5407ddbf@rimwks> <e2f04e0b-0f52-686a-5253-caa25a498182@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 9 Mar 2019 22:40:02 +0100
Hans Petter Selasky <hps@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.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190310015608.4d32e14f>