From: Nikolay Nikolov <nickysn@gmail.com>
To: alsa-devel@alsa-project.org
Subject: Re: ALSA PulseAudio plugin: snd_pcm_rewindable() returns >0, but snd_pcm_rewind() is broken
Date: Mon, 24 Oct 2011 19:55:34 +0300 [thread overview]
Message-ID: <4EA59886.7000205@gmail.com> (raw)
In-Reply-To: <4ea5858a.4a2acc0a.3bb5.5b58SMTPIN_ADDED@mx.google.com>
On 10/24/2011 06:34 PM, Pierre-Louis Bossart wrote:
> You want to avoid rewinding completely. Your audio hardware might have
> prefetched data with the DMA subsystem. Rewinding completely might result in
> an inconsistent configuration and possibly underflows. If you look at the
> PulseAudio code, we've introduced some thresholds beyond which we don't
> rewind (128 bytes or 1ms off the top of my head).
> You might argue that snd_pcm_rewindable is broken, but it's somewhat
> difficult to fix as the amount of prefetched data isn't modeled in the
> driver and it's very much hardware-specific. Using a less aggressive
> approach works fine on most hardware.
> -Pierre
Yes, I figured this out while experimenting with real hw alsa devices
and that's why I actually rewind snd_pcm_rewindable() minus some
threshold, that can be configured. However with the alsa pulseaudio
plugin, rewinding seems to be broken completely, even with a very large
threshold.
next prev parent reply other threads:[~2011-10-24 16:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-24 13:28 ALSA PulseAudio plugin: snd_pcm_rewindable() returns >0, but snd_pcm_rewind() is broken Nikolay Nikolov
2011-10-24 15:34 ` Pierre-Louis Bossart
[not found] ` <4ea5858a.4a2acc0a.3bb5.5b58SMTPIN_ADDED@mx.google.com>
2011-10-24 16:55 ` Nikolay Nikolov [this message]
2011-10-24 23:00 ` Raymond Yau
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=4EA59886.7000205@gmail.com \
--to=nickysn@gmail.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.