From: Clemens Ladisch <clemens@ladisch.de>
To: Alan Horstmann <gineera@aspect135.co.uk>
Cc: Takashi Iwai <tiwai@suse.de>, alsa-devel@alsa-project.org
Subject: Re: _mmap_playback_avail() short
Date: Mon, 28 Nov 2011 22:12:53 +0100 [thread overview]
Message-ID: <4ED3F955.4090904@ladisch.de> (raw)
In-Reply-To: <201111251510.27592.gineera@aspect135.co.uk>
Alan Horstmann wrote:
>> It seems that at a period boundary event snd_pcm_mmap_playback_avail() may
>> not return a full period size, but is a few bytes short. If avail_min is
>> set to one whole period (which Portaudio at present does),
>> snd_pcm_direct_poll_revents() zeroes the revent due to the check of
>> snd_pcm_mmap_playback_avail() against avail_min. POLLOUT is therefore not
>> indicated, and the app does not write any data, causing an Xrun.
This sounds like a bug in the rate plugin. snd_pcm_rate_sync_hwptr()
tries to properly align pointer values at period boundaries, but its
algorithm doesn't work when a period does not start at the buffer start
(i.e., when the number of periods is not an integer), and this
restriction is not actually enforced by snd_pcm_rate_hw_refine_cchange().
As a workaround, try snd_pcm_hw_params_set_periods_integer().
Regards,
Clemens
next prev parent reply other threads:[~2011-11-28 21:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-31 17:38 Default device XRUNs with perriods=2 Alan Horstmann
2011-11-03 10:03 ` _mmap_playback_avail() short (was: Default device XRUNs with perriods=2) Alan Horstmann
2011-11-25 15:10 ` Alan Horstmann
2011-11-27 1:40 ` Raymond Yau
2011-11-28 11:03 ` Alan Horstmann
2011-11-28 21:12 ` Clemens Ladisch [this message]
2011-11-29 14:07 ` _mmap_playback_avail() short Alan Horstmann
2011-11-29 15:21 ` Clemens Ladisch
2011-11-29 22:07 ` Alan Horstmann
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=4ED3F955.4090904@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=gineera@aspect135.co.uk \
--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.