Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* adding hrtimer based delay to ioplug ALSA plugin on ARM9 (AT91) platform ?
@ 2009-10-01 12:32 Stefan Schoenleitner
  0 siblings, 0 replies; only message in thread
From: Stefan Schoenleitner @ 2009-10-01 12:32 UTC (permalink / raw)
  To: alsa-devel@alsa-project.org

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-10-01 12:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-01 12:32 adding hrtimer based delay to ioplug ALSA plugin on ARM9 (AT91) platform ? Stefan Schoenleitner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox