[alsa-devel] adding hrtimer based delay to ioplug ALSA plugin on ARM9 (AT91) platform ?
Stefan Schoenleitner
dev.c0debabe at gmail.com
Thu Oct 1 14:32:58 CEST 2009
Hi,
I'm currently developing an ALSA ioplug plugin which should transfer
audio samples over UART to a DSP (I already wrote that in a previous post).
The DSP wants to receive 156 - 164 audio samples with a sampling rate of
8 kHz and a format of S16_LE each 20 msec (which is more or less the
number of audio samples multiplied by the period length of the sampling
rate).
My idea is to add a high precision delay to the transfer callback of the
ALSA plugin.
Unfortunately, I found out that the hrtimer resolution on the system is
as low as 10ms:
-------------------------------------------------------------------
kernel: hrtimer resolution: 0 sec, 10000000 nsec, loops_per_jiffy: 448512
-------------------------------------------------------------------
* Does this mean that if I use nanosleep for example each delay has to
be an integral multiple of the hrtimer precision and for example a delay
of 15ms would not be supported (since it is no integral multiple of 10ms) ?
* It is possible to increase the precision (e.g. by changing the kernel
configuration) ?
* Do you know a better solution for the task, where the task is to send
and receive audio samples to/from the DSP over UART and the timing is
critical ?
cheers,
Stefan
More information about the Alsa-devel
mailing list