Re: Audio I/O parameters

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

 



On Mon, 15 Jul 2013, Clemens Ladisch wrote:

> > The interrupts shouldn't differ by more than the duration of one URB,
> > which would be 1 ms.  There is an initial delay when a stream is first
> > started, which generally lasts 5-10 ms.  But I think that hasn't
> > changed since the 3.5 kernel.  Would it make any difference?
> 
> The initial delay does not really matter as long as it's the same for
> both streams.  (A difference of 1 ms would be significant if the period
> size is that short.)
> 
> > Bear in mind that the input and output streams are started at totally
> > different times.
> 
> Jack takes great care to start them together.

If both streams are started at the same time then the initial delays
won't differ by much more than the endpoint periods.  For audio, the
periods all seem to be 1 (either 1 frame or 1 microframe, depending on
the device's speed).  So I guess this should not be an issue.

My remark above refers to some of the usbmon traces provided during 
earlier testing.  For example, this one

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1191603/+attachment/3714903/+files/1.mon.out

shows the output stream starting at timestamp 3752849102 and the input 
stream starting at timestamp 3753752104, about 900 ms later.  Of 
course, it's possible that James told JACK to start them separately.

> > And anyway, James's latest problem occurs even with playback only.
> 
> On my machine, 3 x 8 frames works, although Jack often complains that
> two periods are already completed when it expected only one.  Anything
> less (2 x 8 frames) does not work; and 8 frames is where even my PCI
> card begines to make problems.
> 
> In any case, "poll timeout" would not indicate completion delays but
> that no data was transferred _at all_.  In theory, this should not be
> possible.  I'm stumped at the moment.

The odd thing is that that at least one of the usbmon traces showed the
audio streams getting shut down almost as soon as the audio-in started
-- after only the first one or two URBs have completed.  That might
explain why the poll was timing out.  But why were the streams stopped?

James, did you ever provide a usbmon trace for 3.8 doing playback only
and using 64 frames/period?  I don't recall seeing any.  It might help.

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