OP25 slow choppy audio

Status
Not open for further replies.

kb0gus

Member
Joined
Jun 11, 2003
Messages
23
Hi there,
Running a RPI3+ and trying to install OP25. Everything seems to be working fine except for the audio is pretty bad.

Standard Raspbian Buster with Desktop.
Installed OP25 from these instructions - OP25 For Dummies – Or how to build a police scanner for $30 (Part 1) | John’s Tech Blog
after running the script - ./rx.py --args 'rtl' -N 'LNA:47' -S 2400000 -f 857.2625e6 -o 25000 -q -2 -T trunk.tsv -V -2 -U 2> stderr.2

I get this - New video by Josh Tuel

Thoughts? Thanks - Josh - N0EG
 

nick0909

Antenna flicker
Feed Provider
Joined
Jan 4, 2003
Messages
137
There is a ton of info already here on the forum about optimizing your OP25 startup command.
First off, try -S 960000 to save a lot of processing instead of 2400000. Also you probably don't need the -o option if you have a recently new sdr dongle.
 

kb0gus

Member
Joined
Jun 11, 2003
Messages
23
yea... sorry I looked through much of it... I should have said I've tried a ton of different sampling rates including the minimum.
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
903
Location
NE Wisconsin
And the -q 2 is probably excessive. Take nick0909's advise and adjust the sample rate, remove the -o 2500 and start with -q 0. Bring up the
mixer plot to determine the degree of frequency correction, if any, is needed and adjust accordingly. It would also be helpful to set logging verbose level to -v 5 then post your stderr.2 logfile after running op25 for a minute or two.
 

nick0909

Antenna flicker
Feed Provider
Joined
Jan 4, 2003
Messages
137
Your gain may be pretty high too, another thing to look at while checking the plots, no need to amp it up a ton, just enough to get a good bump in the active signal
 

kb0gus

Member
Joined
Jun 11, 2003
Messages
23
set sample to 960000, set the -q 0, removed -o, used the < and > to peak at zero (mixer balance under 100). Where should the gain result be? my peak is at about -15 db... clearing out the logs and setting them to verbose now. No change in audio as of yet. thanks for your help guys.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,316
Location
Talbot Co, MD
Usually you won't need LNA gain any higher than mid 30's.
Also, disable any plots when you are not tweaking tuning as they consume vast cpu resource on a RPI3 and make the audio intolerably choppy.
No plots and low sample rate should result in good audio.

Note: if you are having any challenges optimizing tuning you can try the new "-X" command line option and see if that helps at all.
 

kb0gus

Member
Joined
Jun 11, 2003
Messages
23
I went away for dinner last night and when I came back the audio was fantastic... rebooted and it went crappy again... the cpu utilization was only about 20%. I just installed it on a Pi4 and I can't get any audio via HDMI port on this one..... the install and tuning is easy... this audio crap is a a pain... I'm wondering if it's the RPI audio driver or something.

