All of lore.kernel.org
 help / color / mirror / Atom feed
* SND_PCM_ASYNC - why???
@ 2004-01-17 11:26 James Wright
  2004-01-19 19:07 ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: James Wright @ 2004-01-17 11:26 UTC (permalink / raw)
  To: ALSA Dev

Hello,

  I'm doing much better with ALSA now that i spent a coule of days messing with code. I've got both direct
MMAP PCM playback and a fallback using normal write access with no problems. However, i've
just written in asyncronous notification support and found that if i use the SND_PCM_ASYNC flag in snd_pcm_open()
and then setup my callback function with snd_async_add_pcm_handler(), then the callback function is not called!
When i remove the SND_PCM_ASYNC flag it works fine, so is this flag/mode redundant? 

Thanks,
James



-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: SND_PCM_ASYNC - why???
  2004-01-17 11:26 SND_PCM_ASYNC - why??? James Wright
@ 2004-01-19 19:07 ` Takashi Iwai
  2004-01-19 20:47   ` James Wright
  0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2004-01-19 19:07 UTC (permalink / raw)
  To: James Wright; +Cc: ALSA Dev

At Sat, 17 Jan 2004 11:26:45 +0000,
James Wright wrote:
> 
> Hello,
> 
>   I'm doing much better with ALSA now that i spent a coule of days messing with code. I've got both direct
> MMAP PCM playback and a fallback using normal write access with no problems. However, i've
> just written in asyncronous notification support and found that if i use the SND_PCM_ASYNC flag in snd_pcm_open()
> and then setup my callback function with snd_async_add_pcm_handler(), then the callback function is not called!
> When i remove the SND_PCM_ASYNC flag it works fine, so is this flag/mode redundant? 

snd_async_add_pcm_handler() sets/resets the O_ASYNC flag by itself, so
basically you don't need to open the pcm with SND_PCM_ASYNC.


Takashi


-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: SND_PCM_ASYNC - why???
  2004-01-19 19:07 ` Takashi Iwai
@ 2004-01-19 20:47   ` James Wright
  0 siblings, 0 replies; 3+ messages in thread
From: James Wright @ 2004-01-19 20:47 UTC (permalink / raw)
  To: alsa-devel

On Mon, 19 Jan 2004 20:07:51 +0100
Takashi Iwai <tiwai@suse.de> wrote:

> At Sat, 17 Jan 2004 11:26:45 +0000,
> James Wright wrote:
> > 
> > Hello,
> > 
> >   I'm doing much better with ALSA now that i spent a coule of days messing with code. I've got both direct
> > MMAP PCM playback and a fallback using normal write access with no problems. However, i've
> > just written in asyncronous notification support and found that if i use the SND_PCM_ASYNC flag in snd_pcm_open()
> > and then setup my callback function with snd_async_add_pcm_handler(), then the callback function is not called!
> > When i remove the SND_PCM_ASYNC flag it works fine, so is this flag/mode redundant? 
> 
> snd_async_add_pcm_handler() sets/resets the O_ASYNC flag by itself, so
> basically you don't need to open the pcm with SND_PCM_ASYNC.
> 
> 
> Takashi


Be nice if the docs mentioned this! Surely anyone that wants to use asynchornous notification will call
snd_async_add_pcm_handler() at some point, so there is no real need for the SND_PCM_ASYNC flag...



> 
> 
> -------------------------------------------------------
> 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
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-devel
> 


-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-01-19 20:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-17 11:26 SND_PCM_ASYNC - why??? James Wright
2004-01-19 19:07 ` Takashi Iwai
2004-01-19 20:47   ` James Wright

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.