alsa-project / tinycompress Goto Github PK
View Code? Open in Web Editor NEWThe Advanced Linux Sound Architecture (ALSA) - tinycompress
License: Other
The Advanced Linux Sound Architecture (ALSA) - tinycompress
License: Other
Have there been discussions about adding support for (E)AC3, DTS, and MPEG-H? These days, 3D Audio is a use case where the Compress-Offload API is useful. It therefore would make sense to add support for these formats. I'm talking about direct support, not through IEC958 / IEC61937 payloading. I know that some HW vendors add their own custom changes to tinycompress to support these formats, so why not add these to upstream?
Attempted to clone the github repo using the following command:
I got the following error:
$ git clone git://git.alsa-project.org/tinycompress.git
Cloning into 'tinycompress'...
fatal: unable to connect to git.alsa-project.org:
git.alsa-project.org[0: 207.180.221.201]: errno=Unknown error
The git clone command appears to timeout
Hello, I am tesing your library now.
lsmod says that kernel has snd_compress module loaded.
I have file.mp3 and try to execute cplay next way:
$ cplay file.mp3
Next logs were written to output:
Unable to open Compress device 0:0
ERR: cannot open device '/dev/snd/comprC0D0': No such file or directory
I looked through the contents of the /dev/snd/ folder and found nothing that had prefix 'compr'.
So, what device should I have to test it?
I have compiled the program and when I run the cplay
script I get an error:
andres6936@Tierra ~/CLionProjects/tinycompress-master/src/utils $ cplay TestAudio.mp3
Error: Can't find sync word
I have already checked out different mp3 files and I keep getting the same error.
I have also tried different options, but it is always the same error.
I just tried to compile tinycompress with the new C compiler clang-14.
It said:
cplay.c:153:34: warning: & has lower precedence than !=; != will be evaluated first [-Wparentheses]
Source code is
if ((buf[0] != 0xff) || (buf[1] & 0xf0 != 0xf0))
Suggest new code:
if ((buf[0] != 0xff) || ((buf[1] & 0xf0) != 0xf0))
Current tinycompress supports only interfacing directly with the ALSA kernel interface.
Proposal is to add support for tinycompress plugins for below reasons:
• Allow custom implementation of Compress modules in userspace
• Plugins can perform decoding/encoding.
To add this support, we have come up with the below design goals to make sure the impact is minimal
and the changes are helpful to the community of tinycompress users.
• Extend tinycompress functionality at run time/compile time to support plugins
• No change in any of the APIs exposed by tinycompress
• Re-use all existing tinycompress functionality for plugins
• Do not allow duplication of similar logic
• Plugins to adhere to same ALSA kernel interface (from asound.h/compress_params.h/compress_offload.h file)
The high level design to achieve this is as described below,
• Concept of virtual compress nodes similar to virtual PCM nodes and mixer nodes in tinyalsa.
• Virtual nodes defined in config file
• At compress_open call, first try to open kernel device node (present under /dev/snd/*).
• If Plugin support is enabled and kernel node open fails, try to open virtual node (defined in the config file).
• This information is retrieved by snd_utils which calls libsndcardparser.so and get information related to virtual node.
• Based on resolution at open assign function pointers for all functions at kernel interface level (ex: read/write/ioctl, etc).
• For kernel node, all function pointers implemented under new file compress_hw.c and all of them call into the kernel interface
• For virtual node, all function pointers implemented under new file compress_plugin.c, which interfaces with the plugin.
• Plugin itself is a .so library, dynamically dlopen’ed by the compress_plugin.c at open, and expected to register its ops to the framework (ex ops: open/read/write, etc)
• Plugin library name is stored in config file and is associated with card and device id.
The design is similar to plugin support in tinyalsa which was discussed in tinyalsa/tinyalsa#135 and tinyalsa/tinyalsa#137.
i was building yocto image which uses tinycomrpess as part of NXP's recipe-multimedia. the yocto build failed since it wasnt able to clone the package.
i tried to clone from CLI using the command "git clone git://git.alsa-project.org/tinycompress.git" and still it failed
The track is AC3 with 2 encoded channels, 48K and s16le.
I am using crecord -c0 -d39 -C2 -f8 -b6144 -R48000 -I IEC61937 > ac3.iec
.
Normally consecutive 0xf872 0x4e1f offset len must be 6144 bytes but that offset is not proper in my case.
Similar with aplay -l
we need an option to list compress devices. cplay -l
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.