Date: Thu, 28 Jun 2007 16:28:59 +0200 From: Hans Petter Selasky <hselasky@c2i.net> To: Alexander Leidinger <Alexander@leidinger.net> Cc: freebsd-multimedia@freebsd.org, "Robin P. Blanchard" <robin.blanchard@georgiacenter.uga.edu> Subject: Re: RELENG_6 + usb audio ? Message-ID: <200706281628.59367.hselasky@c2i.net> In-Reply-To: <20070628130131.hinbxfi78k080ck8@webmail.leidinger.net> References: <7FDFD29DD240104598AADEAF34F2730F94F1@ex1.gc.nat> <200706281244.28523.hselasky@c2i.net> <20070628130131.hinbxfi78k080ck8@webmail.leidinger.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Alexander,
It is a problem in the USB code. Check all the "isoc.*enter" methods, and make
sure that they look something like this:
/* get the current frame index */
nframes = EOREAD4(sc, EHCI_FRINDEX) / 8;
/* check if the frame index is within
* the window where the frames will be
* inserted
*/
buf_offset = (nframes - xfer->pipe->isoc_next) &
(EHCI_VIRTUAL_FRAMELIST_COUNT-1);
if ((LIST_FIRST(&(xfer->pipe->list_head)) == NULL) ||
(buf_offset < xfer->nframes))
{
/* If there is data underflow or the pipe queue is
* empty we schedule the transfer a few frames ahead
* of the current frame position. Else two
* isochronous transfers might overlap.
*/
xfer->pipe->isoc_next = (nframes + 3) &
(EHCI_VIRTUAL_FRAMELIST_COUNT-1);
DPRINTFN(2,("start next=%d\n", xfer->pipe->isoc_next));
}
--HPS
On Thursday 28 June 2007 13:01, Alexander Leidinger wrote:
> Quoting Hans Petter Selasky <hselasky@c2i.net> (from Thu, 28 Jun 2007
>
> 12:44:28 +0200):
> > On Thursday 28 June 2007 11:40, Alexander Leidinger wrote:
> >> Quoting Hans Petter Selasky <hselasky@c2i.net> (from Wed, 27 Jun 2007
> >>
> >> 18:23:08 +0200):
> >> > Hi,
> >> >
> >> > USB Audio works fine with my new USB stack, also called HPS USB stack.
> >> > There are some problems with the official USB stack regarding
> >> > isochronous transfers.
> >>
> >> Can you please be more specific?
> >
> > Yes, last time I checked, the start position where the isochronous
> > transfers are inserted, was not updated properly when there was data
> > underrun.
>
> Is this a problem in uaudio or in the USB code? If it is the former,
> can you please point out the code in question in a way that someone
> without knowledge of the USB system is able to fix this? If it is the
> later, would you please tell Warner about it in a way that he can
> investigate this (I'm sure you can tell if the fix is a
> nearly-one-liner and where it needs to be done). We are approaching
> the release of 7.0 and it would be nice if easy to fix bugs which are
> known are fixed until then.
>
> > Secondly, full-duplex was not working with OHCI hardware, right?
>
> AFAIK: yes. This may or may not an issue in this case.
>
> Bye,
> Alexander.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706281628.59367.hselasky>
