From owner-freebsd-current@FreeBSD.ORG Sun Nov 16 12:54:04 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C27F71065678 for ; Sun, 16 Nov 2008 12:54:04 +0000 (UTC) (envelope-from shoesoft@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 2AF1B8FC13 for ; Sun, 16 Nov 2008 12:54:03 +0000 (UTC) (envelope-from shoesoft@gmx.net) Received: (qmail invoked by alias); 16 Nov 2008 12:54:01 -0000 Received: from 85-127-251-132.dynamic.xdsl-line.inode.at (EHLO taxman.pepperland) [85.127.251.132] by mail.gmx.net (mp006) with SMTP; 16 Nov 2008 13:54:01 +0100 X-Authenticated: #16703784 X-Provags-ID: V01U2FsdGVkX18JaZ8SnCsJGTZRQmxZCMU3psieqt5LBKiJO4afAa mUOL16vGIbmuJz From: Stefan Ehmann To: Hans Petter Selasky Date: Sun, 16 Nov 2008 13:53:59 +0100 User-Agent: KMail/1.10.3 (FreeBSD/7.1-PRERELEASE; KDE/4.1.3; i386; ; ) References: <200811141541.49595.shoesoft@gmx.net> <200811151022.56606.hselasky@c2i.net> <200811161131.39014.hselasky@c2i.net> In-Reply-To: <200811161131.39014.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811161354.00767.shoesoft@gmx.net> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.5 Cc: freebsd-current@freebsd.org Subject: Re: usb2: no sound with M-Audio Transit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2008 12:54:04 -0000 On Sunday 16 November 2008 11:31:38 Hans Petter Selasky wrote: > On Saturday 15 November 2008, Hans Petter Selasky wrote: > > On Saturday 15 November 2008, Stefan Ehmann wrote: > > > On Friday 14 November 2008 18:11:23 Hans Petter Selasky wrote: > > > > On Friday 14 November 2008, Stefan Ehmann wrote: > > > > > http://stud4.tuwien.ac.at/~e0125637/fbsd/transit_config.dump > > > > > > > > Maybe there is something wrong with the 16-bit to 24-bit data > > > > conversion ? > > > > > > One more thing: > > > > > > I'm using dfu-util for the firmware download. See > > > http://svn.openmoko.org/trunk/src/host/dfu-util/ > > > > > > The second usb_claim_interface() call fails. But that doesn't seem to > > > be fatal. If I comment out the exit() the download succeeds. > > > > > > Here's the output: > > > dfu-util - (C) 2007-2008 by OpenMoko Inc. > > > This program is Free Software and has ABSOLUTELY NO WARRANTY > > > > > > Opening USB Device 0x0000:0x0000... > > > Claiming USB DFU Runtime Interface... > > > Determining device status: state = dfuIDLE, status = 0 > > > WARNING: Runtime device already in DFU state ?!? > > > Found Runtime: [0x0763:0x2806] devnum=0, cfg=0, intf=0, alt=0, > > > name="RAM" Claiming USB DFU Interface... > > > Cannot claim interface: Unknown error > > > Setting Alternate Setting ... > > > Determining device status: state = dfuIDLE, status = 0 > > > dfuIDLE, continuing > > > Transfer Size = 0x0040 > > > bytes_per_hash=112 > > > Starting download: [##################################################] > > > finished! > > > state(7) = dfuMANIFEST, status(0) = No error condition is present > > > state(2) = dfuIDLE, status(0) = No error condition is present > > > Done! > > > can't detach: Unknown error > > > Resetting USB to switch back to runtime mode > > > error resetting after download: Unknown error > > > > > > > > > The problem is that after the download the device needs to be reset so > > > it gets recognized as uaudio device. This was not implemented in the > > > libusb from sourceforge for BSD. > > > > > > As a workaround you can slightly unplug the cable (I think I read this > > > on some netbsd list) which works but is not very convenient. > > > > > > The reset in dfu-util fails, possibly due to preceding errors. > > > > > > I also tried it with usbconfig: > > > # usbconfig -u 0 -a 2 reset > > > usbconfig: could not reset device: Device not configured > > > > > > And this error in dmesg > > > usb2_req_re_enumerate:1362: addr=2, getting device descriptor failed! > > > > > > This is not critical but it would be nice to get rid of this ugly > > > workaround. > > > > Hi, > > > > The problem is that the device changes its configuration descriptor and > > the reset implementation assumes that the configuration descriptor is the > > same after the reset. I will see if I can make a patch for this. I have > > the same problem when flashing the openmoko. > > > > I will make a patch for this by tomorrow. > > Hi, > > Could you try to checkout the latest sources from my private SVN, recompile > libusb20, usbconfig, USB2 modules and give all your USB devices a try? > > svn --username anonsvn --password anonsvn \ > checkout svn://svn.turbocat.net/i4b > > The problem about 24-bit audio is not solved yet, but I hope that the > device reset should work. Yes, the usbconfig reset is working now. No longer need to fiddle about with the cable, thanks!