Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 00:23 19 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CPU load of "PLAY MP3" on the Armmite, eXtreme and CMM2

Author Message
MustardMan

Senior Member

Joined: 30/08/2019
Location: Australia
Posts: 175
Posted: 09:25am 28 Apr 2021
Copy link to clipboard 
Print this post

I was interested in making a custom player that supports MP3, but was unimpressed with all the modules on eBay. Good they can play from an SD card, but I want to get the track list from said SD so I can select a track by its' name, not by some obscure number! I found nothing about if it was possible or not: the devices supporting UART control allow play/pause/stop and track selection by number,and that appears to be it.

There was one device that allowed data to be streamed to it for decoding, so the audio could be stored on the 'mite SD, and piped over to the decoder (SPI I think). I looked up the chip and it does MP3, FLAC, WAV, WMA, OGG and I think a couple more. Available on a click board, and I will certainly be getting one of those to play with!

I can pretty easily get a file list from the local SD card, and I could even get really tricky and look inside the file for the tag...


An enhancement made by Peter to some of the more powerful 'mites a couple of years back allows FLAC and MP3 decoding, which is pretty awesome. However, I want to do some other processing on the 'mite (mostly graphics), and I was wondering if anyone had done a "CPU load" test on what MP3 decoding required? For example, running the processor at xxMHz and decoding MP3 effectively used yyMHz, leaving what is effectively a zzMHz processor for everything else.

Yes, I know it varies according to what is being decoded, so there is no absolute answer. However, it would be good to know if "it can only just play MP3 files" or "it can play MP3 files without raising a sweat!"

The "play/pause/stop" UART controlled devices are also available on click boards, and I might buy one to try, but I don't hold out much hope they are going to be of any use (to me - probably very useful for some).

Cheers,
Edited 2021-04-28 19:26 by MustardMan
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10603
Posted: 09:43am 28 Apr 2021
Copy link to clipboard 
Print this post

The main limitation on mp3 decoding isn't CPU but memory. Hence the ArmmiteF4 can't do it but the H7, MMX and CMM2 can. The MMX uses an external i2s DAC which will give the highest quality vs the 12-bit DACs on the H7 chip (although these are good enough except for real purists). You can test perfomrance by running a benchmark with and without playback. I use grainbench (search on this site) and on the CMM2 I get 12857 when playing an mp3 of Hotel California and 19371 without - i.e. it is using about 30% of the CPU.

FLAC is available on the F4 and uses slightly less CPU resource than mp3 - grainbench of 13243 on the CMM2
 
MustardMan

Senior Member

Joined: 30/08/2019
Location: Australia
Posts: 175
Posted: 09:00pm 28 Apr 2021
Copy link to clipboard 
Print this post

Thanks for that clarification (CPU vs memory).

In a previous life I played a lot with MP3s, but it was mostly evaluation of quality and not evaluation of decoding resources.

And thanks for the estimate on CPU loads.

Cheers,
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025