alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/7] BAT: Add Basic Audio Tester command line tool
@ 2015-09-23  7:48 han.lu
  2015-09-23  7:48 ` [PATCH V2 1/7] BAT: Add initial functions han.lu
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: han.lu @ 2015-09-23  7:48 UTC (permalink / raw)
  To: tiwai, liam.r.girdwood, bernard.gautier, caleb, alsa-devel; +Cc: Lu, Han

From: "Lu, Han" <han.lu@intel.com>

BAT (Basic Audio Tester) is a simple command line utility intended
to automate audio driver and sound server QA testing with no human
interaction.

BAT works by playing an audio stream and capturing the same stream
in either a digital or analog loop back. It then compares the captured
stream to the original to determine if the test case passes or fails.

The main idea of frequency detecting is:
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:
    threshold = 3 * standard_deviation + average_value
Frequencies with amplitude larger than threshold will be recognized as
a peak, and the frequency with largest peak value will be recognized as
a detected frequency.
BAT then compares the detected frequency to target frequency, to decide
if the detecting passes or fails.

BAT supports 4 working modes:
  1. Single line playback;
  2. Single line capture and analysis;
  3. Playback and capture in loop, and analyze captured data;
  4. Local analyze without actual playback or capture.
BAT will check devices input by user to decide which mode to use.
BAT will create threads for playback and record, and will run spectrum
analysis for mode 2, 3 or 4.

Changes on V2:
	1. Adopt Caleb Crome's method to generate sine signal to avoids
	unwanted distortion on waveform.

Lu, Han (7):
  BAT: Add initial functions
  BAT: Add common definitions and functions
  BAT: Add playback and record functions
  BAT: Add signal generator
  BAT: Add converting functions
  BAT: Add spectrum analysis functions
  BAT: Add Makefile and configures

 Makefile.am     |   3 +
 bat/Makefile.am |  14 ++
 bat/alsa.c      | 594 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 bat/alsa.h      |  20 ++
 bat/analyze.c   | 314 +++++++++++++++++++++++++++++
 bat/analyze.h   |  16 ++
 bat/bat.c       | 603 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 bat/common.c    | 198 +++++++++++++++++++
 bat/common.h    | 176 +++++++++++++++++
 bat/convert.c   | 113 +++++++++++
 bat/convert.h   |  23 +++
 bat/signal.c    | 182 +++++++++++++++++
 bat/signal.h    |  30 +++
 configure.ac    |  19 +-
 14 files changed, 2304 insertions(+), 1 deletion(-)
 create mode 100644 bat/Makefile.am
 create mode 100644 bat/alsa.c
 create mode 100644 bat/alsa.h
 create mode 100644 bat/analyze.c
 create mode 100644 bat/analyze.h
 create mode 100644 bat/bat.c
 create mode 100644 bat/common.c
 create mode 100644 bat/common.h
 create mode 100644 bat/convert.c
 create mode 100644 bat/convert.h
 create mode 100644 bat/signal.c
 create mode 100644 bat/signal.h

-- 
1.9.1

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-10-13  9:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-23  7:48 [PATCH V2 0/7] BAT: Add Basic Audio Tester command line tool han.lu
2015-09-23  7:48 ` [PATCH V2 1/7] BAT: Add initial functions han.lu
2015-10-02 10:55   ` Takashi Iwai
2015-10-12  8:56     ` Lu, Han
2015-10-13  9:53       ` Liam Girdwood
2015-09-23  7:48 ` [PATCH V2 2/7] BAT: Add common definitions and functions han.lu
2015-10-02 10:57   ` Takashi Iwai
2015-09-23  7:48 ` [PATCH V2 3/7] BAT: Add playback and record functions han.lu
2015-09-23  7:48 ` [PATCH V2 4/7] BAT: Add signal generator han.lu
2015-09-23  7:48 ` [PATCH V2 5/7] BAT: Add converting functions han.lu
2015-09-23  7:48 ` [PATCH V2 6/7] BAT: Add spectrum analysis functions han.lu
2015-09-23  7:48 ` [PATCH V2 7/7] BAT: Add Makefile and configures han.lu
2015-10-02 10:49 ` [PATCH V2 0/7] BAT: Add Basic Audio Tester command line tool Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).