gr-osmosdr 0.1.4 (0.1.4) gnuradio 3.7.13.4
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy airspyhf soapy redpitaya freesrp
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
gain: name: LNA range: start 0 stop 0 step 0
setting gain LNA to 47
supported sample rates 250000-2560000 step 24000
RTL Gain of 47 set to: 48.0
[R82XX] PLL not locked!
Using two-stage decimator for speed=960000, decim=10/4 if1=96000 if2=24000
Project 25 IMBE Encoder/Decoder Fixed-Point implementation
Developed by Pavel Yazev E-mail: pyazev@gmail.com
Version 1.0 (c) Copyright 2009
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; see the file ``LICENSE'' for details.
op25_audio::eek:pen_socket(): enabled udp host(127.0.0.1), wireshark(23456), audio(23456)
p25_frame_assembler_impl: do_imbe[1], do_output[0], do_audio_output[1], do_phase2_tdma[1], do_nocrypt[0]
metadata update not enabled
audio device: default
Allocating 15 zero-copy buffers
1584741863.172088 do_metadata state=1: [None] None
1584741872.052747 set tgid=829, srcaddr=41196
1584741872.053292 new tgid: 829 Talkgroup ID 829 [0x33d] prio 3
1584741872.053819 new freq: 852.287500
1584741872.054131 voice update: tg(829), freq(852287500), slot(-), prio(3)
1584741872.054273 do_metadata state=0: [829] Talkgroup ID 829 [0x33d]
1584741872.181410 set tgid=829, srcaddr=41196
1584741872.184870 set tgid=829, srcaddr=41196
1584741872.318057 set tgid=829, srcaddr=0
1584741875.457475 duid15, tg(829)
1584741876.411744 set tgid=829, srcaddr=40540
1584741876.412285 new freq: 853.612500
1584741876.412459 hold active tg(829)
1584741876.412538 voice update: tg(829), freq(853612500), slot(-), prio(3)
1584741876.412625 do_metadata state=0: [829] Talkgroup ID 829 [0x33d]
1584741876.464465 set tgid=829, srcaddr=40540
1584741876.556813 set tgid=829, srcaddr=0
1584741879.435716 duid15, tg(829)
1584741881.197740 set tgid=829, srcaddr=41196
1584741881.198399 new freq: 853.175000
1584741881.198651 hold active tg(829)
1584741881.198752 voice update: tg(829), freq(853175000), slot(-), prio(3)
1584741881.198834 do_metadata state=0: [829] Talkgroup ID 829 [0x33d]
1584741881.340897 set tgid=829, srcaddr=41196
1584741881.468018 set tgid=829, srcaddr=0
Allocating 15 zero-copy buffers
1584741882.903046 voice timeout
1584741885.374618 do_metadata state=1: [None] None
1584741900.517285 set tgid=535, srcaddr=34187
1584741900.517384 new tgid: 535 Sheriff prio 3
1584741900.517491 voice update: tg(535), freq(852287500), slot(-), prio(3)
1584741900.517537 do_metadata state=0: [535] Sheriff
1584741900.666621 set tgid=535, srcaddr=34187
1584741900.785937 set tgid=535, srcaddr=34187
1584741900.804942 set tgid=535, srcaddr=0
1584741901.198725 PCM underrun
1584741903.517982 duid15, tg(535)
1584741904.472511 set tgid=535, srcaddr=34240
1584741904.472678 hold active tg(535)
1584741904.472730 voice update: tg(535), freq(853612500), slot(-), prio(3)
1584741904.472912 do_metadata state=0: [535] Sheriff
1584741904.606975 set tgid=535, srcaddr=34240
1584741904.626284 set tgid=535, srcaddr=34240
1584741904.760841 set tgid=535, srcaddr=0
1584741906.384226 duid15, tg(535)
1584741908.429985 do_metadata state=1: [None] None
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
903
Location
NE Wisconsin
It would really be helpful if you posted your configuration files. That said, I want to alert you to the fact that if you are expecting to obtain local audio from the earphone jack that you must use a 3.5 mm 4-pole plug or adapter. The reason being, is that there is an analog video signal present on the earphone jack in addition to the normal audio left, audio right, and signal ground. Plugging a standard 3.5 mm 3-pole plug into the earphone jack most often results in crossing that video signal with one of the audio channels resulting in all sorts of pulsing and buzzing noise.

I don't know that this is your issue, but wanted to point out this important note. I operate several RPi-3B's, 3B+'s and 4B's with no choppy audio problems. Note too that the Pi's detects the presence of an HDMI cable that should cause the audio output to override the 3.5 mm earphone jack. Leaving the incorrect plug in the earphone jack may also corrupt the HDMI audio to your monitor.

Gnerally, you wouldn't want to leave the HDMI monitor cable plugged into the Pi if your expectation is to use the local earphone jack.
 

kb0gus

Member
Joined
Jun 11, 2003
Messages
23
Yea, I went to the config, changed it to 3.5 and now everything works fine..... on both 3+ and 4... figures that its something simple like that.
sudo raspi-config
 

mancow

Member
Database Admin
Joined
Feb 19, 2003
Messages
6,879
Location
N.E. Kansas
This is the exact problem I have. I could only fix it by using a USB sound card.

What do you mean, changed it to 3.5? Changed what? Did you just disable the jack and only use hdmi?
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
903
Location
NE Wisconsin
Try this:

sudo raspi-config [Select 7. Advanced Options, then A4 Audio. Select 1 Force 3.5 mm ('headphone') jack] OK and Finnish.
Remove your HDMI monitor cable if still attached and restart. The 3.5 mm headphone jack should now be the default audio
source remembering that this is a 4-pole jack and requires a 4-pole plug or a 4-pole to 3-pole audio adapter.
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
903
Location
NE Wisconsin
Josh,

See post # 4 of OP25 and Icecast2 Private Server on how to setup a local icecast server as a way to isolate the audio problem you're having. If you get good auto from the icecast server, then it will only be a matter of fixing whatever issue exists with alsa or pulseaudio.

Bill
 
Status
Not open for further replies.
Top