-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
carrier wave kill, raw mode #23
base: master
Are you sure you want to change the base?
Conversation
Added switches to kill the carrier wave immediately or at exit. It just sets pin 4 to 1 and is probably needlessly complicated. Moved the argument info to a separate function.
Added "raw mode". Raw mode expects no header, 44100HZ bitrate, 2 channels and PCM 16 format.
👍 I'm totally going to build this one! |
because it's nice to have a _complete_ list of arguments... hehe.
Unfortunately this version too kill the onboard (pwm, jack) sound output. |
Yeah, that's because DMA0 which pifm uses is also used for analog sound.
|
Reloading the sound driver does't solve the problem. |
I'll look into it as soon as i have the time. I'm not familiar with the
|
Thanks, that sounds good. |
@peppi001 I have learned how the DMA works, but i'm not going to update the code to allow jack audio and radio at the same time. I've bought a realtek dbv-t stick and checked what PiFM does to the the spectrum using sdr#.... holy sh**. It creates strong interference on a 200MHZ wide band and has harmonics even further away than that. @ChristopheJacquet was not kidding about "don't connect any kind of wire". Sorry. |
@Hatagashira Thx. |
I can verify this works. Tested with lightshowpi streaming the decoded frames into PiFmRds as a subprocess and it all worked beautifully. |
./pifmrds now can read raw data from stdin use option -raw examples: sudo ./pifmrds -freq 102.0 -audio - < <(while true; do cat src/pifmrds/stereo_44100.wav; done) sudo ./pifmrds -raw -freq 102.0 -audio - < <(while true; do cat src/pifmrds/stereo_44100.wav; done) based on this pull request: ChristopheJacquet/PiFmRds#23
This patch adds arguments to kill the carrier wave on exit, or kill a carrier wave that's still active and clean up the dma after an unclean exit.
It also moves the argument info printing to a separate function and when the program is run without arguments just shows the argument info and exits.
The "raw mode" commits basically do what T4d3o's pull request does but also add a switch to make it optional, support named pipes and won't quit when the pipe blocks: It plays silence until new data arrives instead.