A CD player built from the Raspberry Pi 3, Pi Display and Apple SuperDrive.
Once assembled...
emerge -av libcdio-paranoia portaudio gtkmm glibmm curlpp jsoncpp sg3_utils bluez-alsa weston
git clone https://github.com/nirjacobson/libbluez.git
git clone https://github.com/nirjacobson/libdiscdb.git
git clone https://github.com/nirjacobson/Discman.git
cd libbluez
make
make install
cd libdiscdb
make
make install
cd Discman
make
make install
~/.asoundrc
:
defaults.bluealsa.service "org.bluealsa"
defaults.bluealsa.device "00:00:00:00:00:00"
defaults.bluealsa.profile "a2dp"
defaults.bluealsa.delay 10000
pcm.!default {
type plug
slave.pcm "bluealsa"
}
/etc/polkit-1/rules.d/10-poweroff.rules
:
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.login1.power-off" &&
subject.user == "<your username>") {
return polkit.Result.YES;
}
});
/etc/udev/rules.d/99-local.rules
:
# Initialise Apple SuperDrive
ACTION=="add", ATTRS{idProduct}=="1500", ATTRS{idVendor}=="05ac", DRIVERS=="usb", RUN+="/usr/bin/sg_raw /dev/$kernel EA 00 00 00 00 00 01"
# systemctl edit getty@tty1.service
[Service]
Type=simple
ExecStart=
ExecStart=-/sbin/agetty --autologin <your username> --noclear %I 38400 linux
~/.bash_profile
:
...
if tty | grep -q 'tty1'; then
weston --shell=kiosk-shell.so &
export WAYLAND_DISPLAY=wayland-1
sleep 3
discman&
fi