alsaucm.1: Some remarks and a patch with editorial changes for this man page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Package: alsa-utils
Version: 1.2.13-1
Severity: minor
Tags: patch

   * What led up to the situation?

     Checking for defects with a new version

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

  [Use "groff -e ' $' -e '\\~$' <file>" to find obvious 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?


an.tmac:<stdin>:30: style: .TH missing fourth argument; consider package/project name and version (e.g., "groff 1.23.0")


   * 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.12.12-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.13-1+b1
ii  libatopology2t64  1.2.13-1+b1
ii  libc6             2.40-7
ii  libfftw3-single3  3.3.10-2+b1
ii  libncursesw6      6.5+20250216-1
ii  libsamplerate0    0.2.2-4+b2
ii  libtinfo6         6.5+20250216-1

alsa-utils recommends no packages.

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

-- no debconf information
Input file is alsaucm.1

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

      1 input text line longer than 80 bytes: ALSA Use Case Interf...
      1 input text line longer than 80 bytes: The master use case ...
      1 input text line longer than 80 bytes: Use Case Interface: ...
      1 input text line longer than 80 bytes: files. An audio use ...
      6 skipping paragraph macro: sp after SH
      2 whitespace at end of input line

Remove trailing space with: sed -e 's/  *$//'

-.-.

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

      2 trailing space in the line

Remove trailing space with: sed -e 's/  *$//'

-.-.

Show if generated from reStructuredText

Who is actually generating this man page?  Debian or upstream?

Is the generating software out of date?

1:.\" Man page generated from reStructuredText.

-.-.

Remove space characters (whitespace) at the end of lines.
Use "git apply ... --whitespace=fix" to fix extra space issues, or use
global configuration "core.whitespace".

Number of lines affected is

2

-.-.

Remove space in the first column, if not indented.
Use ".in +<number>n" and ".in" to end it; ".nf" and ".fi" to end
it, for an extra indention.

alsaucm.1:40: from the command line.
alsaucm.1:237: <http://git.alsa\-project.org/?p=alsa\-lib.git;a=blob;f=src/ucm/parser.c> 

-.-.

Strings longer than 3/4 of a standard line length (80)
Use "\:" to split the string at the end of an output line, for example a
long URL (web address)

39 Interface <http://www.alsa-project.org/alsa-doc/alsa-lib/group__ucm.html>
149 ALSA Use Case Interface <http://www.alsa-project.org/alsa-doc/alsa-lib/group__ucm.html>
237  <http://git.alsa\-project.org/?p=alsa\-lib.git;a=blob;f=src/ucm/parser.c> 
285 Use Case Interface:  <http://www.alsa\-project.org/alsa\-doc/alsa\-lib/group__ucm.html> 

-.-.

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

59:The verb describes the use case action i.e. a phone call, listening to music,
61:and playback hardware i.e. headphones, phone handset, bluetooth headset, etc.
216:supported use cases, e.g.

-.-.

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.

Mark a final abbreviation point as such by suffixing it with "\&".

Some sentences (etc.) do not begin on a new line.

Split (sometimes) lines after a punctuation mark; before a conjunction.

N.B.

  The number of lines affected can be too large to be in a patch.

  Lines with only one (or two) space(s) between sentences could be split,
so latter sentences begin on a new line.

Use

#!/usr/bin/sh

sed -e '/^\./n' \
-e 's/\([[:alpha:]]\)\.  */\1.\n/g' $1

to split lines after a sentence period.
Check result with the difference between the formatted outputs.
See also the attachment "general.bugs"

57:files. An audio use case can be defined by a \fBverb\fP and \fBdevice\fP parameter.
60:recording a conversation etc. The device describes the physical audio capture

-.-.

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.
Add "\:" to split the string for the output, "\<newline>" in the source.  

Line 57, length 83

files. An audio use case can be defined by a \fBverb\fP and \fBdevice\fP parameter.

Line 114, length 81

\fB_devices[/{verb}]\fP \- get list of supported devices (in pair device+comment)

Line 116, length 87

\fB_modifiers[/{verb}]\fP \- get list of supported modifiers (in pair modifier+comment)

Line 137, length 82

\fB_conflictingdevs/{modifier}|{device}[/{verb}]\fP \- list of conflicting devices

Line 149, length 87

ALSA Use Case Interface <http://www.alsa-project.org/alsa-doc/alsa-lib/group__ucm.html>

Line 212, length 91

The master use case files for each supported sound card are in \fB/usr/share/alsa/ucm\fP\&.

Line 285, length 88

Use Case Interface:  <http://www.alsa\-project.org/alsa\-doc/alsa\-lib/group__ucm.html> 

-.-.

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

alsaucm.1:38:alsaucm (ALSA Use Case Manager) is a program to use the ALSA Use Case
alsaucm.1:79:batch mode (use \fB\(aq\-\(aq\fP for the stdin input)
alsaucm.1:112:\fB_verbs\fP \- get verb list (in pair verb+comment)
alsaucm.1:114:\fB_devices[/{verb}]\fP \- get list of supported devices (in pair device+comment)
alsaucm.1:116:\fB_modifiers[/{verb}]\fP \- get list of supported modifiers (in pair modifier+comment)

-.-.

No need for '\&' to be in front of a period (.),
if there is a character in front of it.

Remove with "sed -e 's/\\&\././g'".


95:valid names are sound card names as listed in \fB/usr/share/alsa/ucm\fP\&.
212:The master use case files for each supported sound card are in \fB/usr/share/alsa/ucm\fP\&.
234:\fB/usr/share/alsa/ucm/PandaBoard/hifi\fP\&.

-.-.

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

an.tmac:<stdin>:30: style: .TH missing fourth argument; consider package/project name and version (e.g., "groff 1.23.0")
an.tmac:<stdin>:40: style: 1 leading space(s) on input line
an.tmac:<stdin>:237: style: 1 leading space(s) on input line
troff:<stdin>:237: warning: trailing space in the line
troff:<stdin>:285: warning: trailing space in the line

-.-.

Spelling:

switche -> switch

-.-

Generally:

Split (sometimes) lines after a punctuation mark; before a conjunction.
--- alsaucm.1	2025-03-01 14:55:25.265148045 +0000
+++ alsaucm.1.new	2025-03-01 15:26:40.241393658 +0000
@@ -31,13 +31,14 @@ level margin: \\n[rst2man-indent\\n[rst2
 .SH NAME
 alsaucm \- ALSA Use Case Manager
 .SH SYNOPSIS
-.sp
-\fIalsaucm\fP <options> [command]
+.B alsaucm
+.IR <options> " [" command ]
 .SH DESCRIPTION
-.sp
-alsaucm (ALSA Use Case Manager) is a program to use the ALSA Use Case
-Interface <http://www.alsa-project.org/alsa-doc/alsa-lib/group__ucm.html>
- from the command line.
+alsaucm
+(ALSA Use Case Manager)
+is a program to use the ALSA Use Case
+Interface <http://www.alsa-project.org/\:alsa-doc/\:alsa-lib/\:group__ucm.html>
+from the command line.
 .sp
 On complex sound cards, setting up audio routes is not trivial and mixer
 settings can conflict one another preventing the audio card to work at all.
@@ -54,13 +55,14 @@ ALSA kcontrols to change the hardware di
 match the requested device use case.
 .sp
 The use case manager kcontrol configurations are stored in easy to modify text
-files. An audio use case can be defined by a \fBverb\fP and \fBdevice\fP parameter.
+files.
+An audio use case can be defined by a \fBverb\fP and \fBdevice\fP parameter.
 .sp
-The verb describes the use case action i.e. a phone call, listening to music,
-recording a conversation etc. The device describes the physical audio capture
-and playback hardware i.e. headphones, phone handset, bluetooth headset, etc.
+The verb describes the use case action i.e.\& a phone call, listening to music,
+recording a conversation etc.
+The device describes the physical audio capture
+and playback hardware i.e.\& headphones, phone handset, bluetooth headset, etc.
 .SH OPTIONS
-.sp
 Available options:
 .INDENT 0.0
 .INDENT 3.5
@@ -76,7 +78,8 @@ open card NAME
 interactive mode
 .TP
 .B \fB\-b\fP, \fB\-\-batch\fP \fIFILE\fP
-batch mode (use \fB\(aq\-\(aq\fP for the stdin input)
+batch mode
+(use \fB\(aq\-\(aq\fP for the stdin input)
 .TP
 .B \fB\-n\fP, \fB\-\-no\-open\fP
 do not open first card found
@@ -92,7 +95,7 @@ Available commands:
 .B \fBopen\fP \fINAME\fP
 open card NAME.
 .sp
-valid names are sound card names as listed in \fB/usr/share/alsa/ucm\fP\&.
+valid names are sound card names as listed in \fB/usr/share/alsa/ucm\fP.
 .TP
 .B \fBreset\fP
 reset sound card to default state.
@@ -109,11 +112,14 @@ list command, for items returning two en
 the value of the \fIIDENTIFIER\fP argument can be:
 .INDENT 7.0
 .IP \(bu 2
-\fB_verbs\fP \- get verb list (in pair verb+comment)
+\fB_verbs\fP \- get verb list \
+(in pair verb+comment)
 .IP \(bu 2
-\fB_devices[/{verb}]\fP \- get list of supported devices (in pair device+comment)
+\fB_devices[/{verb}]\fP \- get list of supported devices \
+(in pair device+comment)
 .IP \(bu 2
-\fB_modifiers[/{verb}]\fP \- get list of supported modifiers (in pair modifier+comment)
+\fB_modifiers[/{verb}]\fP \- get list of supported modifiers \
+(in pair modifier+comment)
 .UNINDENT
 .sp
 The forms without the trailing \fB/{verb}\fP are valid only after a specific
@@ -134,7 +140,8 @@ it can be:
 .IP \(bu 2
 \fB_supporteddevs/{modifier}|{device}[/{verb}]\fP \- list of supported devices
 .IP \(bu 2
-\fB_conflictingdevs/{modifier}|{device}[/{verb}]\fP \- list of conflicting devices
+\fB_conflictingdevs/{modifier}|{device}[/{verb}]\fP \- list of
+conflicting devices
 .UNINDENT
 .TP
 .B \fBget\fP \fIIDENTIFIER\fP
@@ -145,9 +152,9 @@ the value of the \fIIDENTIFIER\fP argume
 .IP \(bu 2
 \fB_verb\fP \- return current verb
 .IP \(bu 2
-\fB[=]{NAME}[/[{modifier}|{/device}][/{verb}]]\fP (For valid NAMEs look at the
-ALSA Use Case Interface <http://www.alsa-project.org/alsa-doc/alsa-lib/group__ucm.html>
-)
+\fB[=]{NAME}[/[{modifier}|{/device}][/{verb}]]\fP \
+(For valid NAMEs look at the ALSA Use Case Interface
+<http://www.alsa-project.org/\:alsa-doc/\:alsa-lib/\:group__ucm.html>)
 .UNINDENT
 .TP
 .B \fBgeti\fP \fIIDENTIFIER\fP
@@ -173,7 +180,7 @@ The value of the \fIIDENTIFIER\fP argume
 .IP \(bu 2
 \fB_disdev\fP \- disable the device specified by \fIVALUE\fP
 .IP \(bu 2
-\fB_swdev/{old_device}\fP \- switche device:
+\fB_swdev/{old_device}\fP \- switch device:
 .INDENT 2.0
 .IP \(bu 2
 disable \fIold_device\fP and then enable the device specified by
@@ -208,12 +215,12 @@ quit
 .UNINDENT
 .UNINDENT
 .SH FILES
-.sp
-The master use case files for each supported sound card are in \fB/usr/share/alsa/ucm\fP\&.
+The master use case files for each supported sound card are in
+\fB/usr/share/alsa/ucm\fP.
 .sp
 For example, the master use case file for the \fIPandaboard\fP card is in
 \fB/usr/share/alsa/ucm/PandaBoard/PandaBoard.conf\fP, this file lists all the
-supported use cases, e.g.
+supported use cases, e.g.\&
 .INDENT 0.0
 .INDENT 3.5
 .sp
@@ -231,12 +238,11 @@ Each use case defines a _verb, which is
 the \fBFile\fP directive, like above.
 .sp
 The \fBHiFi\fP verb above is described in
-\fB/usr/share/alsa/ucm/PandaBoard/hifi\fP\&.
+\fB/usr/share/alsa/ucm/PandaBoard/hifi\fP.
 .sp
 For more details on the syntax of UCM files, see the alsa\-lib source code:
- <http://git.alsa\-project.org/?p=alsa\-lib.git;a=blob;f=src/ucm/parser.c> 
+<http://git.alsa\-project.org/\:?p=alsa\-lib.git;a=blob;f=src/\:ucm/\:parser.c>
 .SH EXAMPLES OF USE
-.sp
 Some commands, like for instance \fBlist _devices\fP,
 can only work after setting a \fB_verb\fP in the \fBsame execution\fP, for
 instance this sequence doesn\(aqt work:
@@ -282,10 +288,10 @@ EOM
 .SH SEE ALSO
 .INDENT 0.0
 .IP \(bu 2
-Use Case Interface:  <http://www.alsa\-project.org/alsa\-doc/alsa\-lib/group__ucm.html> 
+Use Case Interface: \
+<http://www.alsa\-project.org/\:alsa\-doc/\:alsa\-lib/\:group__ucm.html>
 .UNINDENT
 .SH BUGS
-.sp
 None known.
 .SH AUTHOR
 Antonio Ospite <ao2@xxxxxx>
  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

-.-

  Any "autogenerator" should check its products with the above mentioned
'groff', 'mandoc', and additionally with 'nroff ...'.

  It should also check its input files for too long (> 80) lines.

  This is just a simple quality control measure.

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

  Common defects:

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

  "git" has a "tool" to point out whitespace,
see for example "git-apply(1)" and git-config(1)")

  Not beginning each input sentence on a new line.
Line length and patch size should thus be reduced.

  The script "reportbug" uses 'quoted-printable' encoding when a line is
longer than 1024 characters in an 'ascii' file.

  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 -d -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 from 'diff -d -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)

-.-

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux