@@ -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@linux.intel.com>, Bernard
-Gautier <bernard.gautier@intel.com> and Han Lu <han.lu@intel.com>.
-This document is by Liam Girdwood <liam.r.girdwood@linux.intel.com> and Han Lu
-<han.lu@intel.com>.
+\fBalsabat\fP is by Liam Girdwood <liam.r.girdwood@linux.intel.com>,
+Bernard Gautier <bernard.gautier@intel.com>
+and Han Lu <han.lu@intel.com>.
+This document is by Liam Girdwood <liam.r.girdwood@linux.intel.com>
+and Han Lu <han.lu@intel.com>.