Go to file
Robert 4c3fc4f59e
!3 feat:add hdf component
Merge pull request !3 from 张锋喜/master
2022-01-15 10:01:02 +00: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 prepare in pcm_generic_transfer 2021-01-28 14:25:40 +08:00
include/tinyalsa tinyalsa adapter rk3568 2021-11-16 14:25:33 +08:00
scripts scripts/version.sh: switch from bash to POSIX sh 2020-05-22 20:47:34 -04:00
src tinyalsa adapter rk3568 2021-11-16 14:25:33 +08:00
tests fix test case to match the API 2021-01-28 17:46:05 +08:00
utils Let pcm_mmap_read/write call pcm_readi/writei 2021-01-28 15:14:34 +08:00
.gitignore add unit tests for pcm_* functions 2020-11-16 17:07:04 +08:00
.travis.yml upgrade Travis CI dist to bionic 2021-01-29 14:31:15 +08:00
Android.bp add LICENSE file and rename modules in Android.bp 2021-01-20 11:36:15 +08:00
BUILD add unit tests for pcm_* functions 2020-11-16 17:07:04 +08:00
BUILD.gn feat:add hdf component 2022-01-15 11:27:28 +08:00
CMakeLists.txt Fix error when building with -DTINYALSA_BUILD_UTILS=OFF 2020-09-16 21:38:54 -03:00
LICENSE update LICENSE. 2021-12-31 10:35:37 +00:00
Makefile tinyalsa: add plugin.h to install path 2020-04-14 10:43:11 +05:30
meson_options.txt Add support for Meson as build system 2018-12-15 20:16:03 +00:00
meson.build tinyalsa: add support for mixer plugins 2020-02-07 12:53:00 +05:30
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 Add and update files from Android downstream branch to more closely match 2020-09-22 15:19:39 -07:00
OAT.xml update OAT.xml. 2021-12-31 06:28:01 +00: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
README.OpenSource update README.OpenSource. 2021-12-31 06:10:51 +00:00
WORKSPACE add unit tests for pcm_* functions 2020-11-16 17:07:04 +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