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

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

 



Package: alsa-utils
Version: 1.2.12-1 (Debian testing)
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>':175
troff:<stdin>:175: 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 alsabat.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  alsabat.1 ": (shortened list)

      1 skipping paragraph macro

-.-.

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

      1 trailing space in the line

-.-.

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

mandoc: alsabat.1:163:2: WARNING: skipping paragraph macro: br after SH

-.-.

Change - to \- if it shall be printed as a minus sign.

alsabat.1:166:If no peak be detected, returns -1001;
alsabat.1:168:If only DC be detected, returns -1002;
alsabat.1:170:If peak frequency does not match with the target frequency, returns -1003.

-.-.

Change a HYPHEN-MINUS (code 0x2D) to a minus(-dash) (\-),
if it
is in front of a name for an option,
is a symbol for standard input,
is a single character used to indicate an option,
or is in the NAME section (man-pages(7)).
N.B. - (0x2D), processed as a UTF-8 file, is changed to a hyphen
(0x2010, groff \[u2010] or \[hy]) in the output.

37:of alsabat, with configure option "--enable-alsabat-backend-tiny".
134:"--standalone".

-.-.

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.

11:human interaction. ALSABAT can be used to test audio quality, stress test
14:ALSABAT's design is relatively simple. ALSABAT plays an audio stream and
15:captures the same stream in either a digital or analog loop back. It then
21:target and runs as a server on a separate tester machine. The client/server
30:jacks to create a loopback. If only headphone and mic jacks (or combo jack)
68:The number of channels. The default is one channel.
72:Sampling rate in Hertz. The default rate is 44100 Hertz.
79:1. Decimal integer, means number of frames;
81:2. Floating point with suffix 's', means number of seconds.
90:value and standard deviation of frequency vectors. After that, we define
123:Playback, capture and analysis internal to ALSABAT only. This is intended
139:There are many kinds of audio latency metrics. One useful metric is the
143:Noise detection threshold in SNR (dB). 26dB indicates 5% noise in amplitude.
178:Currently only support RIFF WAV format with PCM data. Please report any bugs to

-.-.

Use the name of units in text; use symbols in tables and
calculations.
The rule is to have a (no-break, \~) space between a number and
its units (see "www.bipm.org/en/publications/si-brochure")

143:Noise detection threshold in SNR (dB). 26dB indicates 5% noise in amplitude.

-.-.

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

174:aplay(1)

-.-.

Change a HYPHEN-MINUS (code 0x55, 2D) to a dash
(\-, minus) if it matches "[[:alph:]]-[[:alpha:]]" in the name of an
option).
Facilitates the copy and paste of
a) an option in UTF-8 text
b) web addresses (URL).

Is not needed in ordinary words like "mother-in-law", that are not
copied and pasted to a command line (which needs ASCII code)

37:of alsabat, with configure option "--enable-alsabat-backend-tiny".

-.-.

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

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

-.-

Additionally:

  Use a hyphen between a number and the unit (name) "bit",
see "man-pages(7)", item "Terms to avoid".
--- alsabat.1	2024-11-27 00:33:40.281656673 +0000
+++ alsabat.1.new	2024-11-27 01:03:49.731607405 +0000
@@ -7,34 +7,41 @@ alsabat \- command\-line sound tester fo
 
 .SH DESCRIPTION
 \fBALSABAT(ALSA Basic Audio Tester)\fP is a simple command\-line utility
-intended to help automate audio driver and sound server testing with little
-human interaction. ALSABAT can be used to test audio quality, stress test
-features and test audio before and after PM state changes.
-
-ALSABAT's design is relatively simple. ALSABAT plays an audio stream and
-captures the same stream in either a digital or analog loop back. It then
-compares the captured stream using a FFT to the original to determine if
-the test case passes or fails.
-
-ALSABAT can either run wholly on the target machine being tested (standalone
-mode) or can run as a client/server mode where by alsabat client runs on the
-target and runs as a server on a separate tester machine. The client/server
-mode still requires some manual interaction for synchronization, but this
-is actively being developed for future releases.
+intended to help automate audio driver
+and sound server testing with little human interaction.
+ALSABAT can be used to test audio quality,
+stress test features
+and test audio before and after PM state changes.
+
+ALSABAT's design is relatively simple.
+ALSABAT plays an audio stream
+and captures the same stream in either a digital or analog loop back.
+It then compares the captured stream using a FFT to the original
+to determine if the test case passes or fails.
+
+ALSABAT can either run wholly on the target machine being tested
+(standalone mode)
+or can run as a client/server mode where by alsabat client runs on the
+target
+and runs as a server on a separate tester machine.
+The client/server mode still requires some manual interaction for
+synchronization,
+but this is actively being developed for future releases.
 
 The hardware testing configuration may require the use of an analog cable
 connecting target to tester machines or a cable to create an analog
 loopback if no loopback mode is available on the sound hardware that is
 being tested.
 An analog loopback cable can be used to connect the "line in" to "line out"
-jacks to create a loopback. If only headphone and mic jacks (or combo jack)
-are available then the following simple circuit can be used to create an
-analog loopback :-
+jacks to create a loopback.
+If only headphone and mic jacks (or combo jack) are available
+then the following simple circuit can be used to create an analog loopback
+:-
 
 https://source.android.com/devices/audio/loopback.html
 
 If tinyalsa is installed in system, user can choose tinyalsa as backend lib
