[alsa-devel] Period time/size in adaptive USB - alignment to nrpacks?

Clemens Ladisch clemens at ladisch.de
Wed Dec 28 14:00:55 CET 2011

Pavel Hofman wrote:
>Each URB is issued always at nrpacks
>milliseconds. Each URB transfers 48 samples * 2 bytes * 2 channels *
>nrpacks milliseconds of bytes. The last URB of period keeps the same
>pace (nrpacks milliseconds), however holds only the remaining number of

No, the period's last URB uses only as many frames as needed.

>This creates ripples in the data stream bitrate, possibly
>to increased jitter of the PLL'd clock in the USB receiver.

Did you actually observe this?

>I am wondering if for the xx.000 Hz samplerates it made sense to offer
>only these aligned multiples in snd_pcm_hw_params_set_period_time_near.

Only for adaptive playback. And the URB length is also
derived from the period size, so I'd be interested in seeing
how this constraint would be implemented.


More information about the Alsa-devel mailing list