Watch
1
0
Fork
You've already forked tinyalsa
0
mirror of https://repo.dec05eba.com/tinyalsa synced 2026-11-03 02:35:58 +00:00
Tiny library to interface with ALSA in the Linux kernel
  • C 75.9%
  • C++ 16.4%
  • Roff 2%
  • Shell 1.8%
  • Makefile 1.5%
  • Other 2.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2023-09-13 21:01:06 +02:00
debian Add changelog for tinyalsa 2.0.0 2020-09-21 11:49:06 -06:00
doxygen Update Doxyfile from version 1.8.11 to 1.8.17 2020-09-16 12:32:52 -07:00
examples update NOTICE file and format license header 2021-07-15 18:12:55 +08:00
include/tinyalsa Merge pull request #244 from rohit-qc/chmap_mixer_support 2023-09-05 10:20:40 +08:00
scripts scripts/version.sh: switch from bash to POSIX sh 2020-05-22 20:47:34 -04:00
src Merge pull request #244 from rohit-qc/chmap_mixer_support 2023-09-05 10:20:40 +08:00
tests force pcm_open to open device with the non-blocking flag 2021-06-02 23:11:36 +08:00
utils Merge pull request #244 from rohit-qc/chmap_mixer_support 2023-09-05 10:20:40 +08:00
.gitignore Add build.zig 2023-09-13 21:01:06 +02:00
.travis.yml upgrade Travis CI dist to bionic 2021-01-29 14:31:15 +08:00
Android.bp tinyalsa: Add sample pcm/mixer plugin and sample sndcardparser 2021-07-08 09:52:30 +05:30
BUILD add unit tests for pcm_* functions 2020-11-16 17:07:04 +08:00
build.zig Add build.zig 2023-09-13 21:01:06 +02:00
CMakeLists.txt Fix error when building with -DTINYALSA_BUILD_UTILS=OFF 2020-09-16 21:38:54 -03:00
LICENSE add LICENSE file and rename modules in Android.bp 2021-01-20 11:36:15 +08:00
Makefile tinyalsa: add plugin.h to install path 2020-04-14 10:43:11 +05:30
meson.build tinyalsa: add support for mixer plugins 2020-02-07 12:53:00 +05:30
meson_options.txt Add support for Meson as build system 2018-12-15 20:16:03 +00:00
METADATA Add and update files from Android downstream branch to more closely match 2020-09-22 15:19:39 -07:00
MODULE_LICENSE_BSD Add and update files from Android downstream branch to more closely match 2020-09-22 15:19:39 -07:00
NOTICE update NOTICE file and format license header 2021-07-15 18:12:55 +08:00
OWNERS Add and update files from Android downstream branch to more closely match 2020-09-22 15:19:39 -07:00
README.md add instructions to run tests and fix typo 2020-12-01 14:10:34 +08:00
WORKSPACE match the varaibles' type for 64-bit compatibility 2021-12-15 21:09:22 +08:00

TinyALSA

Build Status

TinyALSA is a small library to interface with ALSA in the Linux kernel.

The aims are:

  • Provide a basic pcm and mixer API.
  • If it's not absolutely needed, don't add it to the API.
  • Avoid supporting complex and unnecessary operations, that could be dealt with at a higher level.
  • Provide comprehensive documentation.

Building

TinyALSA supports these build systems:

To build and install with Make, run the commands:

make
sudo make install
sudo ldconfig

Installing

TinyALSA is now available as a set of the following Debian packages from launchpad:

Package Name: Description:
tinyalsa Contains tinyplay, tinycap, tinymix and tinypcminfo
libtinyalsa Contains the shared library
libtinyalsa-dev Contains the static library and header files

To install these packages, run the commands:

sudo apt-add-repository ppa:taylorcholberton/tinyalsa
sudo apt-get update
sudo apt-get install tinyalsa
sudo apt-get install libtinyalsa-dev

Documentation

Once installed, the man pages are available via:

man tinyplay
man tinycap
man tinymix
man tinypcminfo
man libtinyalsa-pcm
man libtinyalsa-mixer

Test

To test libtinyalsa, please follow the instructions,

Setup Bazel build environment

Visit here to get more info to setup Bazel environment.

Insert loopback devices

The test program does pcm_* operations on loopback devices. You have to insert loopback devices after your system boots up.

sudo modprobe snd-aloop
sudo chmod 777 /dev/snd/*

Run test program

bazel test //:tinyalsa_tests --test_output=all

The default playback device is hw:2,0 and the default capture device is hw:2,1. If your loopback devices are not hw:2,0 and hw:2,1, you can specify the loopback device.

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]

Generate coverage report

bazel coverage //:tinyalsa_tests --combined_report=lcov --test_output=all
genhtml bazel-out/_coverage/_coverage_report.dat -o tinyalsa_tests_coverage