EnglishFrenchSpanish

OnWorks favicon

alsabat - Online in the Cloud

Run alsabat in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command alsabat that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


alsabat - command-line sound tester for ALSA sound card driver

SYNOPSIS


alsabat [flags]

DESCRIPTION


ALSABAT(ALSA Basic Audio Tester) is a simple command-line utility intended to help
automate audio driver and sound server testing with little human interaction. ALSABAT can
be used to test audio quality, stress test features and test audio before and after PM
state changes.

ALSABAT's design is relatively simple. ALSABAT plays an audio stream and captures the same
stream in either a digital or analog loop back. It then compares the captured stream using
a FFT to the original to determine if the test case passes or fails.

ALSABAT can either run wholly on the target machine being tested (standalone mode) or can
run as a client/server mode where by alsabat client runs on the target and runs as a
server on a separate tester machine. The client/server mode still requires some manual
interaction for synchronization, but this is actively being developed for future releases.

The hardware testing configuration may require the use of an analog cable connecting
target to tester machines or a cable to create an analog loopback if no loopback mode is
not available on the sound hardware that is being tested. An analog loopback cable can be
used to connect the "line in" to "line out" jacks to create a loopback. If only headphone
and mic jacks (or combo jack) are available then the following simple circuit can be used
to create an analog loopback :-

https://source.android.com/devices/audio/loopback.html

OPTIONS


-h, --help
Help: show syntax.

-D Select sound card to be tested by name.

-P Select the playback PCM device.

-C Select the capture PCM device.

-f Sample format
Recognized sample formats are: U8 S16_LE S24_3LE S32_LE
Some of these may not be available on selected hardware
The available format shortcuts are:
-f cd (16 bit little endian, 44100, stereo) [-f S16_LE -c2 -r44100]
-f dat (16 bit little endian, 48000, stereo) [-f S16_LE -c2 -r48000]
If no format is given S16_LE is used.

-c The number of channels. The default is one channel. Valid values at the moment are
1 or 2.

-r Sampling rate in Hertz. The default rate is 44100 Hertz. Valid values depends on
hardware support.

-n Duration of generated signal. The value could be either of the two forms:
1. Decimal integer, means number of frames;
2. Floating point with suffix 's', means number of seconds.
The default is 2 seconds.

-k Sigma k value for analysis.
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 = k * standard_deviation + mean_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.
ALSABAT then compares the detected frequency to target frequency, to decide if the
detecting passes or fails.
The default value is 3.0.

-F Target frequency for signal generation and analysis, in Hertz. The default is
997.0 Hertz. Valid range is (DC_THRESHOLD, 40% * Sampling rate).

-p Total number of periods to play or capture.

--log=#
Write stderr and stdout output to this log file.

--file=#
Input WAV file for playback.

--saveplay=#
Target WAV file to save capture test content.

--local
Internal loopback mode. Playback, capture and analysis internal to ALSABAT only.
This is intended for developers to test new ALSABAT features as no audio is routed
outside of ALSABAT.

EXAMPLES


alsabat -P plughw:0,0 -C plughw:0,0 -c 2 -f S32_LE -F 250
Generate and play a sine wave of 250 Hertz with 2 channel and S32_LE format, and
then capture and analyze.

alsabat -P plughw:0,0 -C plughw:0,0 --file 500Hz.wav
Play the RIFF WAV file "500Hz.wav" which contains 500 Hertz waveform LPCM data, and
then capture and analyze.

RETURN VALUE


On success, returns 0.
If no peak be detected, returns -1001;
If only DC be detected, returns -1002;
If peak frequency does not match with the target frequency, returns -1003.

Use alsabat online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Free Pascal Compiler
    Free Pascal Compiler
    A 32/64/16-bit Pascal compiler for
    Win32/64/CE, Linux, Mac OS X/iOS,
    Android, FreeBSD, OS/2, Game Boy
    Advance, Nintendo NDS and DOS;
    semantically compatible wi...
    Download Free Pascal Compiler
  • 2
    Canon EOS DIGITAL Info
    Canon EOS DIGITAL Info
    Canon doesn�t have shutter count
    included on the EXIF information of an
    image file, as opposed to Nikon and
    Pentax. There�s no official Canon based
    application ...
    Download Canon EOS DIGITAL Info
  • 3
    rEFInd
    rEFInd
    rEFInd is a fork of the rEFIt boot
    manager. Like rEFIt, rEFInd can
    auto-detect your installed EFI boot
    loaders and it presents a pretty GUI
    menu of boot option...
    Download rEFInd
  • 4
    ExpressLuke GSI
    ExpressLuke GSI
    This SourceForge download page was to
    grant users to download my source built
    GSIs, based upon phhusson's great
    work. I build both Android Pie and
    Android 1...
    Download ExpressLuke GSI
  • 5
    Music Caster
    Music Caster
    Music Caster is a tray music player
    that lets you cast your local music to a
    Google Cast device. On the first run,
    you will need to click the arrow in your
    tas...
    Download Music Caster
  • 6
    PyQt
    PyQt
    PyQt is the Python bindings for
    Digia's Qt cross-platform
    application development framework. It
    supports Python v2 and v3 and Qt v4 and
    Qt v5. PyQt is avail...
    Download PyQt
  • More »

Linux commands

  • 1
    4ti2-circuits
    4ti2-circuits
    4ti2 - software package for algebraic,
    geometric and combinatorial problems on
    linear spaces ...
    Run 4ti2-circuits
  • 2
    4ti2-genmodel
    4ti2-genmodel
    4ti2 - software package for algebraic,
    geometric and combinatorial problems on
    linear spaces ...
    Run 4ti2-genmodel
  • 3
    coriander
    coriander
    coriander - control and display dc1394
    camera images ...
    Run coriander
  • 4
    corkscrew
    corkscrew
    corkscrew - Tunnel TCP connections
    through HTTP proxies ...
    Run corkscrew
  • 5
    g.gisenvgrass
    g.gisenvgrass
    g.gisenv - Outputs and modifies the
    user�s current GRASS variable settings.
    Prints all defined GRASS variables if no
    option is given. KEYWORDS: general,
    settin...
    Run g.gisenvgrass
  • 6
    g.guigrass
    g.guigrass
    g.gui - Launches a GRASS graphical user
    interface (GUI) session. Optionally
    updates default user interface settings.
    KEYWORDS: general, GUI, user interface ...
    Run g.guigrass
  • More »

Ad