diff mbox series

[bug#39053] Add pulseaudio configuration and fix volume bugs

Message ID ac2fe47d175836a1eaa25d12830cbb0f510759cd.camel@student.tugraz.at
State Accepted
Headers show
Series [bug#39053] Add pulseaudio configuration and fix volume bugs | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

Leo Prikler Jan. 12, 2020, 12:32 a.m. UTC
Am Sonntag, den 12.01.2020, 00:49 +0100 schrieb Marius Bakke:
> Oh, right.  I suppose that can be surprising.  Would you like to
> resubmit a documentation update?
Sure, see the attachment.  (Not sure if that's overkill.)

> I wonder if we could use the flunking new 'this-record', and refer to
> the SCRIPT-FILE directly in the default parameter list.  But that's
> probably overkill for this instance.  :-)
Well, actually, that might not be /that/ bad, were it not for the fact
that defaults have to be documented.  Using 'this-record' would allow
people to use the system-script-file there as well, although I don't
know if the value will be read when PA starts in system mode.
That said, we would also force people to copypasta this into their own
configuration.  Is that still acceptable?

> Not sure what/if there are line length limits on guix.texi, but 95
> characters should be okay for one-off instances like these.  I
> suppose
> we could escape a line break if it breaks someones workflow.
I personally would not notice a line limit either way safe for perhaps
some very short lines, due to having olivetti enabled in all text
modes.

Regards,
Leo

Comments

Marius Bakke Jan. 12, 2020, 7:55 p.m. UTC | #1
Leo Prikler <leo.prikler@student.tugraz.at> writes:

> Am Sonntag, den 12.01.2020, 00:49 +0100 schrieb Marius Bakke:
>> Oh, right.  I suppose that can be surprising.  Would you like to
>> resubmit a documentation update?
> Sure, see the attachment.  (Not sure if that's overkill.)

Looks good.

[...]


> diff --git a/doc/guix.texi b/doc/guix.texi
> index d2038d18e1..0b8569b54a 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -15979,6 +15979,17 @@ inserted as-is with a newline added.  A pair will be formatted as
>  @item @var{daemon-conf} (default: @code{'((flat-volumes . no))})
>  List of settings to set in @file{daemon.conf}, formatted just like
>  @var{client-conf}.
> +@quotation Note
> +In addition to the above settings being applied, the first line of the
> +generated @file{daemon.conf} will always read
> +@code{default-script-file = FILE} with @var{FILE} being the path to the
> +supplied @var{script-file}.
> +This makes pulseaudio read the correct @file{default.pa} when started in
> +user-mode (the default behaviour).
> +Such a line does not exist for @file{system.pa}.  If you need to load this
> +file for some reason, you'll have to use environment variables as detailed
> +in the PulseAudio documentation.
> +@end quotation

I tried finding documentation for system.pa to no avail.  Do you have a
link at hand?  Perhaps it's better to remove the system.pa sentences
from here, and add a note below "system-script-file" how to make it
effective, preferably with an @url{...} pointing to PA documentation.

WDYT?
Leo Prikler Jan. 12, 2020, 8:22 p.m. UTC | #2
Am Sonntag, den 12.01.2020, 20:55 +0100 schrieb Marius Bakke:
> Leo Prikler <leo.prikler@student.tugraz.at> writes:
> 
> > Am Sonntag, den 12.01.2020, 00:49 +0100 schrieb Marius Bakke:
> > > Oh, right.  I suppose that can be surprising.  Would you like to
> > > resubmit a documentation update?
> > Sure, see the attachment.  (Not sure if that's overkill.)
> 
> Looks good.
> 
> [...]
> 
> 
> > diff --git a/doc/guix.texi b/doc/guix.texi
> > index d2038d18e1..0b8569b54a 100644
> > --- a/doc/guix.texi
> > +++ b/doc/guix.texi
> > @@ -15979,6 +15979,17 @@ inserted as-is with a newline added.  A
> > pair will be formatted as
> >  @item @var{daemon-conf} (default: @code{'((flat-volumes . no))})
> >  List of settings to set in @file{daemon.conf}, formatted just like
> >  @var{client-conf}.
> > +@quotation Note
> > +In addition to the above settings being applied, the first line of
> > the
> > +generated @file{daemon.conf} will always read
> > +@code{default-script-file = FILE} with @var{FILE} being the path
> > to the
> > +supplied @var{script-file}.
> > +This makes pulseaudio read the correct @file{default.pa} when
> > started in
> > +user-mode (the default behaviour).
> > +Such a line does not exist for @file{system.pa}.  If you need to
> > load this
> > +file for some reason, you'll have to use environment variables as
> > detailed
> > +in the PulseAudio documentation.
> > +@end quotation
> 
> I tried finding documentation for system.pa to no avail.  Do you have
> a
> link at hand?  Perhaps it's better to remove the system.pa sentences
> from here, and add a note below "system-script-file" how to make it
> effective, preferably with an @url{...} pointing to PA documentation.
That's not surprising, given that the format for default.pa and
system.pa is the same.  The convention in PulseAudio is, that the
former be loaded when it is started in "user mode", and the latter be
loaded when it is started in "system mode".  However, there exists but
one environment variable (PULSE_SCRIPT now that I recall its name),
that overrides BOTH settings.

Upon closer inspection, it seems however, that this environment
variable is not the only way to to supply a script to load.
Reading the output of `pulseaudio --help` also contains a few lines on
that.

--8<---------------cut here---------------start------------->8---
STARTUP SCRIPT:
  -L, --load="MODULE ARGUMENTS"         Load the specified plugin
module with
                                        the specified argument
  -F, --file=FILENAME                   Run the specified script
  -C                                    Open a command line on the
running TTY
                                        after startup

  -n                                    Don't load default script file
--8<---------------cut here---------------end--------------->8---

> WDYT?
It should be worded in a way, that does not cause such a
misunderstanding.  What I meant to convey (but failed at doing so) was
something along the lines of "consult the PulseAudio documentation on
how to load scripts", not "consult the PulseAudio documentation on
system.pa".  Not loading system.pa unless being told to do so is a
Guix-specific feature ;)

Can you patch this documentation in a way that people, who are not me,
also understand it?  I fully admit that I'm weak at explaining.

Regards,
Leo
diff mbox series

Patch

From c1f3757d53423cc51f1f9017edd4427c20e7025c Mon Sep 17 00:00:00 2001
From: Leo Prikler <leo.prikler@student.tugraz.at>
Date: Sun, 12 Jan 2020 01:20:27 +0100
Subject: [PATCH] doc: Fully document pulseaudio daemon-conf.

* doc/guix.texi: Add note about the default-script-file line and the intention
behind it.
---
 doc/guix.texi | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index d2038d18e1..0b8569b54a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -15979,6 +15979,17 @@  inserted as-is with a newline added.  A pair will be formatted as
 @item @var{daemon-conf} (default: @code{'((flat-volumes . no))})
 List of settings to set in @file{daemon.conf}, formatted just like
 @var{client-conf}.
+@quotation Note
+In addition to the above settings being applied, the first line of the
+generated @file{daemon.conf} will always read
+@code{default-script-file = FILE} with @var{FILE} being the path to the
+supplied @var{script-file}.
+This makes pulseaudio read the correct @file{default.pa} when started in
+user-mode (the default behaviour).
+Such a line does not exist for @file{system.pa}.  If you need to load this
+file for some reason, you'll have to use environment variables as detailed
+in the PulseAudio documentation.
+@end quotation
 
 @item @var{script-file} (default: @code{(file-append pulseaudio "/etc/pulse/default.pa")})
 Script file to use as as @file{default.pa}.
-- 
2.24.1