All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Kai Vehmanen <kvehmanen@eca.cx>
Cc: alsa-devel@alsa-project.org,
	Ujfalusi Peter <peter.ujfalusi@nokia.com>,
	ext-eero.nurkkala@nokia.com
Subject: Re: snd_pcm_delay, hw buffers and driver api (v2)
Date: Fri, 14 Aug 2009 14:13:00 +0200	[thread overview]
Message-ID: <4A8554CC.2060009@ladisch.de> (raw)
In-Reply-To: <alpine.DEB.1.10.0908140023240.3417@ecabase.localdomain>

Kai Vehmanen wrote:
> ...
> In both cases, this value (hw_ptr) shows the status of sending data to an 
> separate entity, and one that has its own buffer (multiple ms) before the 
> actual DAC/ADC.
> 
> So when application developer uses snd_pcm_delay(), the result is not 
> quite what the ALSA API says: ...

snd_pcm_avail() returns the free part of the buffer.
snd_pcm_delay() returns the filled part of the buffer plus
the additional delay imposed by the device.

The additional delay can be set by the driver in
pcm_substream->runtime->delay.  (Currently, only
the USB audio driver bothers to set this.)


HTH
Clemens

  parent reply	other threads:[~2009-08-14 12:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-13 21:35 snd_pcm_delay, hw buffers and driver api (v2) Kai Vehmanen
2009-08-13 21:57 ` Kai Vehmanen
2009-08-14 10:38 ` James Courtier-Dutton
2009-08-14 22:02   ` Kai Vehmanen
2009-08-14 12:13 ` Clemens Ladisch [this message]
2009-08-14 23:27   ` Kai Vehmanen

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=4A8554CC.2060009@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=ext-eero.nurkkala@nokia.com \
    --cc=kvehmanen@eca.cx \
    --cc=peter.ujfalusi@nokia.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.