uaudio fullduplex on 5.4-RELEASE?

Hans Petter Selasky hselasky at
Fri Sep 2 11:53:54 PDT 2005

On Friday 02 September 2005 19:21, Kazuhito HONDA wrote:
> Hello,
> In <200508312243.55828.hselasky at>, hselasky at wrote:
> >> Then if you have "uaudio" in the kernel, recompile the kernel. Else
> >> recompile
> >>
> >> the module, "sys/modules/uaudio". If full duplex doesn't work, then:
> >>
> >> Download the three files below into a new directory and type
> >> "make install"  (to uninstall type "make deinstall")
> >>
> >>
> >>
> I checked that uaudio fullduplex worked with no problem by this patch.
> When do you apply the patch to the source tree?

I haven't got any commit rights so I cannot do so much. My plan is to port my 
patch kit to NetBSD. Then FreeBSD and NetBSD can be upgraded at the same 
time, without ending up with two different branches. This is one reason 
someone is using, for holding my patch kit back.

My patch kit should support everything that you need for high-speed 

OHCI : isochronous (tested)
UHCI : isochronous (tested)
EHCI : low speed isocronous (tested)
EHCI : high speed isocronous (not tested on real devices, but assumed to work)

Also my system will automatically adjust in case of data underflow. At this 
point you can just forget the official USB drivers for *BSD. Also the 
official EHCI driver completely lacks isochronous support.

My patch kit also includes a new USB API, that can easily get your uaudio 
driver out if Giant. See "/sys/dev/usb2/_ugen.c" for some examples on how to 
use it. I have a newer version of "_ugen.c" that fully supports isochronous 
transfers, read and write. Please have a look at the attached file, if the 
list mailer doesn't strip it off then. Note: the attached file does not 
compile with "new_usb_1_5_4", hence there are some missing ioctl definitions.

> Would you please remove the codes
> to forbid uaudio fullduplex at that time?

I have added this to my todo file, and will include a patch for this in my 
distribution next time I make a release. Ok.

Do you know of any USB audio devices that use USB 2.0? You might have to 
change the code a little bit, hence USB 2.0 processes 8 times as many frames 
per second as USB 1.x. See "/sys/dev/usb2/_ugen.c" for how you can test for 
USB2.0. Note that you cannot send more than 0xC00 bytes per frame, with 
highspeed isochronous transfers. So maybe you have to spread sound data over 
multiple frames.


More information about the freebsd-multimedia mailing list