setup wifi

  • sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
network={  
    ssid="Your WiFi name"
    psk="Your WiFi password"
}
  • reboot Raspberry Pi sudo reboot

Install upmpdcli/mpd

  • nano /etc/apt/sources.list.d/mpd.list
  • insert
deb http://www.lesbonscomptes.com/upmpdcli/downloads/debian/ stretch main  
deb-src http://www.lesbonscomptes.com/upmpdcli/downloads/debian/ stretch main  
deb http://www.lesbonscomptes.com/upmpdcli/downloads/mpd-debian/ stretch main  
deb-src http://www.lesbonscomptes.com/upmpdcli/downloads/mpd-debian/ stretch main  
  • sudo apt-get update
  • sudo apt-get install upmpdcli mpd mpc
  • sudo systemctl enable mpd upmpdcli

Setup PHAT DAC

  • curl https://get.pimoroni.com/phatdac | bash

Enable Volume control

  • sudo nano /etc/asound.conf (if you have audio quality issues, remove this)
# the sound card
    pcm.real {
      type hw
      card 0
      device 0
    }

    #support  the ipc stuff is needed for permissions, etc.
    pcm.dmixer {
      type dmix
      ipc_key 1024
      ipc_perm 0666
      slave.pcm "real"
      slave {
        period_time 0
        period_size 1024
        buffer_size 8192
        rate 44100
      }
      bindings {
        0 0
        1 1
      }
    }

    ctl.dmixer {
      type hw
      card 0
      }

    # software volume
    pcm.softvol {
      type softvol
      slave.pcm "dmixer"
      control {
        name "Software"
        card 0
      }
    }
    # mpd volume control
    pcm.mpdvol {
      type softvol
      slave.pcm "dmixer"
      control {
        name "MPD"
        card 0
      }
    }
    # ctrl for mpd volume
    ctl.mpdvol {
      type hw
      card 0
    }

    # input
    pcm.input {
            type dsnoop
            ipc_key 3129398
            ipc_key_add_uid false
            ipc_perm 0660
            slave.pcm "810"
    }
    # duplex device
    pcm.duplex {
            type asym
            playback.pcm "softvol"
            capture.pcm "input"
    }

    # default devices
    pcm.!default {
      type plug
      slave.pcm "duplex"
    }

    # for oss devices
    pcm.dsp0 {
      type plug
      slave.pcm "duplex"
    }
  • sudo nano /etc/mpd.conf (if you have audio quality issues, remove this)
audio_output {  
        type                    "alsa"
        name                    "Sound Card"
        options                 "dev=dmixer"
        mixer_type              "software"
}
  • sudo systemctl restart mpd upmpdcli
  • sudo systemctl status mpd upmpdcli

Controlling

  • mpc status
  • mpc play
  • mpc stop
  • BubbleUPNP on Android

Setup Adafruit PiOLED OSD todo