Skip to contentSkip to conversation

return value of snd_pcm_wait()

DISCUSSION Takashi Iwai 2 participants 2 messages Jul 14, 2003

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 7 lines · Takashi Iwai

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.

Quoted 5 lines

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.

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