Skip to contentSkip to conversation

snd_pcm_unlink -> EINVAL?

DISCUSSION Tim Goetze 2 participants 2 messages Jan 26, 2004

lore
Share & tools
lore

Tim Goetze

author
#0 lore raw

when calling snd_pcm_unlink (stream) after an xrun occurred, it returns EINVAL (hw: device, duplex, mmap'd IO, stop_threshold = ~0), even though 'stream' is a valid PCM stream handle.

the snd_pcm_unlink code path seems to return EINVAL only if the stream isn't linked to another.

but EINVAL misses the point, since the stream handle is valid. if one tries to unlink a stream that isn't linked to another, EALREADY is correct imo.

and my question for today: does the kernel layer unlink PCM streams when an xrun occurs?

tim

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

#1 lore raw
Quoted 10 lines · Tim Goetze

when calling snd_pcm_unlink (stream) after an xrun occurred, it returns EINVAL (hw: device, duplex, mmap'd IO, stop_threshold = ~0), even though 'stream' is a valid PCM stream handle.

the snd_pcm_unlink code path seems to return EINVAL only if the stream isn't linked to another.

but EINVAL misses the point, since the stream handle is valid. if one tries to unlink a stream that isn't linked to another, EALREADY is correct imo.

Yes, changed.

Quoted 2 lines

and my question for today: does the kernel layer unlink PCM streams when an xrun occurs?

No. The unlinking is done manually (unlink ioctl) or at close() of a PCM handle.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn