miegl / PiFmAdv

Advanced Raspberry Pi FM transmitter with RDS encoding
GNU General Public License v3.0
484 stars 82 forks source link

PiFmAdv exits after "Outputting signal on GPIO 4." #108

Open ABelliqueux opened 8 months ago

ABelliqueux commented 8 months ago

Running on a rpi 3b, running Debian 12 Wormbook, Linux 6.1.0-rpi7-rpi-v8 aarch64.

I've added gpu_mem=250 to /boot/config.txt.

I built successfully but when trying to run, the program instantly exits 'cleanly' after Outputting signal on GPIO 4, no matter what arguments I use :

pi@raspberrypi:~/PiFmAdv/src $ sudo ./pi_fm_adv
Carrier: 87.60 Mhz, VCO: 1138.8 MHz, Multiplier: 59.312500, Divider: 13
Allocating physical memory: size = 4354048, mem_ref = 9, bus_addr = fe6df000, virt_addr = 0x7f8a929000
Master PLLC Locked
Outputting signal on GPIO 4.
Terminating: cleanly deactivated the DMA engine and killed the carrier.
pi@raspberrypi:~/PiFmAdv/src $ sudo ./pi_fm_adv --audio /home/pi/.mpd/audio.fifo --freq 88.0
Carrier: 88.00 Mhz, VCO: 1144.0 MHz, Multiplier: 59.583333, Divider: 13
Allocating physical memory: size = 4354048, mem_ref = 9, bus_addr = fe6df000, virt_addr = 0x7f7fa49000
Master PLLC Locked
Outputting signal on GPIO 4.
Terminating: cleanly deactivated the DMA engine and killed the carrier.

After running either of these commands, with a radio tuned to the right freq, it makes the white noise go away, until I reboot the rpi.

I can play and hear the sound file fine with aplay via the jack output. I've checked for modules that use the GPIO, but found none.

Is there something else I should be trying ? How can I get a more verbose output ? Any idea ?

joevin-slq commented 7 months ago

@ABelliqueux : I've got the same error, but after a reboot it launches without any error:

pi@raspberrypi:~/PiFmAdv/src $ sudo ./pi_fm_adv --audio sound.wav --freq 103.3 
Carrier: 103.30 Mhz, VCO: 826.4 MHz, Multiplier: 15.303704, Divider: 4
Allocating physical memory: size = 4354048, ioctl_set_msg failed:-1
mem_ref = 4354048, bus_addr = 3, virt_addr = 0x7f985d8003
Master PLLC Locked
Outputting signal on GPIO 4.

It emits on the default freq but without any sound and the rpi 4b crashes.

Edit: I finally succeeded with either https://github.com/ChristopheJacquet/PiFmRds and https://github.com/markondej/fm_transmitter on a low frequency (<92MHz).