• Home
Name Date Size #Lines LOC

..--

debian/03-May-2024-202151

doxygen/03-May-2024-2,5681,981

examples/03-May-2024-221168

include/tinyalsa/03-May-2024-1,084443

scripts/03-May-2024-284197

src/03-May-2024-5,0723,321

tests/03-May-2024-1,430982

utils/03-May-2024-2,5671,947

.gitignoreD03-May-2024205 2417

.travis.ymlD03-May-2024379 2420

Android.bpD03-May-20242.4 KiB9989

BUILDD03-May-20242.1 KiB5855

CMakeLists.txtD03-May-20242.9 KiB9882

LICENSED03-May-20241.5 KiB2622

METADATAD03-May-202439 43

MODULE_LICENSE_BSDD03-May-20240

MakefileD03-May-20241.1 KiB4133

NOTICED03-May-20241.5 KiB2622

OWNERSD03-May-202436 32

README.mdD03-May-20242.9 KiB10473

WORKSPACED03-May-2024190 86

meson.buildD03-May-20241 KiB3928

meson_options.txtD03-May-2024313 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