On Mon, Apr 24, 2017 at 08:29:17AM +0200, Alexandre Ratchov wrote: > On Mon, Apr 24, 2017 at 01:04:12AM +0800, Michael W. Bombardieri wrote: > > Hi, > > > > When I remove uaudio_drain() on my laptop the attach/detach still > > seems to work as expected. > > I did a test with two usb soundcards. Audio files were played & > > recorded using aucat. > > > > * boot system (no audio device because I disabled azalia) > > * attach device1 (Creative card) > > * play wav file1 (reference file) > > * detach device1 > > * attach device2 (Yamaha card) > > * play wav file1 > > * record wav file2 > > * detach device2 > > * attach device2 > > * play wav file2 > > * detach device2 > > * attach device1 > > * play wav file2 > > * detach device1 > > > > So far this has only been tested on amd64. Maybe it produces > > issues for your uaudio device though. > > > > AFAICS this is correct. uaudio_drain() used to be the "drain" > method, but the audio(4) layer doesn't use it anymore. IMO, it > shouldn't be called by uaudio_detach(), the device is gone and > there are no outstanding requests.
FWIW I have now tested this diff on i386. Everything worked ok. One test I neglected earlier was to physically disconnect usb audio device while playing or recording with aucat--that also worked.