* Example app source code or docs needed to help me do mmap.
@ 2002-04-27 0:29 James Courtier-Dutton
2002-04-27 1:34 ` Andy Wingo
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: James Courtier-Dutton @ 2002-04-27 0:29 UTC (permalink / raw)
To: alsa-devel
Can someone point me to an example alsa app doing mmap ?
I want to convert my application from plain pcm_write to mmap mode.
I would also like to understand how you detect if a sound card can do
mmap or not.
I help develope a multimedia application, and 6 audio channels (5.1
sound) starts to require mmap mode on very slow PCs.
Cheers
James
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Example app source code or docs needed to help me do mmap. 2002-04-27 0:29 Example app source code or docs needed to help me do mmap James Courtier-Dutton @ 2002-04-27 1:34 ` Andy Wingo 2002-04-27 3:26 ` glue for new driver Guilhem Tardy 2002-04-27 16:59 ` Example app source code or docs needed to help me do mmap Paul Davis 2 siblings, 0 replies; 5+ messages in thread From: Andy Wingo @ 2002-04-27 1:34 UTC (permalink / raw) To: alsa-devel On Sat, 27 Apr 2002, James Courtier-Dutton wrote: > Can someone point me to an example alsa app doing mmap ? I like the implementation in jack's alsa_driver. It is tricky code though (just MHO, after having ported it to a gstreamer alsa plugin) -- the write() api is of course much easier. regards, wingo. _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: bandwidth@sourceforge.net ^ permalink raw reply [flat|nested] 5+ messages in thread
* glue for new driver 2002-04-27 0:29 Example app source code or docs needed to help me do mmap James Courtier-Dutton 2002-04-27 1:34 ` Andy Wingo @ 2002-04-27 3:26 ` Guilhem Tardy 2002-04-27 17:01 ` Paul Davis 2002-04-27 16:59 ` Example app source code or docs needed to help me do mmap Paul Davis 2 siblings, 1 reply; 5+ messages in thread From: Guilhem Tardy @ 2002-04-27 3:26 UTC (permalink / raw) To: alsa-devel Hi, I am writing a driver for a new card, and wonder how the ALSA server will recognize my module as one of its own? Besides, is there anything I should know regarding debugging ALSA drivers? Thanks, Guilhem. __________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: glue for new driver 2002-04-27 3:26 ` glue for new driver Guilhem Tardy @ 2002-04-27 17:01 ` Paul Davis 0 siblings, 0 replies; 5+ messages in thread From: Paul Davis @ 2002-04-27 17:01 UTC (permalink / raw) To: Guilhem Tardy; +Cc: alsa-devel >Hi, > >I am writing a driver for a new card, and wonder how the ALSA server will >recognize my module as one of its own? Besides, is there anything I should kno >w >regarding debugging ALSA drivers? there is no "ALSA server", at least not in the context you're discussing. you should download ALSA from CVS and build your driver within your copy of the ALSA source tree, modifying makefiles etc. as needed to include it in the build. that way, when its ready, you can submit a patch back to jaroslav that includes everything thats needed, not just driver source. --p ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Example app source code or docs needed to help me do mmap. 2002-04-27 0:29 Example app source code or docs needed to help me do mmap James Courtier-Dutton 2002-04-27 1:34 ` Andy Wingo 2002-04-27 3:26 ` glue for new driver Guilhem Tardy @ 2002-04-27 16:59 ` Paul Davis 2 siblings, 0 replies; 5+ messages in thread From: Paul Davis @ 2002-04-27 16:59 UTC (permalink / raw) To: James; +Cc: alsa-devel >Can someone point me to an example alsa app doing mmap ? > >I want to convert my application from plain pcm_write to mmap mode. >I would also like to understand how you detect if a sound card can do >mmap or not. > >I help develope a multimedia application, and 6 audio channels (5.1 >sound) starts to require mmap mode on very slow PCs. either aplay.c (simple, confusing) latency.c (simple, limited) {JACK}/alsa_driver.c (complete, confusing) might help. I think that the Jack case is the only one that handles what I would call "synchronous full duplex" (i.e. capture and playback running in sync). the others don't tend to worry about that detail, and it affects the inner loops of the code quite a bit. to find out if mmap is support, you ask use snd_pcm_hw_params_set_access (handle, params, SND_PCM_ACCESS_MMAP_NONINTERLEAVED); or snd_pcm_hw_params_set_access (handle, params, SND_PCM_ACCESS_MMAP_INTERLEAVED); if it works, then it works :) BTW, any "plug" device supports mmap mode regardless or not of the corresponding "hw" device(s) do. that's partly why JACK uses mmap mode without checking for this - if a user tries it on h/w that doesn't support it, they can just use "plughw:D,S" instead of "hw:D,S" when naming it. --p ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-04-27 17:01 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2002-04-27 0:29 Example app source code or docs needed to help me do mmap James Courtier-Dutton 2002-04-27 1:34 ` Andy Wingo 2002-04-27 3:26 ` glue for new driver Guilhem Tardy 2002-04-27 17:01 ` Paul Davis 2002-04-27 16:59 ` Example app source code or docs needed to help me do mmap Paul Davis
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.