USB isochronous traffic with Rasberry Pi [WAS: Re: USB audio device on Raspberry Pi]

Ian Lepore ian at FreeBSD.org
Mon May 5 15:36:08 UTC 2014


On Mon, 2014-05-05 at 09:28 -0600, Ian Lepore wrote:
> On Mon, 2014-05-05 at 08:18 -0700, Adrian Chadd wrote:
> > evil idea:
> > 
> > #define DELAY(ms) _DELAY(ms, __FILE__, __LINE__)
> > 
> > .. then modify the relevant arm delay function to take FILE/LINE and
> > KTR log it. :-)
> > 
> > 
> > -a
> 
> Except some uart console output routines are structured like
> 
>     while (!readreg(STATUS) & TXRDY)
>         DELAY(n);
> 
> I don't know why people think that calling delay in busy loops like that
> has any value, considering that DELAY is almost always implemented as
> some form of
> 
>     while (readreg(COUNTER) < target_count)
>         ;
> 
> I guess maybe it has value only in that it helps you find busy-loops.
> I'd rather that we had a function just for that purpose, like
> 
>     while (readreg(COUNTER) < target_count)
>         cpu_busy_loop();
> 
> (We have something like that that's x86-specific, iirc).
> 
> -- Ian

Oh never mind, I just noticed you said KTR, not printf.

-- Ian




More information about the freebsd-arm mailing list