fm_transmitter icon indicating copy to clipboard operation
fm_transmitter copied to clipboard

Stereo support

Open ghost opened this issue 9 years ago • 8 comments

Can you make this support stereo? or fix https://github.com/ChristopheJacquet/PiFmRds to make it work on Pi 2?

ghost avatar Jun 19 '15 09:06 ghost

DMA controller was changed in RPI2, so old solutions based on pifm project won't work.

I will add stereo support in fm_transmitter soon.

markondej avatar Jun 19 '15 14:06 markondej

Ok, thank you, I don't know how but I made some change in address by this commit: https://github.com/SandPox/PiFmRds/commit/fa11d6cc122c7d86145408e12606260a43fde152 sometime it work, sometime not but when it work then it less interferes than your code but the chance it work are small (~20 times try I got 1 working, the else are fail to reverse address 0 or some random address), not sure how those code working

ghost avatar Jun 19 '15 14:06 ghost

Does it work first time after reset of CPU? Maybe its matter of resetting DMA, PWM or GPIO settings. I don't have RPi to test it right now.

Must say, I'm suprised it works at all ;)

markondej avatar Jun 19 '15 14:06 markondej

sometime work sometime not BUT: it still does transmit silent after exit with error "fail to reverse address..", after use your code then the silent signal gone. img_0288

ghost avatar Jun 19 '15 14:06 ghost

It's because my code switches pin 4 (antena output) back to GPIO operating mode, so no more radio waves are emited. Nothing really important.

In the PiFmRds, part of code which generates errors such as yours is commented with "FIXME" disclaimer. I believe its known error.

What version of raspian are you using?

markondej avatar Jun 26 '15 17:06 markondej

I'm using rapbian jessie (net-installer) with kernel 4.0.4, was tested with 3.8.x, same results

ghost avatar Jun 26 '15 17:06 ghost

I've got PiFmRds compiled using your repo https://github.com/SandPox/PiFmRds. On my older raspbian (3.18.7) it works pretty well. It doesn't crash so often but problem is sound quality. Sound was fabulous when I first tried PiFm (by Oliver Mattos and Oskar Weigl) on my RPi 1. With fm_transmitter sound quality is poor as there is no DMA support, and samples transfer isn't so fluent.

But PiFmRds is even worse - a lot of cracks. Don't know where it comes from.

markondej avatar Jun 29 '15 10:06 markondej

I don't know but on my side, that repo have better sound quality when it's working than your fm_transmitter, less interferes and sound more clear... but I need attempt to run about 50 times then I got 1 times work properly

ghost avatar Jun 29 '15 10:06 ghost