Author Topic: Mpd and Torrent server using cubian  (Read 2934 times)

orlonth

  • Guest
Mpd and Torrent server using cubian
« on: March 11, 2014, 04:58:15 pm »
Hi,

Over the last days I set up my cubieboard2 as a headless torrent downloader (deluge) and mpd server (hdmi audio to av receiver) using cubian. In the process I had some minor difficulties. I'll describe them here so others won't have to experience them first hand.


Move / to external sata disk
Using this guide: http://www.raspberrypi.org/forum/viewtopic.php?f=29&t=44177

Difficulty: Don't forget to add the new root partition to the /boot/uEnv.txt to complete to process!

my uEnv.txt:
Quote
console=tty0
root=/dev/sda2 rootwait
extraargs=console=ttyS0,115200 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1280x800p60 panic=10 consoleblank=0

Install deluge and configure it for remote
Using this guide: http://www.howtogeek.com/142044/how-to-turn-a-raspberry-pi-into-an-always-on-bittorrent-box/

Difficulty: none

Install and configure mpd for hdmi output
apt-get install mpd

more info: https://wiki.archlinux.org/index.php/Music_Player_Daemon

Difficulty: enable hdmi audio.
To do this, you need to tell mpd to use the second sound card (hdmi).

My audio output:
Quote
audio_output {
        type            "alsa"
        name            "My ALSA Device"
        device          "hw:1,0"        # optional
        format          "44100:16:2"    # optional
#       mixer_device    "default"       # optional
#       mixer_control   "PCM"           # optional
#       mixer_index     "0"             # optional
}
Thus "hw:1,0" in place of "hw:0,0"

Enable hdmi output on boot
As most of the time my tv is powered off when using mpd on my receiver, I need hdmi to be enabled on every boot.

To do this we create the following boot script:
nano /etc/init.d/enable-hdmi-always
Quote
#!/bin/bash

### BEGIN INIT INFO
# Provides:          scriptname
# Required-Start:    $all
# Required-Stop:     $all
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start daemon at boot time
# Description:       Enable service provided by daemon.
### END INIT INFO
echo D:1920x1080p-60 > /sys/class/graphics/fb0/mode
chmod 755 /etc/init.d/enable-hdmi-always
chmod +x /etc/init.d/enable-hdmi-always

And enable the script:
update-rc.d enable-hdmi-always defaults


After these steps it runs far more stable than my raspberry pi ever did  8)
« Last Edit: March 11, 2014, 05:00:50 pm by orlonth »