xrun and snd_pcm_prepare.
Hi,
In aplay utility to playback music, we see that if the return value
is -EPIPE, a function xrun() is called. This function does nothing more than snd_pcm_prepare(handle). What is the meaning of receiving a -EPIPE return value to a application? and, Why cannot this be done at the driver level itself? say in pcm_native.c .
Is it ok if this snd_pcm_prepare is called from pcm_native.c instead of returning -EPIPE to the application?
--Shaju Abraham
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Quoted 5 lines
In aplay utility to playback music, we see that if the return value
is-EPIPE, a functionxrun()is called. This function does nothing more thansnd_pcm_prepare(handle). What is the meaning of receiving a-EPIPEreturn value to a application? and, Why cannot this be done at the driver level itself? say inpcm_native.c.
EPIPE signals an xrun (over- or under-run). Its analogous to a POSIX pipe that has either filled up or has nothing to read. It means that application has failed to keep up with the hardware.
Quoted 2 lines
Is it ok if this
snd_pcm_prepareis called frompcm_native.cinstead of returning-EPIPEto the application?
no, its not.
behaviour when xruns happen is not automatic. sometimes the driver will do something, sometimes user space wants to know about it and take care of the situation with its own approach.
--p
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf