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

Station dies after about an hour #84

Open
cjuniorfox opened this issue Aug 19, 2021 · 3 comments
Open

Station dies after about an hour #84

cjuniorfox opened this issue Aug 19, 2021 · 3 comments

Comments

@cjuniorfox
Copy link

I'm piping from arecord using snd_aloop device.
The oscillation just dies after about one hour or two.
The pi_fm_adv does not report any issue. The process keeps running like there's nothing wrong happened.

May be related with #40 but I really don't know.

I'm running raspibian jessy on Raspberry Pi 3B

Command follows

arecord -fS16_LE -r 44100 -Dplughw:0,0 -c 2 - --quiet | pi_fm_adv --wait 0 --freq 91.5 --audio - --ctl /tmp/rds_ctl --mpx 40 --preemph us

@rashrf
Copy link

rashrf commented Aug 21, 2021

Hi,

I can't quite believe that I am about to offer the same explanation (and solution) I offered to someone else on Github today, for a completely different project which also uses arecord. :-D

The problem is almost certainly arecord rolling the output every 2GB - a 32-bit limitation. I ran into a similar problem about eight years ago when using arecord to open an ALSA input device and pipe to another tool.

The workaround I found was to use ecasound to open the ALSA device instead and the problem went away.

Hope this works for you.

R

@cjuniorfox
Copy link
Author

Thank you for your response.
I installed ecasound and I successfully able to capture my alsa device to one wav file, but how do I write ecasound to stdout to pipe pi_fm_adv just like I do with arecord?

@cjuniorfox
Copy link
Author

I believe the problem does not rely on aplay's buffer
I tested several ways to feed the pifmadv. I tried pipping ffmpeg to stdin, with wav files, using named fifos. All with no success.

Additionaly, I tested the fm_transmitter (mono, 22050hz) with no problems at all.
Unfortunely, with PiFmAdv, the oscillation is hardly sustained for more than some couple hours.

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

No branches or pull requests

2 participants