All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Timur Tabi <timur@freescale.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: Question about snd_pcm_update_hw_ptr_post()
Date: Tue, 04 Mar 2008 08:27:32 +0100	[thread overview]
Message-ID: <47CCF9E4.60601@ladisch.de> (raw)
In-Reply-To: <47CC62C5.5010308@freescale.com>

Timur Tabi wrote:
> 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?

Yes, it's the number of free frames that the application can write.

> If so, why is avail >= runtime->stop_threshold considered an underrun condition?

When too many frames in the buffer are free, there are not enough frames
available for the hardware to play.

The default value of the stop threshold is the size of the buffer, so an
underrun happens when the buffer has been completely emptied.

> how can I adjust runtime->stop_threshold?

snd_pcm_sw_params_current()
snd_pcm_sw_params_set_stop_threshold()
snd_pcm_sw_params()


HTH
Clemens

      reply	other threads:[~2008-03-04  7:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-03 20:42 Question about snd_pcm_update_hw_ptr_post() Timur Tabi
2008-03-04  7:27 ` Clemens Ladisch [this message]

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=47CCF9E4.60601@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=timur@freescale.com \
    /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.