sexta-feira, 18 de janeiro de 2013

Playing some mp3!

Remember my old mp3decoder board? Well, I decided to pick it up and plug it to the Alcetronics M68K board.
The result is a cool and huge and non-practical mp3 player!

Checkout the video where I show how it works!




The driver is a simple char device where the mp3 file gets dumped.
The mp3decoder board is fed by a SPI at the fpga.


How did it:

The Linux driver allocates a buffer that will act as a FIFO. It gets filled whenever data is sent to the char device and get empty when the decoder chip requests data.

My first implementation was a failure... The interrupt routine was taking too long to dump the data and the FIFO was getting empty, that caused music to stop until it was again filled.

To solve this I had to do several tweaks to the interrupt routine, codding some assembly and also optimized the SD card driver to read data faster.

The result was a 68000 running the latest Linux kernel and playing mp3 files from an SD card! (tested with mp3 bitrates up to 320kbit/s)

I know... not a big deal nowadays, but for a CPU with almost 34 (maybe older than you?) it really is impressive.



Whenever I get some time, I plan to connect a simple USB host chip and then... try USB devices!