Projects

OrangePi Zero as wireless MusicPlayer

Introduction

Sadly there is no mainline Linux support for the wifi chip used in the OrangePi Zero. I fall back to the armbian Image and enabled the support for the extension board.

I'm using a default mpd config, with little adaptions for path and so on. Using software mixer_type in our alsa output enables mpd to change the volume using a client.

/etc/mpd.conf
  audio_output {
    type            "alsa"
    name            "ALSA Device"
    mixer_type      "software"      # optional
  }

As I didn't find any suitable lirc config for our Bose Music System, I recorded the codes myself.

/etc/lircd.conf
  begin remote

    name  /etc/lirc/lircd.conf
    bits           16
    flags SPACE_ENC|NO_HEAD_REP
    eps            30
    aeps          100

    header       1071  1441
    one           526  1444
    zero          526   459
    ptrail        526
    gap          98905
    toggle_bit_mask 0x0

      begin codes
          KEY_NEXT                 0x9867
          KEY_PREVIOUS             0x18E7
          KEY_RIGHT                0x1AE5
          KEY_LEFT                 0xEA15
          KEY_AUX                  0xF00F
          KEY_MODE                 0x847B
      end codes

  end remote

Now we are able to use the recorded 6 buttons to control our MusicPlayerDaemon on the OrangePi Zero.

/etc/lirc/lircrc
  begin
    button = KEY_NEXT
    prog = irexec
    config = mpc next
  end

  begin
    button = KEY_PREVIOUS
    prog = irexec
    config = mpc prev
  end

  begin
    button = KEY_RIGHT
    prog = irexec
    config = mpc seek +5
  end

  begin
    button = KEY_LEFT
    prog = irexec
    config = mpc seek -5
  end

  begin
    button = KEY_MODE
    prog = irexec
    config = mpc random
  end

  begin
    button = KEY_AUX
    prog = irexec
    config = mpc toggle
  end