On 18 October 2016 at 06:50, Tanu Kaskinen <tanuk at iki.fi> wrote: > On Fri, 2016-10-14 at 14:49 -0300, Felipe Sateler wrote: >> On 14 October 2016 at 13:12, Felipe Sateler <fsateler at debian.org> wrote: >> > On 14 October 2016 at 12:13, Tanu Kaskinen <tanuk at iki.fi> wrote: >> > > The relevant configuration snippet is already shipped in alsa-plugins >> > > upstream. The file in the source tree is >> > > >> > > pulse/99-pulseaudio-default.conf.example >> > > >> > > and it gets installed to >> > > >> > > $datadir/alsa/alsa.conf.d/99-pulseaudio-default.conf.example >> > >> > Yes, but that is not enabled by default. In debian we use the >> > following file to load that config automatically: >> > >> > https://sources.debian.net/src/pulseaudio/9.0-4/debian/pulse.conf/ >> >> I realized that link may die in the future, so I'm copying the contents: >> >> # PulseAudio alsa plugin configuration file to set the pulseaudio plugin as >> # default output for applications using alsa when pulseaudio is running. >> hook_func.pulse_load_if_running { >> lib "libasound_module_conf_pulse.so" >> func "conf_pulse_hook_load_if_running" >> } >> >> @hooks [ >> { >> func pulse_load_if_running >> files [ >> "/usr/share/alsa/pulse-alsa.conf" >> ] >> errors false >> } >> ] > > If the system is configured to use pulseaudio, then I would prefer alsa > applications to fail if pulseaudio isn't running, rather than falling > back to whatever the default is if pulse-alsa.conf isn't loaded. It > makes debugging easier. I'm not sure if it makes sense to ask if "the system is configured to use pulseaudio", because individual users on a system might disable/enable it. > But if the Debian alsa maintainers prefer to > fall back to non-pulseaudio configuration even when pulseaudio is > installed, then it seems reasonable to propose this to alsa upstream. This file is being shipped by pulseaudio, not alsa. > Maybe it could be an alternate "example" side-by-side with the current > pulseaudio-default.conf.example. Distributions could then easily choose > between the two approaches. I'd like to avoid having to force users into doing stuff as root to disable/enable this. The current solution achieves this by simply disabling autospawn in the user config. A file that is loaded unconditionally must be removed by the user. > As a sidenote, I think it would be good to add much more commenting to > that file. The alsa configuration syntax is very hard to understand, so > it would be good to explain pretty much everything that is happening in > that file, line by line. I understand what the file does in general, > but I can't confidently explain almost any of the individual lines. Neither do I, FWIW. This file is part of the pulseaudio debian package since before I got involved, and I have never touched it yet, mostly for that reason[1]. [1] There is a request to be able to disable the pulse default via an envvar. -- Saludos, Felipe Sateler