From owner-freebsd-usb@FreeBSD.ORG Sat Sep 29 09:27:18 2007 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE38E16A417 for ; Sat, 29 Sep 2007 09:27:18 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 9FA0913C455 for ; Sat, 29 Sep 2007 09:27:18 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.1/8.13.4) with ESMTP id l8T9OqH5031934; Sat, 29 Sep 2007 03:24:52 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 29 Sep 2007 03:24:55 -0600 (MDT) Message-Id: <20070929.032455.-713548378.imp@bsdimp.com> To: xiaofanc@gmail.com From: "M. Warner Losh" In-Reply-To: References: X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 29 Sep 2007 03:24:52 -0600 (MDT) Cc: freebsd-usb@freebsd.org Subject: Re: snd_uaudio with libusb ? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Sep 2007 09:27:18 -0000 In message: "Xiaofan Chen" writes: : On 9/29/07, Chuck T. 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