alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: han.lu@intel.com
To: tiwai@suse.de, liam.r.girdwood@linux.intel.com,
	alsa-devel@alsa-project.org
Cc: "Lu, Han" <han.lu@intel.com>
Subject: [PATCH 0/4] alsabat: add noise detection
Date: Thu,  9 Jun 2016 03:42:45 +0800	[thread overview]
Message-ID: <cover.1465404865.git.han.lu@intel.com> (raw)

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

Add noise detection for alsabat.
Alsabat reports error when noise above threshold be detected.
Use either of the options below to designate the threshold. (e.g.
if the ratio of noise to signal is 5%, the snr is about 26dB.)
    --snr-db <value in dB>
    --snr-pc <value in %>

The noise detection is performed in time domain. On each period
of the sine wave being analyzed, alsabat substracts a clean sine
wave from the source, calculates the RMS value of the residual,
and compares the result with the threshold. At last, alsabat
returns the number of periods with noise above threshold. 0 is
returned when the source is clean.

patch content:
  1. align the data type and process on float
  2. add a parameter for adjust_waveform()
  3. add a single channel sine wave generator
  4. add noise detection

Lu, Han (4):
  alsabat: align the data type on float
  alsabat: add channels parameter for adjust_waveform()
  alsabat: add a single channel sine wave generator
  alsabat: add noise detection

 bat/alsabat-test.sh |   4 +
 bat/alsabat.1       |   8 ++
 bat/analyze.c       | 216 +++++++++++++++++++++++++++++++++++++++++++++++-----
 bat/bat-signal.h    |   1 +
 bat/bat.c           |  62 ++++++++++++---
 bat/common.h        |  36 ++++++++-
 bat/convert.c       |   8 +-
 bat/convert.h       |   8 +-
 bat/signal.c        |  27 ++++++-
 configure.ac        |   2 +-
 10 files changed, 327 insertions(+), 45 deletions(-)

-- 
2.5.0

             reply	other threads:[~2016-06-08 11:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-08 19:42 han.lu [this message]
2016-06-08 13:18 ` [PATCH 0/4] alsabat: add noise detection Takashi Iwai
2016-06-08 19:42 ` [PATCH 1/4] alsabat: align the data type on float han.lu
2016-06-08 19:42 ` [PATCH 2/4] alsabat: add channels parameter for adjust_waveform() han.lu
2016-06-08 19:42 ` [PATCH 3/4] alsabat: add a single channel sine wave generator han.lu
2016-06-08 19:42 ` [PATCH 4/4] alsabat: add noise detection han.lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1465404865.git.han.lu@intel.com \
    --to=han.lu@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).