return value of snd_pcm_wait()
Hi,
currently, snd_pcm_wait() returns -EIO if any error happens during poll(), regardless what really happened.
i believe it's better to return a reasonable error code corresponding to the current state, such as -EPIPE and -ESTRPIPE.
the attached patch adds this feature by calling snd_pcm_state() in snd_pcm_wait(). this cleans up also some codes there.
i think there is no major drawback by this change. but i'd like to ask here to make it sure.
do you see any problems?
Takashi
Quoted 7 lines · Takashi Iwai
Hi,
currently,
snd_pcm_wait()returns-EIOif any error happens duringpoll(), regardless what really happened.
i believe it's better to return a reasonable error code corresponding to the current state, such as-EPIPEand-ESTRPIPE.
Quoted 5 lines
the attached patch adds this feature by calling
snd_pcm_state()insnd_pcm_wait(). this cleans up also some codes there.i think there is no major drawback by this change. but i'd like to ask here to make it sure.
This change is ok for me.
Jaroslav
-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps1