Re: usb-audio: Increasing MAX_QUEUE to prevent hiccups in the audio stream?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 15 Sep 2012, Matthijs Kooijman wrote:

> Hi folks,
> 
> I've spent some time this week trying to debug frequent hiccups in my
> audio playback, on my USB sound card. The short version is that it seems
> the 24 ms worth of queued URBs is not enough, since the urb complete handler
> is frequently called too late and sometimes more than 16ms (plus 8ms in
> the urb that completed is 24ms) too late, causing a hiccup in the sound.

...

>  - Or are the delays in the urb completion handler / interrupt by
>    definition a bug in (some other part of) the code? In that case, I
>    might be able to dig in deeper to find and fix the cause of the
>    delays, if someone can offer some suggestions about where to look for
>    the problem.

Delays that long should be looked into.  They may or may not be caused
by bugs, but the chance that they are means that they deserve
investigation.  The bugs don't have to like in the USB stack; they
could be anywhere in the kernel.  Tracking them down is not necessarily
easy to do.

One way to start is to use the "irqsoff" tracer (see 
Documentation/trace/ftrace.txt).  Turn on the tracer after the audio 
has started and leave it on until a "hiccup" occurs.

If that doesn't show anything useful, I can write a diagnostic patch 
for the ehci-hcd driver to see if there's a problem in the USB 
hardware.

As for whether MAX_QUEUE should be increased...  I don't see any harm
in it offhand, but I'm not involved in the audio drivers.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux