All files should be opened in either "rb" or "wb" in current
usage.
Remove incorrect and unneccesary prints.
Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Preserve errno value before use, since the value might be
changed by another library call.
Add "#include <errno.h>" and remove redundant include.
Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add support for standalone mode where alsabat will run on a
different machine to the one being tested.
In standalone mode, the alsabat just generates, playback and
capture sound data like in normal mode, but does not analyze.
The alsabat being built without libfftw3 support is always work
in standalone mode.
The alsabat in normal mode can also bypass data analysis using
option "--standalone".
Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add default name for the playback and capture devices, in case
they were not set by user through '-D', '-P' or '-C' options.
Previously, if no device be specified, the alsabat will start
a playback thread and a capture thread, and then exit the
threads with error log.
If only one of playback and capture is specified, the alsabat
will work on single line mode as before, where only one thread
(playback or capture) will be started.
The patch was tested on Ubuntu and Chrome OS.
Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
alsa-utils as well as bareos-bat (as well a some Bacula packages)
all contain a program called /usr/bin/bat, which causes conflicts on
various distributions ("basic audio tester" vs "bareos administration
tool"("bacula administration tool")).
Rename to avoid conflict.
Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Missing include became apparent when -O3 was not specified.
Added the header to remove error messages during debug compile.
Signed-off-by: Caleb Crome <caleb@crome.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Use dynamic temp file instead of fixed temp file to store recorded
wav data, for better security.
Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
1. Change comment strings to make the descriptions more clear;
2. Add indent for option lines that have no indent;
3. Use a const string instead of argv[0] as program name.
Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Use colon instead of comma to separate frequency parameters, for
in several locale comma may be handled as decimal point.
Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cutting down 6 message strings to 2, as translators need to work
on each different variant.
Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add main entrance, command line parsing, parameter initiating and
thread initiating functions for BAT.
Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Bernard Gautier <bernard.gautier@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>