Install required software:
apt-get install alsa-oss libsamplerate0 mpg321 rng-tools

Enable hardware random number generator to allow for proper random selection of tracks.

Edit /etc/default/rng-tools, and remove the # at the start of the line:


Finding label of SD card:

blkid /dev/sda1
/dev/sda1: LABEL="TOSHIBA" UUID="6B86-7EA0" TYPE="vfat" PARTUUID="2fb65af4-01"

Mounted drives:

more /etc/fstab
proc            /proc           proc    defaults          0       0
/dev/mmcblk0p6  /boot           vfat    defaults          0       2
/dev/mmcblk0p7  /               ext4    defaults,noatime  0       1
UUID=6B86-7EA0 /mnt/usb auto ro,nosuid,nodev,nofail 0 0

Soundcards detected:

more /proc/asound/cards 
 0 [ALSA           ]: bcm2835 - bcm2835 ALSA
                      bcm2835 ALSA
 1 [Set            ]: USB-Audio - C-Media USB Headphone Set
                      C-Media USB Headphone Set at usb-20980000.usb-1.3, full speed

Local boot script:

more /etc/rc.local 
#!/bin/sh -e
# rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# bits.
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"

/home/pi/car-mp3-player/ /mnt/usb/mp3s

exit 0

The source of the script is located at:

Photo of hardware:

Car PC hardware