Phat DAC down-mixed to mono audio

Hey guys,

I’m trying to use my Phat DAC in a mono speaker setup, as an airplay receiver.
I have the Airplay part working great with the Phat DAC, and it sounds great!

However, I’m having some problems getting the Phat DAC setup to down-mix to mono.

I found the following page online:
http://alsa.opensrc.org/Asoundrc#Downmix_stereo_to_mono

Which says to change /etc/asound.conf to the following:

pcm.!default makemono

pcm.makemono {
    type route
    slave.pcm "hw:0"
    ttable {
        0.0 1    # in-channel 0, out-channel 0, 100% volume
        1.0 1    # in-channel 1, out-channel 0, 100% volume
    }
}

However when I do this, I now don’t any audio at all. Is there something I’m missing? Or is the Phat DAC bypassing some of these settings somehow in it’s setup?

Any help would be appreciated!

What was the content of asound.conf originally? Did you append to or replace what was there (if anything).

I reckon that this post below might get you sorted out.

https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=33431

You might have to change the settings in the /etc/shairport-sync.conf accordingly.

I’ll try to give this a shot later today to see if it actually works. I need to get this working, as I’m working on a little mono Airplay speaker doodad myself!

Let us know how you get on.

Originally it included just:

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

Good spot! I completely didn’t even think that I was overwriting it!
I’m giving it a go now, appending to the original file.

Thanks for the link!

I had a look at this and the sub-linked page:
http://pi.eggum.net/2013/09/airplay-or-shairport-that-is.html

I first tried setting up my /etc/asound.conf with the following in it:

pcm.card0 {
  type hw
  card 0
}

ctl.card0 {
  type hw
  card 0
}

pcm.monocard {
  slave.pcm card0
  slave.channels 2
  type plug
}

ctl.monocard {
  type hw
  card 0
}

pcm.!default monocard

This will send audio via Shairport, but is still Stero (therefore, I’m only getting one channel from my setup.) Looking at the linked page, this is expected from this setup.

So then I tried the following configuration in /etc/asound.conf:

pcm.card0 {
  type hw
  card 0
}

ctl.card0 {
  type hw
  card 0
}

pcm.monocard {
  slave.pcm card0
  slave.channels 2
#  type plug
  type route
  ttable {
    # Copy both input channels to output channel 0 (Left).
    0.0 1
    1.0 1
    # Send nothing to output channel 1 (Right).
    0.1 0
    1.1 0
  }
}

ctl.monocard {
  type hw
  card 0
}

pcm.!default monocard

This doesn’t work. It shows that audio is going from the Airplay device to Shairport, and its playing, but I get nothing from the speaker/amp.

@sandyjmacdonald - what did you mean about changing settings within /etc/shairport-sync.conf ? That file on my system is blank!

I’ll continue to have a play and post here with my results!

@sandyjmacdonald - Arg! Please excuse my stupidity! You were talking about /etc/shairport-sync.conf because you are using Shairport-Sync of course! I’m using some other Shairport fork, that might be why I don’t have this! I’ll investigate how I can edit my ALSA settings in what I have setup.

Hi there. There’s a setting in the Shairport Sync configuration file to output mono on both channels.

Hey Mike, would you be able to advise me how to do that? That would be awesome if you can, and would solve my issues :D

Hi there. All you have to do is edit the settings file, which should be already installed at /etc/shairport-sync.conf. If you scroll down it a bit, you’ll see a playback_mode = "stereo"; setting. Change the "stereo" to "mono" and remember to remove the // at the start of the line to un-comment it. Restart shairport sync, and that should do it. [Update] If your configuration file does not already have that playback_mode setting in it, have a look in /etc/shairport-sync.conf.sample, which should have a full set of sample settings, all commented out.