diff mbox series

alsactl.1: Some remarks and editorial changes for this man page

Message ID 173267285341.10818.18163035991786515444.reportbug@kassi.invalid.is (mailing list archive)
State New
Headers show
Series alsactl.1: Some remarks and editorial changes for this man page | expand

Commit Message

Bjarni Ingi Gislason Nov. 27, 2024, 2:15 a.m. UTC
Package: alsa-utils
Version: 1.2.12-1
Severity: minor
Tags: patch

   * What led up to the situation?

     Checking for defects with

test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z < "man page"

  [Use "groff -e ' $' <file>" to find trailing spaces.]

  ["test-groff" is a script in the repository for "groff"; is not shipped]
(local copy and "troff" slightly changed by me).

  [The fate of "test-nroff" was decided in groff bug #55941.]

   * What was the outcome of this action?


troff: backtrace: file '<stdin>':93
troff:<stdin>:93: warning: trailing space in the line
troff: backtrace: file '<stdin>':224
troff:<stdin>:224: warning: trailing space in the line


   * What outcome did you expect instead?

     No output (no warnings).

-.-

  General remarks and further material, if a diff-file exist, are in the
attachments.


-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.11.9-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages alsa-utils depends on:
ii  kmod              33+20240816-2
ii  libasound2t64     1.2.12-1+b1
ii  libatopology2t64  1.2.12-1+b1
ii  libc6             2.40-3
ii  libfftw3-single3  3.3.10-1+b3
ii  libncursesw6      6.5-2+b1
ii  libsamplerate0    0.2.2-4+b2
ii  libtinfo6         6.5-2+b1

alsa-utils recommends no packages.

Versions of packages alsa-utils suggests:
pn  dialog  <none>

-- no debconf information
Input file is alsactl.1

  Any program (person), that produces man pages, should check the output
for defects by using (both groff and nroff)

[gn]roff -mandoc -t -ww -b -z -K utf8  <man page>

  The same goes for man pages that are used as an input.

  For a style guide use

  mandoc -T lint

-.-

  So any 'generator' should check its products with the above mentioned
'groff', 'mandoc',  and additionally with 'nroff ...'.

  This is just a simple quality control measure.

  The 'generator' may have to be corrected to get a better man page,
the source file may, and any additional file may.

  Common defects:

  Input text line longer than 80 bytes.

  Not removing trailing spaces (in in- and output).
  The reason for these trailing spaces should be found and eliminated.

  Not beginning each input sentence on a new line.
Lines should thus be shorter.

  See man-pages(7), item 'semantic newline'.

-.-

The difference between the formatted output of the original and patched file
can be seen with:

  nroff -mandoc <file1> > <out1>
  nroff -mandoc <file2> > <out2>
  diff -u <out1> <out2>

and for groff, using

"printf '%s\n%s\n' '.kern 0' '.ss 12 0' | groff -mandoc -Z - "

instead of 'nroff -mandoc'

  Add the option '-t', if the file contains a table.

  Read the output of 'diff -u' with 'less -R' or similar.

-.-.

  If 'man' (man-db) is used to check the manual for warnings,
the following must be set:

  The option "-warnings=w"

  The environmental variable:

export MAN_KEEP_STDERR=yes (or any non-empty value)

  or

  (produce only warnings):

export MANROFFOPT="-ww -b -z"

export MAN_KEEP_STDERR=yes (or any non-empty value)


-.-.

Output from "mandoc -T lint  alsactl.1 ": (shortened list)

      2 input text line longer than 80 bytes
      2 whitespace at end of input line

-.-.

Output from "test-groff -mandoc -t -ww -b -z alsactl.1 ": (shortened list)

      2 trailing space in the line

-.-.

Output from "mandoc -T lint  alsactl.1 ":

mandoc: alsactl.1:93:20: STYLE: whitespace at end of input line
mandoc: alsactl.1:110:92: STYLE: input text line longer than 80 bytes: Select the boot / ho...
mandoc: alsactl.1:226:10: STYLE: whitespace at end of input line
mandoc: alsactl.1:231:83: STYLE: input text line longer than 80 bytes: <abramo@alsa\-projec...

-.-.

Remove space characters at the end of lines.

Use "git apply ... --whitespace=fix" to fix extra space issues, or use
global configuration "core.whitespace".

93:\fI\-h, \-\-help\fP 
226:.SH BUGS 

-.-.

Add a comma (or \&) after "e.g." and "i.e.", or use English words
(man-pages(7)).
Abbreviation points should be protected against being interpreted as
an end of sentence, if they are not, and that independent of the
current place on the line.

214:necessary for some soundcard features (e.g. enabling/disabling

-.-.

Wrong distance between sentences in the input file.

  Separate the sentences and subordinate clauses; each begins on a new
line.  See man-pages(7) ("Conventions for source file layout") and
"info groff" ("Input Conventions").

  The best procedure is to always start a new sentence on a new line,
at least, if you are typing on a computer.

Remember coding: Only one command ("sentence") on each (logical) line.

E-mail: Easier to quote exactly the relevant lines.

Generally: Easier to edit the sentence.

Patches: Less unaffected text.

Search for two adjacent words is easier, when they belong to the same line,
and the same phrase.

  The amount of space between sentences in the output can then be
controlled with the ".ss" request.

17:soundcard drivers. It supports multiple soundcards. If your card has
25:The \fI<card>\fP argument is optional. If no soundcards are specified,
36:configuration file. If restoring fails (eventually partly), the init
46:This command tries to initialize all devices to a default state. If device
76:The optional element identifiers are accepted as a filter. One extra
106:Select the configuration file to use. The default is /var/lib/alsa/asound.state.
110:Select the boot / hotplug ALSA configuration directory to use. The default is /var/lib/alsa.
133:Used with store, restore and init commands. Do not show 'No soundcards found'
152:Save restore and init state to this file. The file will contain only errors.
167:The configuration file for init. By default, PREFIX/share/alsa/init/00main
196:Execute also the 'defaults' section from the UCM configuration. The standard
201:Skip the UCM init even if available. It may be useful for the test the
207:soundcards. The settings include all the usual soundcard mixer
213:\fBalsactl store\fP. Editing the configuration file by hand may be
214:necessary for some soundcard features (e.g. enabling/disabling
231:<abramo@alsa\-project.org>. This document is by Paul Winkler <zarmzarm@erols.com>.

-.-.

Split lines longer than 80 characters into two or more lines.
Appropriate break points are the end of a sentence and a subordinate
clause; after punctuation marks.

Line 7, length 93

\fBalsactl\fP [\fIoptions\fP] [\fIstore\fP|\fIrestore\fP|\fIinit\fP] <card # or id or device>

Line 110, length 92

Select the boot / hotplug ALSA configuration directory to use. The default is /var/lib/alsa.

Line 231, length 82

<abramo@alsa\-project.org>. This document is by Paul Winkler <zarmzarm@erols.com>.


-.-.

Use \(en (en-dash) for a dash between space characters,
not a minus (\-) or a hyphen (-), except in the NAME section.

alsactl.1:162:ALSA_CONFIG_PATH to read different or optimized configuration - may be

-.-.

Name of a manual is set in bold, the section in roman.
See man-pages(7).

223:alsactl_init(7)

-.-.

Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".

alsactl.1:36:configuration file. If restoring fails (eventually partly), the init
alsactl.1:120:file (including the global state file).
alsactl.1:188:Set the process priority (see 'man nice')

-.-.

Two or more space charaters between printable characters.

When the distance is between sentences,
start the beginning of the second one on a separate line
("semantic newline").

128:Used with restore command.  Try to restore the matching control elements
129:as much as possible.  This option is set as default now.
138:Used with restore command.  Don't restore mismatching control elements.
143:Don't initialize cards if restore fails.  Since version 1.0.18,
145:as default.  But this can cause incompatibility with the older version.
147:exists.  This option takes the restore behavior back to the older
208:settings.  More importantly, alsactl is

-.-.

Output from "test-groff  -mandoc -t -K utf8 -rF0 -rHY=0 -ww -b -z ":

troff: backtrace: file '<stdin>':93
troff:<stdin>:93: warning: trailing space in the line
troff: backtrace: file '<stdin>':224
troff:<stdin>:224: warning: trailing space in the line
diff mbox series

Patch

--- alsactl.1	2024-11-27 01:36:34.387486580 +0000
+++ alsactl.1.new	2024-11-27 01:53:30.810769721 +0000
@@ -4,7 +4,8 @@  alsactl \- advanced controls for ALSA so
 
 .SH SYNOPSIS
 
-\fBalsactl\fP [\fIoptions\fP] [\fIstore\fP|\fIrestore\fP|\fIinit\fP] <card # or id or device>
+\fBalsactl\fP [\fIoptions\fP] [\fIstore\fP|\fIrestore\fP|\fIinit\fP] <card # \
+or id or device>
 
 \fBalsactl\fP \fImonitor\fP <card # or id>
 
@@ -14,8 +15,10 @@  alsactl \- advanced controls for ALSA so
 
 .SH DESCRIPTION
 \fBalsactl\fP is used to control advanced settings for the ALSA
-soundcard drivers. It supports multiple soundcards. If your card has
-features that you can't seem to control from a mixer application,
+soundcard drivers.
+It supports multiple soundcards.
+If your card has features
+that you can't seem to control from a mixer application,
 you have come to the right place.
 
 .SH COMMANDS
@@ -38,13 +41,13 @@  action is called.
 
 .SS nrestore <card>
 
-This command is like \fIrestore\fP, but it notifies also the daemon
-to do new rescan for available soundcards.
+This command is like \fIrestore\fP,
+but it notifies also the daemon to do new rescan for available soundcards.
 
 .SS init <card>
 
-This command tries to initialize all devices to a default state. If device
-is not known, error code 99 is returned.
+This command tries to initialize all devices to a default state.
+If device is not known, error code 99 is returned.
 
 .SS daemon
 
@@ -56,8 +59,8 @@  This command is like \fIdaemon\fP but re
 
 .SS kill <cmd>
 
-This command notifies the daemon to do the specified operation (quit,
-rescan, save_and_quit).
+This command notifies the daemon to do the specified operation
+(quit, rescan, save_and_quit).
 
 .SS monitor <card>
 
@@ -73,8 +76,8 @@  collected from the given control device
 
 This command cleans the controls created by applications.
 
-The optional element identifiers are accepted as a filter. One extra
-argument is parsed as an element identifiers.
+The optional element identifiers are accepted as a filter.
+One extra argument is parsed as an element identifiers.
 
 \fIExample:\fP alsactl clean 0 "name='PCM'" "name='Mic Phantom'"
 
@@ -90,7 +93,7 @@  Note that the configuration hooks are ev
 .SH OPTIONS
 
 .TP
-\fI\-h, \-\-help\fP 
+\fI\-h, \-\-help\fP
 Help: show available flags and commands.
 
 .TP
@@ -103,21 +106,24 @@  Print alsactl version number.
 
 .TP
 \fI\-f, \-\-file\fP
-Select the configuration file to use. The default is /var/lib/alsa/asound.state.
+Select the configuration file to use.
+The default is /var/lib/alsa/asound.state.
 
 .TP
 \fI\-a, \-\-config-dir\fP
-Select the boot / hotplug ALSA configuration directory to use. The default is /var/lib/alsa.
+Select the boot / hotplug ALSA configuration directory to use.
+The default is /var/lib/alsa.
 
 .TP
 \fI\-l, \-\-lock\fP
-Use the file locking to serialize the concurrent access to the state file (this
-option is default for the global state file).
+Use the file locking to serialize the concurrent access to the state file
+(this option is default for the global state file).
 
 .TP
 \fI\-L, \-\-no-lock\fP
 Do not use the file locking to serialize the concurrent access to the state
-file (including the global state file).
+file
+(including the global state file).
 
 .TP
 \fI\-O, \-\-lock-state-file\fP
@@ -130,21 +136,27 @@  as much as possible.  This option is set
 
 .TP
 \fI\-g, \-\-ignore\fP
-Used with store, restore and init commands. Do not show 'No soundcards found'
-and do not set an error exit code when soundcards are not installed.
+Used with store, restore and init commands.
+Do not show 'No soundcards found'
+and do not set an error exit code
+when soundcards are not installed.
 
 .TP
 \fI\-P, \-\-pedantic\fP
-Used with restore command.  Don't restore mismatching control elements.
+Used with restore command.
+Don't restore mismatching control elements.
 This option was the old default behavior.
 
 .TP
 \fI\-I, \-\-no\-init\-fallback\fP
-Don't initialize cards if restore fails.  Since version 1.0.18,
+Don't initialize cards if restore fails.
+Since version 1.0.18,
 \fBalsactl\fP tries to initialize the card with the restore operation
-as default.  But this can cause incompatibility with the older version.
-The caller may expect that the state won't be touched if no state file
-exists.  This option takes the restore behavior back to the older
+as default.
+But this can cause incompatibility with the older version.
+The caller may expect
+that the state won't be touched if no state file exists.
+This option takes the restore behavior back to the older
 version by suppressing the initialization.
 
 .TP
@@ -158,9 +170,10 @@  Remove runstate file at first.
 
 .TP
 \fI\-E, \-\-env\fP #=#
-Set environment variable (useful for init action or you may override
-ALSA_CONFIG_PATH to read different or optimized configuration - may be
-useful for "boot" scripts).
+Set environment variable
+(useful for init action
+or you may override ALSA_CONFIG_PATH to read different
+or optimized configuration \(en may be useful for "boot" scripts).
 
 .TP
 \fI\-i, \-\-initfile\fP
@@ -193,39 +206,40 @@  Set the process scheduling policy to idl
 
 .TP
 \fI\-D, \-\-ucm-defaults\fP
-Execute also the 'defaults' section from the UCM configuration. The standard
-behaviour is to execute only 'once' section.
+Execute also the 'defaults' section from the UCM configuration.
+The standard behaviour is to execute only 'once' section.
 
 .TP
 \fI\-U, \-\-no-ucm\fP
-Skip the UCM init even if available. It may be useful for the test the
-legacy init configuration.
+Skip the UCM init even if available.
+It may be useful for the test the legacy init configuration.
 
 .SH FILES
-\fI/var/lib/alsa/asound.state\fP (or whatever file you specify with the
-\fB\-f\fP flag) is used to store current settings for your
-soundcards. The settings include all the usual soundcard mixer
-settings.  More importantly, alsactl is
-capable of controlling other card-specific features that mixer apps
-usually don't know about.
+\fI/var/lib/alsa/asound.state\fP
+(or whatever file you specify with the \fB\-f\fP flag)
+is used to store current settings for your soundcards.
+The settings include all the usual soundcard mixer settings.
+More importantly,
+alsactl is capable of controlling other card-specific features
+that mixer apps usually don't know about.
 
 The configuration file is generated automatically by running
 \fBalsactl store\fP. Editing the configuration file by hand may be
-necessary for some soundcard features (e.g. enabling/disabling
+necessary for some soundcard features (e.g., enabling/disabling
 automatic mic gain, digital output, joystick/game ports, some future MIDI
 routing options, etc).
 
 .SH SEE ALSO
-\fB
-amixer(1),
-alsamixer(1),
-aplay(1),
-alsactl_init(7)
-\fP
+.BR \
+amixer "(1), "\
+alsamixer "(1), "\
+aplay "(1), "\
+alsactl_init (7)
 
-.SH BUGS 
+.SH BUGS
 None known.
 
 .SH AUTHOR
-\fBalsactl\fP is by Jaroslav Kysela <perex@perex.cz> and Abramo Bagnara
-<abramo@alsa\-project.org>. This document is by Paul Winkler <zarmzarm@erols.com>.
+\fBalsactl\fP is by Jaroslav Kysela <perex@perex.cz>
+and Abramo Bagnara <abramo@alsa\-project.org>.
+This document is by Paul Winkler <zarmzarm@erols.com>.