ALSA's TinyCompress Audio Library Gets A Release
Today marks the first tagged release of TinyCompress, a user-space library that takes advantage of ALSA Compressed APIs that were recently introduced in the mainline Linux kernel. This library allows for feeding compressed data like MP3 files directly to ALSA compressed audio devices. This allows for offloading more of the audio playback process to supported audio hardware.
Last August I wrote about this new support in the Linux kernel for ALSA audio compression offloading, "One of the new ALSA features is support for audio compression offloading where the DSP handling of compressed audio formats can be offloaded from the CPU to a DSP, which can be more efficient and lower the CPU usage. The kernel core API for this audio compression offloading was pushed into the Linux 3.3 kernel while with the Linux 3.7 kernel there will be ASoC integration support as well as support for compression offloading with the Intel Medfield audio driver."
There's also additional information on this ALSA audio compression API within the Linux kernel source tree at Documentation/sound/alsa/compress_offload.txt:
TinyCompress was written by a developer at Intel. While it's too bad that sending compressed audio data won't work over the existing ALSA kernel APIs, it's nice that there's TinyCompress as a sample library implementation.
The Git repository for TinyCompress can be found at ALSA-Project.org. The TinyCompress 0.1.0 release announcement can be found on the ALSA mailing list.
Last August I wrote about this new support in the Linux kernel for ALSA audio compression offloading, "One of the new ALSA features is support for audio compression offloading where the DSP handling of compressed audio formats can be offloaded from the CPU to a DSP, which can be more efficient and lower the CPU usage. The kernel core API for this audio compression offloading was pushed into the Linux 3.3 kernel while with the Linux 3.7 kernel there will be ASoC integration support as well as support for compression offloading with the Intel Medfield audio driver."
There's also additional information on this ALSA audio compression API within the Linux kernel source tree at Documentation/sound/alsa/compress_offload.txt:
Since its early days, the ALSA API was defined with PCM support or constant bitrates payloads such as IEC61937 in mind. Arguments and returned values in frames are the norm, making it a challenge to extend the existing API to compressed data streams.TinyCompress is a project that's been in development for nearly one year and today saw its v0.1.0 release. TinyCompress is a user-space library for taking advantage of this compressed API. Also included with TinyCompress is a sample command-line player showing how MP3 files can be fed to this audio compression kernel API. The work is dual-licensed under the LGPL and BSD.
In recent years, audio digital signal processors (DSP) were integrated in system-on-chip designs, and DSPs are also integrated in audio codecs. Processing compressed data on such DSPs results in a dramatic reduction of power consumption compared to host-based processing. Support for such hardware has not been very good in Linux, mostly because of a lack of a generic API available in the mainline kernel.
Rather than requiring a compatibility break with an API change of the ALSA PCM interface, a new 'Compressed Data' API is introduced to provide a control and data-streaming interface for audio DSPs.
The design of this API was inspired by the 2-year experience with the Intel Moorestown SOC, with many corrections required to upstream the API in the mainline kernel instead of the staging tree and make it usable by others.
TinyCompress was written by a developer at Intel. While it's too bad that sending compressed audio data won't work over the existing ALSA kernel APIs, it's nice that there's TinyCompress as a sample library implementation.
The Git repository for TinyCompress can be found at ALSA-Project.org. The TinyCompress 0.1.0 release announcement can be found on the ALSA mailing list.
8 Comments