arjunm009
Posts: 19
Joined: Wed Nov 09, 2016 7:30 pm

configure gmediarender to output only mono

Mon May 01, 2017 9:03 pm

I have configured gmediarender on the RPi 3. However I prefer only mono output.

Following this guide to downmix to mono did not output mono from the gmediarender.

/etc/asound.conf

Code: Select all

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
aplay -l

Code: Select all

pi@raspberrypi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Set [C-Media USB Headphone Set], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 1: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
I suspect it may because of the init script for gmediarender

Please note

Speaker-test outputs only on left channel correctly but not gmediarender.

Code: Select all

pi@raspberrypi:~ $ speaker-test -t sine -f 440 -c 2

speaker-test 1.0.28

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Sine wave rate is 440.0000Hz
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 96 to 262144
Period size range from 48 to 131072
Using max buffer size 262144
Periods = 4
was set period_size = 65536
was set buffer_size = 262144
 0 - Front Left
 1 - Front Left
Time per period = 5.636675
 0 - Front Left
 1 - Front Left
Time per period = 5.679920
 0 - Front Left
 1 - Front Left
Time per period = 5.629858
 0 - Front Left
 1 - Front Left
Time per period = 5.649981
 0 - Front Left
 1 - Front Left
^CTime per period = 4.528995

Return to “Advanced users”