Raspberry Pi Asked on February 16, 2021
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
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
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
Speaker-test outputs only on left channel correctly but not gmediarender.
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
Here is an example .asoundrc which will set the mixdown as the default device :
pcm.!default {
type plug
slave.pcm "monocard"
}
ctl.!default {
type hw
card 0
}
pcm.monocard {
type route
slave.pcm "hw:0"
slave.channels 2;
ttable {
0.0 0.5
1.0 0.5
0.1 0
1.1 0
}
}
ctl.monocard {
type hw;
card 0;
}
To see the available plugins you can use aplay -L (rather then aplay -l).
Answered by Matt on February 16, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP