About two years ago I started to build a music player. I had an old notebook and a friend gave me his old CD player. The plan was to get the important parts of the notebook into the chassis of the CD player. This was done about two years ago and since then it stayed half-finished. Last week I finally had enough motivation (and the other notebook acting as our music player using mpd was actually being really used again) so that the project is now finally finished. Before I started it looked something like this:
On the left side the board is mounted on two pieces of wood. I had to cut new holes on the backside for all the connectors. Although it is booted over network and running from NFS it needs a hard-disk, because the BIOS needs 15 seconds longer if there is no hard-drive. As I wanted a fast boot I had to connect something to it and that is why I bought a 256MB flash drive with a 44-pin IDE connector.
All the cables which can be seen on the right side are from my idea to use the original buttons of the CD player chassis. The cables are connected to the keyboard controller and they are a very good example that I am more a software than a hardware guy. The plan was that certain combinations of the cables generate certain keyboard events (characters). That worked perfectly and I tried out many combinations and found enough keyboard events to connect all the cables to buttons of the CD player chassis. The problems started when I soldered all the cables to the board with the buttons. After I had soldered all cables to the board behind the buttons I powered it on again and it was generating lots of keyboard events even if I was not pressing any button, probably because I did not think about it that all cables which were connected to ground pins were now all connected together. So it was a bad idea and everything I did was pretty much useless. So I removed everything again and connected it again, but this time I tested the result after every button.
The most important button was the power on button, which works. I have now only four working buttons which is far from what I wanted but better than no possibility to control anything directly at the chassis.
To use the characters coming from the buttons I took mingetty, removed most of the code and modified it to read just one character (readfromtty1.c) and return that immediately to a shell script wrapped around. So if I now press the REPEAT button I get a message in the syslog saying “REPEAT pressed“.
I also had to cut two more holes into the CD player chassis on the left side for the CPU fan and for the audio connectors.
That was the only change to finally use it. If I now press the STANDBY/ON button, about 20 seconds later it starts playing music. I am using mpd so that I can control it from anywhere and pressing the same button again shuts the system down in about 5 seconds. Without much work I could get it probably to boot faster but right now I am using an only slightly modified Fedora 11 with a custom kernel so that I probably leave it the way it is now.
In addition to the buttons and all the available mpd clients I can also control the music player using my phone. I have extended my phone2jabber script to not only send jabber notifications when somebody calls but also to play the next song when one of my unused MSNs is called.






