Been working on this project off and on.
I’m running Plexamp on a Raspberry Pi 3B+ along with an FM transmitter (application running inside the Raspberry Pi). I didn’t know how to redirect the plexamp output directly to the fm transmitter, so I cheated. I got a USB DAC, and plugged an AUX cord from the headphone jack to mic jack.
Perfect! Everything worked. Whole house covered… End of story… Or so I thought.
Come to find all mic jacks are mono. So it was cutting my stereo audio in half.
My current implementation of the FM transmitter:
arecord -fS16_LE -r 44100 -Dplughw:1,0 -c 2 - | sudo /opt/PiFmRds/src/pi_fm_rds -freq 87.5 -ppm 1000000 -audio -`
Question: Is there a way to redirect the Plexamp output to something that I can pickup with arecord? I’ve been looking into using the alsa-loopback, which I think will do what I need but I just started getting my feet wet in this area. I haven’t figured out how to configure the asound.conf to setup a slave interface that I can pipe to arecord.
Here’s what I thought I needed. obviously didn’t work. I’ve disabled everything but the USB DAC I have, to ensure plexamp is only going to one output.
asound.conf
pcm.!default {
type asym
playback.pcm { type plug; slave.pcm 'usbdac' }
capture.pcm { type hw; slave.pcm 'loopbackfm' }
}
pcm.loopbackfm {
type route
card 0
device 1
}
pcm.usbdac {
type route
card 1
device 0
}
Other info
arecord -l | grep card
card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
card 1: Device [USB Audio Device], device 0: USB Audio [USB Audio]
nich@watson:~ $ aplay -l | grep card
card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
card 1: Device [USB Audio Device], device 0: USB Audio [USB Audio]
card 2: vc4hdmi [vc4-hdmi], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
I’m also not apposed to using PulseAudio, but an equal novice with that.