Documentation

General

This documentation briefly covers the functionality and configuration of the mp3cd software. If you need more information please inspect the source code.

lcd_test

The lcd_test program will display a test message on the Matrix Orbital display and then start reading the keypad. Any keypress detected will be printed to the console.

This program is useful when you have made your keypad PCB for testing that it works and write down what function each key will do (useful if you need to modify the keyboard.c file).

lcd_echo

The lcd_echo program is used to echo text to the Matrix Orbital display during boot time (used in rc.boot). This makes the boot a little more informative and it looks cool when your CD-Player says "Booting Linux..." in the LCD :-)

This program accepts a quoted text string as an argument. You could also give -c as an argument for clearing the LCD (and initialize auto-linewrap/scrolling).

mp3stereo

This is only a script for starting the main program (playcom) from rc.local. This script will loop indefinitely and restart playcom if playcom is exited (done if you press stop at the media-selection menu).

playcom

Playcom is the main program for the mp3cd. This program assumes that your LCD is connected to /dev/ttyS0 and that your keypad layout is a described in the picture below (if you need to change tty device please edit mp3.h, if you have a different keypad layout change in keyboard.c).

keypad.gif (3936 bytes)

Selecting media

When playcom starts it reads the file media.cfg. This file can have 4 different playing sources all described in 4 lines. The first line is the text to be displayed on the menu for that entry, the second line is the mount command for the media (a dash assumes no mount), the third is the directory to play from and the last line is the unmount command for the media.

The different source medias are displayed when the player starts and you can select with "next/previous song" buttons. Pressing play selects the media.

Pressing the STOP button when the player is not playing a song will take you back to the media selection menu (you will have to go back to this menu to unmount the media).

If you press STOP while you are in the media selection menu playcom will exit and kill rxaudio (it should be restarted automatically by mp3stereo, but is useful to reset rxaudio).

Sample media.cfg

Harddisk
-
/mp3
-
CD-ROM
mount /cdrom
/cdrom
umount /cdrom
Network
smbmount //server/share /mnt -U user -P password
/mnt/mp3
smbumount /mnt

Playing songs

When the media has been selected the directory associated with that entry will be scanned (recursively) for files (could take a few second for a full CD). No sorting is currently done.

The files are inspected for mp3-tags, if found this will be used for Artist/Title. If no mp3-tag is found the name of the directory will be assumed to be the artist name and the filename is assumed to be the title.

Pressing PLAY will start playing the songs. When all songs have been played the mp3cd will stop.

STOP/PAUSE should be obvious.

When a song is playing you can use the "Fast Forward/Backward" buttons. You can also use the "Next/Previous" song buttons to skip to the next/previous song.

Program-mode

Pressing the program button will take you to program mode. In program mode you can browse to a song you want in the program with the "Next/Previous song" buttons. Press program when you have found a song to include in the program, browse to the next one and press program and so on. Press PLAY to start playing the songs in the program.

NOTE! Playcom does not remember the order of the songs in the program (a feature that will be added later).

To leave program mode press STOP to stop playing, and STOP again to clear the program.

Shuffle-mode

Pressing the shuffle button will start playing random songs. A song wont be played more than once until all songs have been played (when all songs have been played the random list will be cleared, and the player will start to randomize songs again). When the mp3cd is in random mode it will never stop automatically.

If you have selected songs in program mode only those songs will be played in random order.

Repeat

Pressing repeat will put the mp3cd in continuos play mode. Pressing it again will leave continuos mode (an indication will be shown in the LCD).

Display

The display button can be used to change the display-mode. Currently only 3 modes are implemented. The default mode is to show the elapsed/total time for the current song, the second mode will show a bar indicating how much time has elapsed. The third mode will turn off the backlight of the LCD-display.