Quantcast
Channel: Support - Pimoroni Buccaneers
Viewing all articles
Browse latest Browse all 6933

pHAT DAC - mixing stereo to mono (mpd/alsa)?

$
0
0

@SubG wrote:

Hi,

I’ve seen this other topic, but that didn’t seem to work for me.

Set-up:

  • Raspberry Pi Zero W (Jessie 4.9)
  • pHAT DAC (Pimoroni standard install)

I’m just streaming a single internet radio channel using mpd (and mpc directly in the command line) and that works fine for stereo. However I’m going to build this into an old radio with a single speaker, so I’d like to mix the stereo to mono. And I’d prefer to do it in software rather than hardware, just to be elegant… :)

I tried changing /etc/asound.conf to the following (as described in this post):

pcm.card0 {
  type hw
  card 0
}

ctl.card0 {
  type hw
  card 0
}

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

ctl.monocard {
  type hw
  card 0
}

pcm.!default monocard
ctl.!default monocard

But after a reboot I get no audio at all and the mpc and mpc stop commands are met with "ERROR: Failed to open audio output".

The only /etc/asound.conf that produces audio for me is the Pimoroni pHAT DAC standard one of…

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

…which doesn’t do any stereo->mono mixing.

Any ideas?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6933

Trending Articles