Quantcast
Channel: Linux Device Hacking
Viewing all articles
Browse latest Browse all 3247

Marantz receiver Airplay with power and volume control (2 replies)

$
0
0
Thank you for providing a Debian distribution for so many devices. I used a Dockstar to bridge a Marantz receiver onto the network with full power and volume control.

It requires a USB sound device that is supported by ALSA, a USB serial adapter and a Marantz receiver that has a serial port (but not an ethernet otherwise I think it already has Airplay built in to the network interface. I'm using a Marantz SR5003.

Get your sound card working under alsa and make sure that aplay can output sound by default. I had to adjust my asound.conf. This will vary based on what USB sound device you use.

defaults.pcm.card 0
defaults.ctl.card 0

pcm.!default {
  type hw
  card 0
  device 0
}

You will need to install alsa-utils libasound2-plugins shairport-sync alsa-ucm-conf python3-serial.

Add user shairport-sync to the dialout group so it can access the USB serial device.

adduser shairport-sync dialout

In shairport-sync.conf there are a few options to adjust. I set wait_for_completion = "yes" so that power and volume commands would not overlap. Then set run_this_when_volume_is_set to the attached python script volume_is_set.py, same for run_this_after_exiting_active_state and run_this_before_entering_active_state. Note that the scripts will log to /tmp/event.log as they are now, comment out the log related statements if desired. Also set ignore_volume_control = "yes" and then run alsamixer and set to 0db so that the sound card outputs full volume and shairport-sync will not adjust the alsa volume, the volume will be set by the serial commands to the Marantz receiver.

I did make a decision to limit the volume range on the Marantz from -71dB to 0dB. It goes higher, 14dB I thought 0db was enough in case something went wrong.

This should be adaptable to any receiver that has a serial port.

Viewing all articles
Browse latest Browse all 3247

Trending Articles