All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Joachim Förster" <mls.JOFT@gmx.de>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: ALSA always writes _whole_ periods, right?
Date: Sat, 16 Jun 2007 23:35:15 +0200	[thread overview]
Message-ID: <1182029715.2605.12.camel@localhost> (raw)
In-Reply-To: <s5hlkemkefd.wl%tiwai@suse.de>


[-- Attachment #1.1: Type: text/plain, Size: 1187 bytes --]

Hi Takashi,

thanks for your answer,

On Thu, 2007-06-14 at 12:39 +0200, Takashi Iwai wrote:
> > I have a quick question regarding the filling of the usual ring buffer
> > in RAM (used by sound controllers via DMA), just to be really sure:
> > 
> > Is it true, that ALSA always writes (via mmap'ing) _whole_ periods?
> 
> The whole buffer is, of course, used.  Otherwise you'll get obvious
> noises :)
> 
> But if you're asking about the timinig, then no.  How much data is
> written at which timing isn't strictly defined in mmap mode.  The
> PCM core just checks the available size at each
> snd_pcm_period_elapsed(), and reports XRUN if needed.  That's all.

Ok, ahm, I think my question was not about what I really wanted to know
- sorry. I have to reformulate it: In fact I would like to know, how the
ALSA-library mmap code behaves regarding the last chunk of samples, for
example: Consider aplay, playing a wav file and the wav file's
size/number of samples does _not_ fit to a multiple of a period's size.
Then, does the mmap code copy these last samples as is _or_ does it copy
one whole last period (which is filled with zeros)?

Thanks,
 Joachim


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2007-06-16 21:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-13 16:23 ALSA always writes _whole_ periods, right? Joachim Förster
2007-06-14 10:39 ` Takashi Iwai
2007-06-16 21:35   ` Joachim Förster [this message]
2007-06-20 10:45     ` Takashi Iwai
     [not found]       ` <1182677696.5697.25.camel@localhost>
2007-06-27 12:47         ` Takashi Iwai

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=1182029715.2605.12.camel@localhost \
    --to=mls.joft@gmx.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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.