All of lore.kernel.org
 help / color / mirror / Atom feed
* Asynchronous ALSA - callback and latency questions
@ 2014-09-08 16:03 Bram Bos
  2014-09-09  8:24 ` Clemens Ladisch
  0 siblings, 1 reply; 6+ messages in thread
From: Bram Bos @ 2014-09-08 16:03 UTC (permalink / raw)
  To: alsa-devel

Hello all,

I’m using ALSA for building a performance musical instrument, so I’m after
 low-latency audio output.
I have some questions (since I'm fairly new to ALSA and to Linux they may  be a
big n00by, so please bear with me)…

1. I’m using asynchronous audio output (i.e. using a callback). Sometimes the
system simply stops calling the callback function without giving an error. In
case of an xrun I would expect there to be an underrun message (which I
sometimes also get) so I can handle it properly. So I guess something else is
causing the issue? Any pointers?

2. What does “File descriptor is in a bad state” mean, when it is returned by
snd_pcm_writei? I notice that I can often avoid getting it by increasing the
size of my buffer but the message doesn't make sense to me.

3. Occasionally my application grinds to a halt with a “I/O is possible” message
– presumably this is triggered by the ALSA callback mechanism?

4. My last question is a bit more conceptual: what determines the playback
latency of my audio stream? The period size? The total ring buffer size? I
assume it should be the difference between the hardware playback pointer and the
software write pointer, but I can’t figure out how they are determined.

Thanks for any help.



System info: Raspberry Pi B+ (non-overclocked), Raspbian Wheezy, USB PnP CM108
audio device
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-09-09 11:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-08 16:03 Asynchronous ALSA - callback and latency questions Bram Bos
2014-09-09  8:24 ` Clemens Ladisch
2014-09-09  8:44   ` Bram Bos
2014-09-09  8:53     ` Takashi Iwai
2014-09-09 10:50       ` Bram Bos
2014-09-09 11:23         ` Clemens Ladisch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.