Skip to content
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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

carrier wave kill, raw mode #23

wants to merge 8 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Feb 22, 2015

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.

Hatagashira added 5 commits February 22, 2015 10:51
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.
@ghost ghost changed the title carrier wave kill carrier wave kill, raw mode, named pipe input Feb 22, 2015
@ghost ghost changed the title carrier wave kill, raw mode, named pipe input carrier wave kill, raw mode Feb 22, 2015
@RamonSmit
Copy link

👍 I'm totally going to build this one!

because it's nice to have a _complete_ list of arguments... hehe.
@peppi001
Copy link

Unfortunately this version too kill the onboard (pwm, jack) sound output.
Only a reboot solve this problem :(

@ghost
Copy link
Author

ghost commented Feb 25, 2015

Yeah, that's because DMA0 which pifm uses is also used for analog sound.
Maybe re-loading the sound driver works, but sound wont work simultaneously
with pifm.
On 25 Feb 2015 21:09, "peppi001" [email protected] wrote:

Unfortunately this version too kill the onboard (pwm, jack) sound output.
Only a reboot solve this problem :(


Reply to this email directly or view it on GitHub
#23 (comment)
.

@peppi001
Copy link

Reloading the sound driver does't solve the problem.
I don't want use simultaneously, but always need to reboot the pi after i use pifm :(
And when i use the analog sound output after reboot and stop playing, and then want to use pifm it doesn't work :(

@ghost
Copy link
Author

ghost commented Feb 26, 2015

I'll look into it as soon as i have the time. I'm not familiar with the
inner workings of DMA, but i'd like to be :)
On 26 Feb 2015 08:08, "peppi001" [email protected] wrote:

Reloading the sound driver does't solve the problem.
I don't want use simultaneously, but always need to reboot the pi after i
use pifm :(
And when i use the analog sound output after reboot and stop playing, and
then want to use pifm it doesn't work :(


Reply to this email directly or view it on GitHub
#23 (comment)
.

@peppi001
Copy link

Thanks, that sounds good.

@ghost
Copy link
Author

ghost commented Mar 12, 2015

@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.

@peppi001
Copy link

@Hatagashira Thx.

@MattDietz
Copy link

I can verify this works. Tested with lightshowpi streaming the decoded frames into PiFmRds as a subprocess and it all worked beautifully.

F3lda added a commit to F3lda/rpitx-FM-AM that referenced this pull request Dec 4, 2023
./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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants