From owner-freebsd-usb@FreeBSD.ORG Sat Sep 29 09:13:06 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 C7CAF16A417 for ; Sat, 29 Sep 2007 09:13:06 +0000 (UTC) (envelope-from xiaofanc@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.178]) by mx1.freebsd.org (Postfix) with ESMTP id A2EB713C43E for ; Sat, 29 Sep 2007 09:13:06 +0000 (UTC) (envelope-from xiaofanc@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so3919220waf for ; Sat, 29 Sep 2007 02:13:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=IoNLV24Fgk8OBCfIaPaeeYfWxJp337XB0DlM/0vZtU8=; b=t3VX0GRKuZzbNior98PHWATx8l10u3nYpPhxFXd6v1SYquoZnhV9hZYmlbG+nIyaUe7UMSdDmAls+yeO/o08s8pzoySPwW0DmxV0Z6/qVgHwTKj1FQdQ2vAMgAcKMB1+8eRRTvKuPFJ5jaPbABL3ZpUm7RuTb0uKX0g5BZkwYQk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=FxSkVKX9eUK60u2XaGJi/eGE1nOSFL7szqQA3BcJ6DPvMap8gu3gE3pYgM3wwYDcb73Zu/CfzjpstR8gJtUuVPaMLTGNfznkAZRSWgaDNDr5m+3ZLh+Atc0S2pd4ubhlx58y2kTh+FAtDtn7S9Yjx2y+S/Bj8F1DDpag3vykdU4= Received: by 10.114.157.1 with SMTP id f1mr781922wae.1191057186060; Sat, 29 Sep 2007 02:13:06 -0700 (PDT) Received: by 10.114.176.17 with HTTP; Sat, 29 Sep 2007 02:13:06 -0700 (PDT) Message-ID: Date: Sat, 29 Sep 2007 17:13:06 +0800 From: "Xiaofan Chen" To: "Chuck T." In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: 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:13:06 -0000 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. Xiaofan