TinyALSA Documentation

repository·master·Indexed 20 days ago

https://github.com/tinyalsa/tinyalsa

A lightweight library providing a minimal and efficient interface to the Linux kernel's Advanced Linux Sound Architecture (ALSA). It provides basic PCM and mixer APIs, including command-line tools such as tinyplay, tinycap, tinymix, and tinypcminfo.

Tokens
536
Snippets
3
Records
4
Agent score
22%

What's inside tinyalsa

  1. Install TinyALSA via Debian packages

    master

    You can install TinyALSA using the PPA provided on Launchpad. This includes the command-line tools and the development libraries required for building applications against TinyALSA.

    Available packages:

    • tinyalsa: Contains tinyplay, tinycap, tinymix, and tinypcminfo.
    • libtinyalsa: Contains the shared library.
    • libtinyalsa-dev: Contains the static library and header files.
    sudo apt-add-repository ppa:taylorcholberton/tinyalsa
    sudo apt-get update
    sudo apt-get install tinyalsa
    sudo apt-get install libtinyalsa-dev
  2. Run TinyALSA tests

    master

    To run the TinyALSA test suite using Bazel, you must first ensure loopback devices are inserted and permissions are set.

    1. Setup loopback devices:
    sudo modprobe snd-aloop
    sudo chmod 777 /dev/snd/*
    1. Run tests: The default playback device is hw:2,0 and the default capture device is hw:2,1. If your loopback devices use different identifiers, pass them via --copt flags.

    Standard test run:

    bazel test //:tinyalsa_tests --test_output=all

    Test run with custom loopback devices:

    bazel test //:tinyalsa_tests --test_output=all \
        --copt=-DTEST_LOOPBACK_CARD=[loopback card] \
        --copt=-DTEST_LOOPBACK_PLAYBACK_DEVICE=[loopback playback device] \
        --copt=-DTEST_LOOPBACK_CAPTURE_DEVICE=[loopback capture device]
  3. Access TinyALSA documentation via man pages

    master

    Once installed, you can access the manual pages for the command-line tools and the PCM/Mixer libraries using the man command:

    • man tinyplay (Playback tool)
    • man tinycap (Capture tool)
    • man tinymix (Mixer tool)
    • man tinypcminfo (PCM info tool)
    • man libtinyalsa-pcm (PCM API documentation)
    • man libtinyalsa-mixer (Mixer API documentation)