From: Takashi Iwai <tiwai@suse.de>
To: David Henningsson <launchpad.web@epost.diwic.se>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] Two patches for Alsa-plugins (pulse)
Date: Fri, 09 Jul 2010 14:10:01 +0200 [thread overview]
Message-ID: <s5heifcsvom.wl%tiwai@suse.de> (raw)
In-Reply-To: <s5hzky6bgy2.wl%tiwai@suse.de>
At Mon, 05 Jul 2010 08:06:45 +0200,
I wrote:
>
> At Fri, 25 Jun 2010 12:41:46 +0200,
> David Henningsson wrote:
> >
> > On 2010-06-24 08:42, Takashi Iwai wrote:
> > > At Wed, 23 Jun 2010 21:57:01 +0200,
> > > David Henningsson wrote:
> > >>
> > >> These two patches are being used in Ubuntu Lucid (released this April)
> > >> and are working well enough to have people asking us to backport them to
> > >> Karmic. Today I got an email, asking for the upstream status of one of
> > >> these patches, since he wanted them in Fedora. If posting them here
> > >> isn't the correct way to upstream them, please tell me so.
> > >>
> > >> The first one (Fix invalid buffer pointer return value) fixes broken logic:
> > >>
> > >> This patch improves recovering from underruns, and prevents hangs inside
> > >> snd_pcm_write* and snd_pcm_read* due to snd_pcm_avail* returning too
> > >> low values. It especially helps low latency situations.
> > >
> > > This one looks OK. Applied now.
> >
> > Thanks!
> >
> > >> The second one (Do not report underruns to the ALSA layer) is more a
> > >> change of behavior, which could be questioned. The arguments for
> > >> removing that code are these:
> > >>
> > >> * If pulseaudio gets an underrun, the normal way to end that underrun
> > >> is to feed it with more buffers. This is different from the ALSA way of
> > >> dealing with underruns, which requires hardware buffer pointers to be reset.
> > >> * In addition, underrun signals are delivered asynchronously from
> > >> pulseaudio. This means that there might be more buffers on the way to
> > >> pulseaudio when the underrun is reported, making the underrun obsolete.
> > >> Unfortunately, there is currently no known way to determine whether this
> > >> is the case or not.
> > >
> > > I think this helps for normal use-cases, so it'd be good to apply.
> > > But, I prefer having a runtime option for such a behavior change
> > > (although the default value can be the new behavior).
> > >
> > > Care to add it?
> >
> > Sure, I can do that - it sounds like a good idea to have it configurable.
> > Just so I understand you right, exactly how do you expect the user /
> > application to configure it?
>
> I suppose it can be simply added as an alsa-lib plugin config, i.e.
> in SND_PCM_PLUGIN_DEFINE_FUNC(pulse) of alsa-plugins/pulse/pcm_pulse.c,
> add the code like below:
>
> int handle_underrun = 0;
> ...
>
> snd_config_for_each(i, next, conf) {
> ...
> if (strcmp(id, "handle_underrun") == 0) {
> handle_underrun = snd_config_get_bool(n);
> if (handle_underrun < 0) {
> SNDERR("Invalid value for %s", id);
> return handle_underrun;
> }
> continue;
> }
> }
FYI, I modified the patch and applied to git tree right now.
thanks,
Takashi
next prev parent reply other threads:[~2010-07-09 12:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-23 19:57 [PATCH] Two patches for Alsa-plugins (pulse) David Henningsson
2010-06-23 23:44 ` Raymond Yau
2010-06-24 6:42 ` Takashi Iwai
2010-06-25 10:41 ` David Henningsson
2010-06-25 10:57 ` Colin Guthrie
2010-07-05 6:06 ` Takashi Iwai
2010-07-09 12:10 ` Takashi Iwai [this message]
2010-07-09 13:13 ` Raymond Yau
2010-07-09 16:23 ` Takashi Iwai
2010-07-09 17:50 ` David Henningsson
2010-07-09 22:58 ` Raymond Yau
2010-07-10 6:42 ` David Henningsson
2010-07-13 5:08 ` Raymond Yau
2010-07-13 6:57 ` David Henningsson
2010-07-13 8:32 ` Raymond Yau
2010-07-10 2:07 ` Raymond Yau
2010-07-29 7:11 ` Raymond Yau
2010-07-29 8:14 ` David Henningsson
2010-07-29 13:38 ` Raymond Yau
2010-07-17 4:30 ` Raymond Yau
2010-07-12 2:13 ` 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=s5heifcsvom.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=launchpad.web@epost.diwic.se \
/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.