* ASYNC mode...
@ 2003-11-28 10:43 Peter Bessman
2003-11-29 15:50 ` Jean-Marc Desprez
0 siblings, 1 reply; 2+ messages in thread
From: Peter Bessman @ 2003-11-28 10:43 UTC (permalink / raw)
To: alsa-devel
...what's up with it? If you pass SND_PCM_ASYNC to snd_pcm_open(), it
doesn't work, which strikes me as counter-intuitive. Actually, it
seems to be really finicky, and after playing around with pcm.c for
something on the order of 8 hours, I still don't "get it" well enough
to confidently make use of it. Are there better examples out there,
or is this mode dysfunctional? FWIW, I'm running the latest
PlanetCCRMA, which puts my alsa-lib at 0.9.6 (and a cvs checkout, at
that).
[pb]
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ASYNC mode...
2003-11-28 10:43 ASYNC mode Peter Bessman
@ 2003-11-29 15:50 ` Jean-Marc Desprez
0 siblings, 0 replies; 2+ messages in thread
From: Jean-Marc Desprez @ 2003-11-29 15:50 UTC (permalink / raw)
To: alsa-devel
Peter Bessman wrote:
>...what's up with it? If you pass SND_PCM_ASYNC to snd_pcm_open(), it
>doesn't work, which strikes me as counter-intuitive. Actually, it
>seems to be really finicky, and after playing around with pcm.c for
>something on the order of 8 hours, I still don't "get it" well enough
>to confidently make use of it. Are there better examples out there,
>or is this mode dysfunctional? FWIW, I'm running the latest
>PlanetCCRMA, which puts my alsa-lib at 0.9.6 (and a cvs checkout, at
>that).
>
>[pb]
>
>
hi
I did not checked recently, but on an alsa 0.9.7 lib:
- using snd_pcm_open with SND_PCM_ASYNC opens the pcm fd with the
O_ASYNC flag (that seems correct), and then
- setting up the callback with snd_async_add_pcm_handler performs a
fcntl to set O_ASYNC flag in the fd (kernel) context, and supply the pid
ot the calling process that will receive the SIGIO
the problem (bug/feature ?) within the linux kernel (at least until
2.4.20), is that when O_ASYNC is already set in the fd kernel context,
subsequent fcntl dealing with O_ASYNC are silently ignored, whereas
fcntl is supposed to perform more init than open (read linux/fs/open.c
and fcntl.c for more)
so as you say, it is conter-intuitive, but asserting the SND_PCM_ASYNC
flag in snd_pcm_open forbids snd_async_add_pcm_handler to work!
I already suggested on this list that SND_PCM_ASYNC be only kept to
authorise the use of snd_async_add_pcm_handler, but as far as quite few
people are interested in async mode, I believe that priorities are
elsewhere and it had no effect. Beside, the async mode works fine once
this init problem is solved.
Regards
>
>-------------------------------------------------------
>This SF.net email is sponsored by: SF.net Giveback Program.
>Does SourceForge.net help you be more productive? Does it
>help you create better code? SHARE THE LOVE, and help us help
>YOU! Click Here: http://sourceforge.net/donate/
>_______________________________________________
>Alsa-devel mailing list
>Alsa-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/alsa-devel
>
>
>
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-11-29 15:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-28 10:43 ASYNC mode Peter Bessman
2003-11-29 15:50 ` Jean-Marc Desprez
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.