Skip to content

alsabat: add noise detection

[email protected] alsa-devel 1 version Applied

Status from this message: Applied all patches now. Thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4alsabat: align the data type on floatbat/analyze.c bat/bat.c bat/common.h +4 more+41 -400 replies
2/4alsabat: add channels parameter for adjust_waveform()bat/signal.c+4 -30 replies
3/4alsabat: add a single channel sine wave generatorbat/bat-signal.h bat/signal.c+19 -00 replies
4/4alsabat: add noise detectionbat/alsabat-test.sh bat/alsabat.1 bat/analyze.c +2 more+263 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] alsabat: add noise detection

From: "Lu, Han" <[email protected]>

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(-)
Signature · 1 line
2.5.0