From: Takashi Iwai Subject: Re: [PATCH V2 0/7] BAT: Add Basic Audio Tester command line tool Date: Fri, 02 Oct 2015 12:49:31 +0200 Message-ID: References: Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 67FEC2668AD for ; Fri, 2 Oct 2015 12:49:30 +0200 (CEST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: han.lu@intel.com Cc: bernard.gautier@intel.com, alsa-devel@alsa-project.org, caleb@crome.org, liam.r.girdwood@intel.com List-Id: alsa-devel@alsa-project.org On Wed, 23 Sep 2015 09:48:48 +0200, han.lu@intel.com wrote: > > From: "Lu, Han" > > 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 Thanks, I applied all patches now for making the further development easier. But in general, please give a good documentation describing how to use it, at best, in a form of man page. I'll give some comments in each patch later. Takashi