Audio stuttering and crashes at high bandwidth

cocolinofan
Posts: 6
Joined: Fri Mar 01, 2024 9:16 pm

Audio stuttering and crashes at high bandwidth

Post by cocolinofan »

Hello friends,

I am far from an radio expert so I will post here in case I am doing something wrong.
I am experiencing lag/stuttering and the occasional freeze especially at high sampling rates (the HackRF can go up to 20Mhz). I don't think there is a hardware issue as it is working just fine with other SDR software.
Here is a video I made showing exactly what I am experiencing:

Any help would be greatly appreciated 🙏
srcejon
Posts: 297
Joined: Thu Jan 19, 2023 2:30 pm
Location: London
Contact:

Re: Audio stuttering and crashes at high bandwidth

Post by srcejon »

Probably worth posting as an issue on Github.
cocolinofan
Posts: 6
Joined: Fri Mar 01, 2024 9:16 pm

Re: Audio stuttering and crashes at high bandwidth

Post by cocolinofan »

Thank you srcejon, will do.
Just wanted to make sure I am not doing something wrong.
srcejon
Posts: 297
Joined: Thu Jan 19, 2023 2:30 pm
Location: London
Contact:

Re: Audio stuttering and crashes at high bandwidth

Post by srcejon »

You could try hiding the spectrum view, to see if that makes a difference.
cocolinofan
Posts: 6
Joined: Fri Mar 01, 2024 9:16 pm

Re: Audio stuttering and crashes at high bandwidth

Post by cocolinofan »

Nope, no difference. Even with no demodulator running and FFT plot off, it is stuttering very hard above 5Mhz
srcejon
Posts: 297
Joined: Thu Jan 19, 2023 2:30 pm
Location: London
Contact:

Re: Audio stuttering and crashes at high bandwidth

Post by srcejon »

What do you mean with no demodulator? If there's no demod, how can you hear stuttering?
cocolinofan
Posts: 6
Joined: Fri Mar 01, 2024 9:16 pm

Re: Audio stuttering and crashes at high bandwidth

Post by cocolinofan »

In that example there was demodulation. But I can do an experiment:
1)Close FFT plot, no demodulation of any kind, increase the sample rate (from 1Mhz to 20Mhz) and watch the .log
=>All is good, above 15Mhz of bandwidth tho this messages start showing in log:

Code: Select all

2024-03-03 22:44:26.370 (C) SampleSinkFifo::write: (HackRF) overflow - dropping 131072 samples
2024-03-03 22:44:30.435 (C) SampleSinkFifo::write: (HackRF) 4 messages dropped
2)FFT plot ON, no demodulation of any kind, increase the sample rate (from 1Mhz to 20Mhz) and watch the .log
=>All is good, above 10Mhz of bandwidth tho this messages start showing in log:

Code: Select all

2024-03-03 22:48:33.615 (C) SampleSinkFifo::write: (HackRF) overflow - dropping 131072 samples
2024-03-03 22:48:36.197 (C) SampleSinkFifo::write: (HackRF) 14 messages dropped
2024-03-03 22:48:36.197 (C) SampleSinkFifo::write: (HackRF) overflow - dropping 131072 samples
2024-03-03 22:48:36.472 (C) SampleSinkFifo::write: (HackRF) overflow - dropping 131072 samples
3)FFT plot ON, WFM demodulation, increase the sample rate (from 1Mhz to 20Mhz) and watch the .log
=>All is good, above 7Mhz of bandwidth tho this messages start showing in log:

Code: Select all

2024-03-03 22:52:01.182 (C) SampleSinkFifo::write: (WFMDemod [0:0]) overflow - dropping 107520 samples
2024-03-03 22:52:03.988 (C) SampleSinkFifo::write: (WFMDemod [0:0]) 13 messages dropped
2024-03-03 22:52:03.988 (C) SampleSinkFifo::write: (WFMDemod [0:0]) overflow - dropping 107520 samples
4)FFT plot ON, three WFM demodulators, increase the sample rate (from 1Mhz to 20Mhz) and watch the .log
=>All is good, above 6Mhz of bandwidth tho this messages start showing in log:

Code: Select all

2024-03-03 22:55:19.220 (C) SampleSinkFifo::write: (HackRF) overflow - dropping 131072 samples
2024-03-03 22:55:32.908 (C) SampleSinkFifo::write: (WFMDemod [0:1]) overflow - dropping 92160 samples
2024-03-03 22:55:33.184 (C) SampleSinkFifo::write: (WFMDemod [0:0]) overflow - dropping 92160 samples
SDRangel settings for all:
Local Oscillator ppm correction - 0.0
DC Offset auto correction - ON
IQ imbalance auto correction - OFF
Bandpass Filter auto select - ON
Decimation factor - 1

The symptoms look like I am CPU limited but that can't be the case. I have an Intel i7-7700k. You can see in the video, even at 20Mhz bandwidth the CPU usage does not go above 50%. I have used the HackRF with other software at 20Mhz and I did not have problems.
srcejon
Posts: 297
Joined: Thu Jan 19, 2023 2:30 pm
Location: London
Contact:

Re: Audio stuttering and crashes at high bandwidth

Post by srcejon »

cocolinofan wrote: Sun Mar 03, 2024 11:07 pm The symptoms look like I am CPU limited but that can't be the case. I have an Intel i7-7700k. You can see in the video, even at 20Mhz bandwidth the CPU usage does not go above 50%.
Well, it looks like 1 core goes to 100%, so you could be core limited.

SDRangel is multithreaded, but perhaps the amount of decimation needed is too much for one core.

Can you please post your log file, so we can see the decimator chain that is used.
cocolinofan
Posts: 6
Joined: Fri Mar 01, 2024 9:16 pm

Re: Audio stuttering and crashes at high bandwidth

Post by cocolinofan »

My God man, why are you so kind? :')

Sure thing. Should I re-open the GitHub issue? Maybe for future reference, in case someone has the same problem?
Here is a video showing how I will make this log file:


Here is the log file:
sdrangel.log
(17.14 KiB) Downloaded 2 times
srcejon
Posts: 297
Joined: Thu Jan 19, 2023 2:30 pm
Location: London
Contact:

Re: Audio stuttering and crashes at high bandwidth

Post by srcejon »

Thanks - I've reopened the issue, as I've noticed a couple of things that should be looked at.

But essentially I think it is probably a case of too much processing for a single core.

Why does it work OK on other SDR s/w? Different algorithms, different filter lengths, different threading etc. We can possibly do better though.
Post Reply