From owner-freebsd-usb@FreeBSD.ORG Wed Aug 7 13:47:05 2013 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2D9B1F58 for ; Wed, 7 Aug 2013 13:47:05 +0000 (UTC) (envelope-from hps@bitfrost.no) Received: from mta.bitpro.no (mta.bitpro.no [92.42.64.202]) by mx1.freebsd.org (Postfix) with ESMTP id B114E2D0C for ; Wed, 7 Aug 2013 13:47:04 +0000 (UTC) Received: from mail.lockless.no (mail.lockless.no [46.29.221.38]) by mta.bitpro.no (Postfix) with ESMTP id BA45F7A2AF; Wed, 7 Aug 2013 15:47:02 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.lockless.no (Postfix) with ESMTP id 3B8448F22EF; Wed, 7 Aug 2013 15:47:10 +0200 (CEST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at lockless.no Received: from mail.lockless.no ([127.0.0.1]) by localhost (mail.lockless.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oFLny5iTPtIH; Wed, 7 Aug 2013 15:47:09 +0200 (CEST) Received: from laptop015.hselasky.homeunix.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) by mail.lockless.no (Postfix) with ESMTPSA id 436048F22EE; Wed, 7 Aug 2013 15:47:09 +0200 (CEST) Message-ID: <5202502D.20702@bitfrost.no> Date: Wed, 07 Aug 2013 15:48:29 +0200 From: Hans Petter Selasky Organization: Bitfrost A/S User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130522 Thunderbird/17.0.6 MIME-Version: 1.0 To: SAITOU Toshihide Subject: Re: HS isochronous transfer on musb_otg References: <20130801.230713.74749403.toshi@ruby.ocn.ne.jp> <51FB5230.3000503@bitfrost.no> <20130807.210258.112628314.toshi@ruby.ocn.ne.jp> In-Reply-To: <20130807.210258.112628314.toshi@ruby.ocn.ne.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@FreeBSD.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Aug 2013 13:47:05 -0000 On 08/07/13 14:02, SAITOU Toshihide wrote: > In message: <51FB5230.3000503@bitfrost.no> > Hans Petter Selasky writes: >> On 08/01/13 16:07, SAITOU Toshihide wrote: >>> My UVC cam is not working with the musb_otg driver and >>> libusb(3) on the BeagleBone Black. >>> >> >> Hi, >> >> It might be that the packet multiplier is not set >> correctly. Try to figure out which register this is, and >> simply set the bits correctly. >> >> Thank you! >> >> --HPS >> >>> With the following changes to the musb_otg.c, it feels like >>> the transaction is performed as expected but the data >>> doesn't pass to the libusb_transfer's buffer. Does anyone >>> know what is wrong? > > > Thank you for your information, but still I don't understand > what is the packet multiplier. Fortunately, there is a > progress. > > With the patch at the end, the data from the UVC camera is > arrived into the libusb_transfer's buffer. Now the problem is > that the data of each transaction is scattered into the buffer > of the packet. > > (now) > > | packet size | packet size | packet size | packet size | > | DATA0 | DATA1 | DATA2 | DATA0 |... > > > (expected) > > | packet size | packet size | packet size | > | DATA0,1,2 | DATA0,1,2 | DATA0,1,2 |... > > > I think if the length of the packet is set using > libusb_set_iso_packet_length, all transaction data for the > packet should be packed into it, at this time, max packet size > is declared in the device descriptor so the device doesn't > send the packet larger than that. Are these right? If so, is > the musbotg_host_data_rx of musb_otg.c need to modify? > Hi, The scattering is a bug in the MUSB driver's handling of incoming data. It should collect more data before advancing to the next frame! See: mustbotg_host_data_rx() function. --HPS