From: Timur Tabi <timur@freescale.com>
To: alsa-devel@alsa-project.org
Subject: Question about snd_pcm_update_hw_ptr_post()
Date: Mon, 03 Mar 2008 14:42:45 -0600 [thread overview]
Message-ID: <47CC62C5.5010308@freescale.com> (raw)
Can someone explain to me this snippet from snd_pcm_update_hw_ptr_post():
if (avail >= runtime->stop_threshold) {
if (substream->runtime->status->state == SNDRV_PCM_STATE_DRAINING)
snd_pcm_drain_done(substream);
else
xrun(substream);
return -EPIPE;
}
During playback, avail = snd_pcm_playback_avail(). Does this mean that avail is
number of frames available in the playback DMA buffer for new data?
If so, why is avail >= runtime->stop_threshold considered an underrun condition?
Does ALSA try to keep the amount of available data to a minimum?
If so, how can I adjust runtime->stop_threshold? I'd like to see what happens
if I make stop_threshold equal to the size of my DMA buffer.
--
Timur Tabi
Linux kernel developer at Freescale
next reply other threads:[~2008-03-03 20:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-03 20:42 Timur Tabi [this message]
2008-03-04 7:27 ` Question about snd_pcm_update_hw_ptr_post() Clemens Ladisch
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=47CC62C5.5010308@freescale.com \
--to=timur@freescale.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.