On 8/30/17 7:08 AM, Lambdadroid wrote:
Hi,
I'm attempting to use TinyCompress to play a MP3 file on a Baytrail tablet (using bytcr-rt5640 on Linux 4.13-rc7) with ALSA's Compress-Offload API. After finding the right quirks and setting up the UCM files normal audio output is working, but I'm unable to play a MP3 file using the `cplay` tool included with TinyCompress.
The firmware available upstream does not contain MP3/AAC or proprietary libraries due to redistribution rights. Some of patents may start to expire soon but in general we steer clear of such components for freely available binary firmware. Not my choice btw, this is a minefield that's all too common for all open-source projects.
The benefits of mp3 offload on Baytrail are quite limited anyway due to internal SoC design choices, I wouldn't recommend you pursue this work if power optimization was the goal. Offload was mostly used for Medfield, Clovertrail, Merrifield and Anniedale platforms.
Note that `cplay` appears to be broken as of commit 50c2b03 "cplay: check the values of fread". fread returns the number of items that were read but the commit assumes it returns the number of bytes. I've simply changed the check to `read != 1` to fix it.
Indeed this looks wrong, thanks for reporting this point. Vinod, since you were the author of this patch can you check?