Name Date Size #Lines LOC

..--

debian/H25-Apr-2025-202151

doxygen/H25-Apr-2025-2,5681,981

examples/H25-Apr-2025-1,187842

include/tinyalsa/H25-Apr-2025-1,097451

scripts/H25-Apr-2025-284197

src/H25-Apr-2025-5,1753,399

tests/H25-Apr-2025-1,430982

utils/H25-Apr-2025-2,6442,015

.gitignoreH A D25-Apr-2025205 2417

.travis.ymlH A D25-Apr-2025379 2420

Android.bpH A D25-Apr-20252.7 KiB10899

BUILDH A D25-Apr-20252.1 KiB5855

CMakeLists.txtH A D25-Apr-20252.9 KiB9882

LICENSEH A D25-Apr-20251.5 KiB2623

METADATAH A D25-Apr-202539 43

MODULE_LICENSE_BSDHD25-Apr-20250

MakefileH A D25-Apr-20251.1 KiB4133

NOTICEH A D25-Apr-20251.5 KiB2623

OWNERSH A D25-Apr-202579 64

README.mdH A D25-Apr-20252.9 KiB10473

WORKSPACEH A D25-Apr-2025188 86

meson.buildH A D25-Apr-20251 KiB3928

meson_options.txtH A D25-Apr-2025313 76

README.md

1TinyALSA
2========
3
4[![Build Status](https://travis-ci.org/tinyalsa/tinyalsa.svg?branch=master)](https://travis-ci.org/tinyalsa/tinyalsa)
5
6TinyALSA is a small library to interface with ALSA in the Linux kernel.
7
8The aims are:
9
10 - Provide a basic pcm and mixer API.
11 - If it's not absolutely needed, don't add it to the API.
12 - Avoid supporting complex and unnecessary operations, that could be
13   dealt with at a higher level.
14 - Provide comprehensive documentation.
15
16### Building
17
18TinyALSA supports these build systems:
19
20 - [CMake](https://en.wikipedia.org/wiki/CMake)
21 - [Make](https://en.wikipedia.org/wiki/Make_(software))
22 - [Meson](https://en.wikipedia.org/wiki/Meson_(software))
23 - [Soong](https://android.googlesource.com/platform/build/soong/+/refs/heads/master/README.md) for Android
24
25To build and install with Make, run the commands:
26
27```
28make
29sudo make install
30sudo ldconfig
31```
32
33### Installing
34
35TinyALSA is now available as a set of the following [Debian](https://en.wikipedia.org/wiki/Debian)
36packages from [launchpad](https://launchpad.net/~taylorcholberton/+archive/ubuntu/tinyalsa):
37
38| Package Name:   | Description:                                        |
39|-----------------|-----------------------------------------------------|
40| tinyalsa        | Contains tinyplay, tinycap, tinymix and tinypcminfo |
41| libtinyalsa     | Contains the shared library                         |
42| libtinyalsa-dev | Contains the static library and header files        |
43
44To install these packages, run the commands:
45
46```
47sudo apt-add-repository ppa:taylorcholberton/tinyalsa
48sudo apt-get update
49sudo apt-get install tinyalsa
50sudo apt-get install libtinyalsa-dev
51```
52
53### Documentation
54
55Once installed, the man pages are available via:
56
57```
58man tinyplay
59man tinycap
60man tinymix
61man tinypcminfo
62man libtinyalsa-pcm
63man libtinyalsa-mixer
64```
65
66### Test
67
68To test libtinyalsa, please follow the instructions,
69
70#### Setup Bazel build environment
71
72Visit [here](https://docs.bazel.build/versions/3.7.0/install.html) to get more info to setup Bazel environment.
73
74#### Insert loopback devices
75
76The test program does pcm_* operations on loopback devices. You have to insert loopback devices after your system boots up.
77
78```
79sudo modprobe snd-aloop
80sudo chmod 777 /dev/snd/*
81```
82
83#### Run test program
84
85```
86bazel test //:tinyalsa_tests --test_output=all
87```
88
89The 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.
90
91```
92bazel test //:tinyalsa_tests --test_output=all \
93    --copt=-DTEST_LOOPBACK_CARD=[loopback card] \
94    --copt=-DTEST_LOOPBACK_PLAYBACK_DEVICE=[loopback playback device] \
95    --copt=-DTEST_LOOPBACK_CAPTURE_DEVICE=[loopback capture device]
96```
97
98#### Generate coverage report
99
100```
101bazel coverage //:tinyalsa_tests --combined_report=lcov --test_output=all
102genhtml bazel-out/_coverage/_coverage_report.dat -o tinyalsa_tests_coverage
103```
104