I'm trying to stream the sound from a Raspberry Pi of an SPH0645 microphone in FM with the PiFmRds library.
Here's what I've tried:
After the installation of the microphone, here's what I have:
arecord -l
Output
**** List of CAPTURE Hardware Devices ****
card 1: sndrpii2scard [snd_rpi_i2s_card], device 0: simple-card_codec_link snd-soc-dummy-dai-0 [simple-card_codec_link snd-soc-dummy-dai-0]
Then I can record normally without any problems with this command:
arecord -D plughw:0 -c1 -r 48000 -f S32_LE -t wav -V mono -v file.wav
I can stream the file:
sox -t mp3 /home/thib/file.wav -t wav - | sudo /home/thib/PiFmRds/src/pi_fm_rds -audio -
But here is my problem: I would like stream the direct output of my microphone. For that I've tried:
sudo arecord -D plughw:1 -c1 -r 48000 -f S32_LE -t wav | sudo ./pi_fm_rds -audio -
After that, I've tried to use the loopback function, but I don't have any sound in my receptor.
sudo modprobe snd-aloop
Output:
arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: sndrpii2scard [snd_rpi_i2s_card], device 0: simple-card_codec_link snd-soc-dummy-dai-0 [simple-card_codec_link snd-soc-dummy-dai-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 3: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
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 3: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
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
sudo arecord -D plughw:3 -c1 -r 48000 -f S32_LE -t wav | sudo /home/thib/PiFmRds/src/pi_fm_rds
I've also tried to use a program like pure data but nothing change... How can I fix itg?