-of alsabat, with configure option "--enable-alsabat-backend-tiny".
+of alsabat, with configure option "\-\-enable-alsabat-backend-tiny".
 
 .SH OPTIONS
 .TP
@@ -59,26 +66,28 @@ Some of these may not be available on se
 .br
 The available format shortcuts are:
 .nf
-\-f cd (16 bit little endian, 44100, stereo) [\-f S16_LE \-c2 \-r44100]
-\-f dat (16 bit little endian, 48000, stereo) [\-f S16_LE \-c2 \-r48000]
+\-f cd (16-bit little endian, 44100, stereo) [\-f S16_LE \-c2 \-r44100]
+\-f dat (16-bit little endian, 48000, stereo) [\-f S16_LE \-c2 \-r48000]
 .fi
 If no format is given S16_LE is used.
 .TP
 \fI\-c\fP
-The number of channels. The default is one channel.
+The number of channels.
+The default is one channel.
 Valid values at the moment are 1 or 2.
 .TP
 \fI\-r\fP
-Sampling rate in Hertz. The default rate is 44100 Hertz.
+Sampling rate in Hertz.
+The default rate is 44100 Hertz.
 Valid values depends on hardware support.
 .TP
 \fI\-n\fP
 Duration of generated signal.
 The value could be either of the two forms:
 .br
-1. Decimal integer, means number of frames;
+1.\& Decimal integer, means number of frames;
 .br
-2. Floating point with suffix 's', means number of seconds.
+2.\& Floating point with suffix 's', means number of seconds.
 .br
 The default is 2 seconds.
 .TP
@@ -87,8 +96,8 @@ Sigma k value for analysis.
 .br
 The analysis function reads data from WAV file, run FFT against the data
 to get magnitude of frequency vectors, and then calculates the average
-value and standard deviation of frequency vectors. After that, we define
-a threshold:
+value and standard deviation of frequency vectors.
+After that, we define a threshold:
 .br
 threshold = k * standard_deviation + mean_value
 .br
@@ -120,9 +129,9 @@ Target WAV file to save capture test con
 .TP
 \fI\-\-local\fP
 Internal loopback mode.
-Playback, capture and analysis internal to ALSABAT only. This is intended
-for developers to test new ALSABAT features as no audio is routed outside
-of ALSABAT.
+Playback, capture and analysis internal to ALSABAT only.
+This is intended for developers to test new ALSABAT features
+as no audio is routed outside of ALSABAT.
 .TP
 \fI\-\-standalone\fP
 Add support for standalone mode where ALSABAT will run on a different machine
@@ -131,17 +140,20 @@ In standalone mode, the sound data can b
 just like in normal mode, but will not be analyzed.
 The ALSABAT being built without libfftw3 support is always in standalone mode.
 The ALSABAT in normal mode can also bypass data analysis using option
-"--standalone".
+"\-\-standalone".
 .TP
 \fI\-\-roundtriplatency\fP
 Round trip latency test.
 Audio latency is the time delay as an audio signal passes through a system.
-There are many kinds of audio latency metrics. One useful metric is the
-round trip latency, which is the sum of output latency and input latency.
+There are many kinds of audio latency metrics.
+One useful metric is the round trip latency,
+which is the sum of output latency and input latency.
 .TP
 \fI\-\-snr\-db=#\fP
-Noise detection threshold in SNR (dB). 26dB indicates 5% noise in amplitude.
-ALSABAT will return error if signal SNR is smaller than the threshold.
+Noise detection threshold in SNR (dB).
+26\~dB indicates 5% noise in amplitude.
+ALSABAT will return error
+if signal SNR is smaller than the threshold.
 .TP
 \fI\-\-snr\-pc=#\fP
 Noise detection threshold in percentage of noise amplitude (%).
@@ -160,26 +172,24 @@ Play the RIFF WAV file "500Hz.wav" which
 data, and then capture and analyze.
 
 .SH RETURN VALUE
-.br
 On success, returns 0.
 .br
-If no peak be detected, returns -1001;
+If no peak be detected, returns \-1001;
 .br
-If only DC be detected, returns -1002;
+If only DC be detected, returns \-1002;
 .br
-If peak frequency does not match with the target frequency, returns -1003.
+If peak frequency does not match with the target frequency, returns \-1003.
 
 .SH SEE ALSO
-\fB
-aplay(1)
-\fP
+.BR aplay (1)
 
 .SH BUGS
-Currently only support RIFF WAV format with PCM data. Please report any bugs to
-the alsa-devel mailing list.
+Currently only support RIFF WAV format with PCM data.
+Please report any bugs to the alsa-devel mailing list.
 
 .SH AUTHOR
-\fBalsabat\fP is by Liam Girdwood <liam.r.girdwood@xxxxxxxxxxxxxxx>, Bernard
-Gautier <bernard.gautier@xxxxxxxxx> and Han Lu <han.lu@xxxxxxxxx>.
-This document is by Liam Girdwood <liam.r.girdwood@xxxxxxxxxxxxxxx> and Han Lu
-<han.lu@xxxxxxxxx>.
+\fBalsabat\fP is by Liam Girdwood <liam.r.girdwood@xxxxxxxxxxxxxxx>,
+Bernard Gautier <bernard.gautier@xxxxxxxxx>
+and Han Lu <han.lu@xxxxxxxxx>.
+This document is by Liam Girdwood <liam.r.girdwood@xxxxxxxxxxxxxxx>
+and Han Lu <han.lu@xxxxxxxxx>.

[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