All of lore.kernel.org
 help / color / mirror / Atom feed
From: Reiner <reiner1210@googlemail.com>
To: alsa-devel@alsa-project.org
Subject: mm functions vs. normal IO
Date: Mon, 03 Mar 2008 23:40:45 +0100	[thread overview]
Message-ID: <47CC7E6D.4030704@googlemail.com> (raw)

Hello,

I'am new for using ALSA API.
I was astonished that a simple wav playback example does not exist. But 
after reading the pcm examples I have managed to make one (if I will 
finish it I can post it so it can be added to the examples)

Now my question:

What should be used:

snd_pcm_mmap_commit 
<http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m___direct.html#g3e3d8bb878f70e94a746d17410e93273> 
(I think snd_pcm_mmap_writei 
<http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m___direct.html#g3a811efcd9d64b60e6a25df6924d26b0>  
is the same with an additional copy behind ?)
or
snd_pcm_writei 
<http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m.html#gf13067c0ebde29118ca05af76e5b17a9>

I think mmap will have better performance, but will it work with all 
soundcards? Or should it be in a config what to use?

I'am also looking for a function to get the number of played frames. I 
have played around with "snd_pcm_status" but it seems not to have a 
counter for this.

By the way is there a detailed tutorial (introduction) for ALSA 
available? The online help is a little bit too short for newbies. ;-)

Reiner

             reply	other threads:[~2008-03-03 22:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-03 22:40 Reiner [this message]
2008-03-04  7:58 ` mm functions vs. normal IO Clemens Ladisch
2008-03-04 13:55   ` Reiner P
2008-03-04 14:04     ` James Courtier-Dutton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47CC7E6D.4030704@googlemail.com \
    --to=reiner1210@googlemail.com \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.