Choppy Audio op25 on Ubuntu 16.04

Status
Not open for further replies.

ansul1001

#1 Member
Joined
Jun 9, 2010
Messages
184
Location
Hesperia California
I got op25 up and running on Ubuntu 16.04 and listening to p25 phase 2 the only problem i am having is the audio is breaking up really bad is there a driver problem or maybe just a code i can run to fix this problem anyone else have this issue.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
So many possibilities...
Are you running from my github repo or the max branch? Are you running in a virtual machine or is ubuntu the host os? Are you using sockaudio (built in player) or nc | aplay? Is Pulse Audio running or disabled?

Once I fully understand your hardware setup I'll offer some guidance.
 

ansul1001

#1 Member
Joined
Jun 9, 2010
Messages
184
Location
Hesperia California
1. I am running ubuntu 16.04 on a laptop as the main operating system not on virtual
2. I installed the version from the main op25 page install instructions.
3. as for the sock audio or built in aplay I am new to the hole Ubuntu thing so i don't really no how to tell which one that i am using.
4. when i run the command line and check the log file it says default device
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
1. I am running ubuntu 16.04 on a laptop as the main operating system not on virtual
2. I installed the version from the main op25 page install instructions.
3. as for the sock audio or built in aplay I am new to the hole Ubuntu thing so i don't really no how to tell which one that i am using.
4. when i run the command line and check the log file it says default device

Thanks, I've got a pretty good idea that you are on the Max branch (running rx.py based on earlier discussions) and the presence of the "audio device: default" string in the log says the audio player is sockaudio.py.

The reason for your audio choppiness is that ALSA buffer handling in that version of sockaudio.py is considerably less than optimal. It was an early version of the code which has since evolved considerably. Unfortunately the new version has not yet been pushed to osmocom's repository.

Conceivably you could replace just sockaudio.py with the latest version (from here), or you could clone and check out my version of OP25 from github. (git clone https://github.com/boatbod/op25.git). The latter will give the best results, but the former should be a big improvement on it's own.
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
Yep that was it downloaded your sockaudio.py and that took care of the choppy audio running good on 16.04

Thanks for the update. It's good to know that it was an easy fix.
The buffer handling in ALSA is rather convoluted and it took me a few iterations to figure out what would adapt itself to most systems and smooth out most of the chop.
 

ansul1001

#1 Member
Joined
Jun 9, 2010
Messages
184
Location
Hesperia California
I went to the op25 web site and followed the install instructions below

sudo apt-get update
sudo apt-get build-dep gnuradio
sudo apt-get install gnuradio gnuradio-dev gr-osmosdr librtlsdr-dev libuhd-dev libhackrf-dev libitpp-dev libpcap-dev git

cd ~
git clone https://git.osmocom.org/op25
cd op25
git checkout max
git pull
mkdir build
cd build
cmake ../
make
sudo make install
sudo ldconfig


And then i used boatbods sockaudio.py file
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
I went to the op25 web site and followed the install instructions below

sudo apt-get update
sudo apt-get build-dep gnuradio
sudo apt-get install gnuradio gnuradio-dev gr-osmosdr librtlsdr-dev libuhd-dev libhackrf-dev libitpp-dev libpcap-dev git

cd ~
git clone https://git.osmocom.org/op25
cd op25
git checkout max
git pull
mkdir build
cd build
cmake ../
make
sudo make install
sudo ldconfig


And then i used boatbods sockaudio.py file

Or you can "git clone https://github.com/boatbod/op25.git", which is a fork of the Max branch plus my changes which are in the process of being integrated back into the osmocom repo.
 

Hmaxim

Member
Joined
Feb 9, 2007
Messages
41
Will these instructions work with a Pi 3? I just got one and should be able to give it a go in a day or so. Thanks
 

Hmaxim

Member
Joined
Feb 9, 2007
Messages
41
Well, I am going ahead anyway..I used the instructions boatbod posted..I get an error msg at "git checkout max" .. error: pathspec max did not match any file(s) know to git.
Should I continue?
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
Well, I am going ahead anyway..I used the instructions boatbod posted..I get an error msg at "git checkout max" .. error: pathspec max did not match any file(s) know to git.
Should I continue?
If you cloned from my github repo there is no branch called max. Just "git clone" will suffice.
 
Status
Not open for further replies.
Top