boatbod / op25

Fork of osmocom OP25 by boatbod
311 stars 97 forks source link

Audio not working #165

Closed invader-zimm closed 1 year ago

invader-zimm commented 1 year ago

Hi. I'm trying to use op25 on Artix Linux, with Python 3.10 and gnuradio 3.10. I was able to compile this fork and rx.py runs without errors, it seems to decode fine but there is no audio.

This is how I'm launching rx.py: ./rx.py --nocrypt --args 'rtl=0' --gains 'lna:36' -S 1920000 -q 0 -d 0 -v 2 -2 --tdma-cc -V -U -T file.tsv 2> stderr.2

And this is what the log says:

Using Python /usr/bin/python
gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.10.4.0
built-in source types: file rtl rtl_tcp uhd hackrf bladerf rfspace airspy soapy redpitaya
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T/2 tuner
gain: name: LNA range: start 0 stop 49 step 0
setting gain lna to 36
supported sample rates 250000-2560000 step 24000
Using two-stage decimator for speed=1920000, decim=20/4 if1=96000 if2=24000
op25_audio::open_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]
/home/zimm/Downloads/github/sdr/op25/op25/gr-op25_repeater/apps/./rx.py:978: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead
  self.setDaemon(1)
metadata update not enabled
using ALSA sound system
audio device: default
failed to open audio device: default
Listening on 127.0.0.1:23456
audio closing
python version detected: 3.10.8 (main, Nov  1 2022, 17:01:49) [GCC 12.2.0]
Allocating 15 zero-copy buffers
12/17/22 11:24:01.323744 voice update:  tg(63262), freq(857587500), slot(-), prio(3)
12/17/22 11:24:02.692196 duid15, tg(63262)
12/17/22 11:24:03.107245 hold active tg(63262)
12/17/22 11:24:03.438175 hold active tg(63262)
12/17/22 11:24:03.716335 hold active tg(63262)
12/17/22 11:24:03.995838 hold active tg(63262)
12/17/22 11:24:04.061999 hold active tg(63262)
12/17/22 11:24:04.126614 hold active tg(63262)
12/17/22 11:24:04.327081 hold active tg(63262)
12/17/22 11:24:04.605392 hold active tg(63262)
12/17/22 11:24:04.938882 voice update:  tg(63342), freq(860512500), slot(-), prio(3)
12/17/22 11:24:07.809131 duid15, tg(63342)
12/17/22 11:24:08.221296 hold active tg(63342)
12/17/22 11:24:08.499165 hold active tg(63342)
12/17/22 11:24:08.696011 hold active tg(63342)
12/17/22 11:24:08.696315 voice update:  tg(63342), freq(862612500), slot(-), prio(3)

I noticed there's the -O flag but I was not able to get the audio to work... Is there a way to force it to use pulse audio instead of ALSA, maybe that would work better?

invader-zimm commented 1 year ago

After some digging, it looks like all I had to do is install the pulseaudio-alsa package. After doing that, everything works fine now. Sorry for the noise.