Re: [alsa-devel] Fw: Isochronous transfer error on USB3

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

 



Mauro Carvalho Chehab wrote:
> Clemens Ladisch <clemens@xxxxxxxxxx> escreveu:
>> Mauro Carvalho Chehab wrote:
>>> 	.period_bytes_min = 64,		/* 12544/2, */
>>
>> This is wrong (if the driver doesn't install other constraints on the
>> period length, like the USB audio class driver does).
>
> Ok, how should it be estimated?

This value specifies how fast the driver can report period interrupts,
i.e., how often it can call snd_pcm_period_elapsed().  In other words,
if the application configures the device for this minimum period size,
but if it is possible for this amount of bytes to be transferred
_without_ triggering an interrupt (by reaching the end of the URB), then
this value was too low.

The em28xx driver uses a fixed URB size, so actual interrupts happen
every 64 frames, so this value should be at least the number of bytes
that can be transferred in 64 ms (assuming a full-speed device).

Because you do not know the exact number of samples that will be sent
per frame, it is possible that the USB interrupt happens up to 63 ms
after the point where the period interrupt should actually have
happened.  This jitter could be reduced by using shorter URBs.

In any case, this driver does not need the integer constraint on the
period count.


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




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux