Date: Sat, 29 Sep 2007 03:24:55 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: xiaofanc@gmail.com Cc: freebsd-usb@freebsd.org Subject: Re: snd_uaudio with libusb ? Message-ID: <20070929.032455.-713548378.imp@bsdimp.com> In-Reply-To: <a276da400709290213v6d747d3bh4f3e4de212d5b602@mail.gmail.com> References: <a276da400709281906m28bacac2r80c27074e222c597@mail.gmail.com> <BAY116-W245D862663F945A3204C2CC7B30@phx.gbl> <a276da400709290213v6d747d3bh4f3e4de212d5b602@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <a276da400709290213v6d747d3bh4f3e4de212d5b602@mail.gmail.com>
"Xiaofan Chen" <xiaofanc@gmail.com> writes:
: On 9/29/07, Chuck T. <freebsdfan@hotmail.com> wrote:
: >
: > >I think your device is a USB composite USB device with two
: > >interfaces (one for USB audio and the other for GPIO). How
: > >do you control the GPIO under Linux (by control transfer
: > >or interrupt/bulk transfer)? If the Linux application indeed
: > >works at the same time as the USB audio, then Linux
: > >does bind different driver to different interfaces (one for
: > >the usb audio interface and no driver for the GPIO interface).
: >
: > I talk to the GPIO bits via vendor specific requests to the control pipe.
: > I do a usb_open() when my application loads and never close it. When I need
: > to set a GPIO bit I use usb_control_msg(). I've never "looked under the
: > covers" to see why it works, but it does.
: >
:
: So this works under Linux but not FreeBSD. Maybe this is just a limitation
: of libusb under FreeBSD. Anyway, it is said that libusb is just a thin
: wrapper on top of USB. You may want to use the lower level api instead.
:
: I confess I do not know further (like how to bind ugen to individual interfaces
: and use IOCTL to perform usb transfer). But if post some codes,
: others may be able to help you.
You can only do a subset of the ugen operations with /dev/usb, but
maybe it would be enough. I believe that the control messages are on
the list of things that you can do, however...
Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070929.032455.-713548378.imp>
