From: Arun Raghavan <arun.raghavan@collabora.co.uk>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, Colin Guthrie <gmane@colin.guthr.ie>
Subject: Re: [PATCH 0/3] Fallback mechanism for pulse plugin
Date: Tue, 13 Sep 2011 22:39:52 +0530 [thread overview]
Message-ID: <1315933800.7511.53.camel@snowflake> (raw)
In-Reply-To: <s5hty8gvpuz.wl%tiwai@suse.de>
On Tue, 2011-09-13 at 09:55 +0200, Takashi Iwai wrote:
> > So the problem I have is thus:
> >
> > 1. If the user wants to use PA and it's configure in the system
> that
> > way, then ALSA (or any other PA client) will autospawn PA if it's
> not
> > running. If that doesn't work, I would prefer that no ALSA-only
> fallback
> > happens as it masks where the real problem lies.
>
> Right. In this case, PA should have been started beforehand. But,
> the start-up is always racy, so it might happen that ALSA-pulse app is
> kicked off before PA daemon gets started. This is one possible
> problem.
>
> Another possible problem is when PA daemon crashes by some reason and
> ALSA-pulse app is started just after it.
I don't think this is a case that we should plan or design for. It's an
outlier, and pretending to work seamlessly when the underlying system
breaks is just going to make it harder to fix problems.
Extending this as a general comment -- I think it's bad to try to
fallback to ALSA in any case if PulseAudio isn't functioning properly.
We got to the currently decent shape we're in by refusing to take that
route and IMO we should continue doing so until there's nothing left to
fix. :)
> > 2. If a given user does not want to use PA, but the system is
> > configured to run PA, then that user will typically have a PA daemon
> > started anyway via XDG autostart, unless they have specifically
> chosen
> > via their DE to override this startup option. In this scenario, PA
> is
> > running already and the automatic fallback stuff in the alsa-plugin
> > won't work as intended.
>
> XDG isn't used in every environment. Many window managers won't use
> it. So, there are two cases: 2a) PA starts up via XDG but user
> doesn't want to use. 2b) PA doesn't start up and user doesn't want to
> use PA.
>
> > 3. If the system is not configured for PA but a given user does
> want to
> > use it, then the system will not run PA at login (due to hacks on
> the
> > XDG startup scripts and by setting autospawn=no in the
> > /etc/pulse/client.conf file), and thus the user will have to find a
> way
> > to start pulseaudio themselves (e.g. by copying the client.conf to
> their
> > own directory and setting autospawn=yes).
>
> Right.
So, summarising the thread so far, we should standardise how PA is
disabled in config (daemon.conf option to add "enabled = no" sounds good
to me) and have clients call some libpulse API to check whether PA is
enabled or not. The alsa pulse plugin should fallback *only* if PA has
specifically been disabled (not if PA failed to start up for some reason
-- that's a bug we need to resolve). This will give per-user control
over PA being enabled/disabled which was the original use-case.
I've summarised this in the hope that we can convert the thread into "we
need to do this in alsa-* and this in pulse*" and then get it done. It's
a long thread, and some of the corner cases are subtle, so feel free to
point out if something isn't clear or not covered.
Regards,
Arun
next prev parent reply other threads:[~2011-09-13 17:09 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-26 12:33 [PATCH 0/3] Fallback mechanism for pulse plugin Takashi Iwai
2011-07-26 12:34 ` [PATCH 1/3] Define "sysdefault" PCM and control Takashi Iwai
2011-09-12 1:27 ` Raymond Yau
2011-07-26 12:34 ` [PATCH 2/3] Add snd_{ctl|pcm}_open_fallback() functions Takashi Iwai
2011-07-26 12:36 ` [PATCH 3/3] pulse: Add fallback option Takashi Iwai
2011-09-12 1:20 ` Raymond Yau
2011-09-03 15:27 ` [PATCH 0/3] Fallback mechanism for pulse plugin Colin Guthrie
2011-09-11 12:17 ` Consider revert? (was Re: [PATCH 0/3] Fallback mechanism for pulse plugin) Colin Guthrie
2011-09-12 8:05 ` [PATCH 0/3] Fallback mechanism for pulse plugin Takashi Iwai
2011-09-12 8:46 ` Colin Guthrie
2011-09-12 9:23 ` Takashi Iwai
2011-09-12 18:39 ` Colin Guthrie
2011-09-13 7:55 ` Takashi Iwai
2011-09-13 8:47 ` Colin Guthrie
2011-09-13 9:50 ` Takashi Iwai
2011-09-13 11:00 ` Colin Guthrie
2011-09-13 12:18 ` Takashi Iwai
2011-09-13 12:38 ` Colin Guthrie
2011-09-14 9:51 ` David Henningsson
2011-09-14 10:35 ` Colin Guthrie
2011-09-14 10:50 ` David Henningsson
2011-09-14 10:55 ` Colin Guthrie
2011-09-13 17:09 ` Arun Raghavan [this message]
2011-09-24 22:43 ` 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=1315933800.7511.53.camel@snowflake \
--to=arun.raghavan@collabora.co.uk \
--cc=alsa-devel@alsa-project.org \
--cc=gmane@colin.guthr.ie \
--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.