lutusp/PLSDR

audio_alsa_sink error

Closed this issue · 7 comments

Linux 64bit

I can't get it to work. "A problem has come up while accessing the audio system: audio_alsa_sink"

Here is the output:

./PLSDR.py
QML debugging is enabled. Only use this in a safe environment.
linux; GNU C++ version 4.8.5; Boost_105400; UHD_003.008.005-0-unknown

gr-osmosdr v0.1.x-xxx-xunknown (0.1.5git) gnuradio 3.7.12.0
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy soapy redpitaya freesrp
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
[R82XX] PLL not locked!
len(audio_taps) = 231
INFO: Audio sink arch: alsa
ERROR: [plughw:0,0]: No such file or directory
<<

Linux 64bit

Which Linux distribution and version?

I can't get it to work. "A problem has come up while accessing the audio system: audio_alsa_sink"

Which entry in the "Audio Device" field? Also, typical Linux sound systems are very primitive and cannot manage more than one sound at once, so if you're running a Linux distribution that uses sound effects, try turning them off, see if this helps. I've seen this method work on my Ubuntu Mate distribution -- it speaks to the current primitive state of Linux sound.

Thanks for your feedback!

I see that it defaulted to 'plughw', I'm not sure why.

That's a way to improve audio responsiveness, as explained in the documentation (https://arachnoid.com/PLSDR/), but in the event of difficulty, try making no entry at all -- a blank field.

In the documentation (https://arachnoid.com/PLSDR/), I say, "The Audio Device entry may normally be left blank, but on some Linux systems an entry of "plughw:0,0" may (by bypassing a slow audio protocol) produce better results than the system default."

But as it happens, this entry might cause problems on some Linux distributions, in which case, leave it blank. My program's documentation (https://arachnoid.com/PLSDR/) is worth reading.

One more thing -- did I remember to suggest that you read the documentation (https://arachnoid.com/PLSDR/)?

Ok I'm reading.

Here I switched it to blank, and got a crash:

./PLSDR.py
QML debugging is enabled. Only use this in a safe environment.
linux; GNU C++ version 4.8.5; Boost_105400; UHD_003.008.005-0-unknown

gr-osmosdr v0.1.x-xxx-xunknown (0.1.5git) gnuradio 3.7.12.0
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy soapy redpitaya freesrp
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
[R82XX] PLL not locked!
len(audio_taps) = 231
INFO: Audio sink arch: alsa
ERROR: [plughw:0,0]: No such file or directory
rtlsdr_demod_write_reg failed with -9
r82xx_write: i2c wr failed=-9 reg=17 len=1
r82xx_set_freq: failed=-9
len(audio_taps) = 231
INFO: Audio sink arch: alsa
Traceback (most recent call last):
File "./PLSDR.py", line 545, in run_stop_event
self.run_stop()
File "./PLSDR.py", line 558, in run_stop
self.start_process()
File "./PLSDR.py", line 537, in start_process
self.radio.start()
File "/usr/lib64/python2.7/site-packages/gnuradio/gr/top_block.py", line 109, in start
top_block_start_unlocked(self._impl, max_noutput_items)
File "/usr/lib64/python2.7/site-packages/gnuradio/gr/runtime_swig.py", line 5654, in top_block_start_unlocked
return _runtime_swig.top_block_start_unlocked(r, max_noutput_items)
RuntimeError: list contains invalid format!
Aborted (core dumped)
<<

ERROR: [plughw:0,0]: No such file or directory

This message means the audio device field is not blank. Choose the "Configure" tab, extend it horizontally, reveal the entry, and delete it. And try running the program without the debug configuration, otherwise it has no chance to read its default configuration from your home directory.

my solution .:

.- >>> cd PLSDR

.- >>> sudo python PLSDR.py -O plughw:0,1

inside the program, go to the tab Configure.
and Audio Device , add

plughw:0,1

I hope it works for you
Captura de pantalla 2020-02-07 a las 16 19 25

my solution .:

.- >>> cd PLSDR

.- >>> sudo python PLSDR.py -O plughw:0,1

inside the program, go to the tab Configure.
and Audio Device , add

plughw:0,1

The second step should be all that is necessary. The point is to specify the output device, which my program provides an input for. The expression:

sudo python PLSDR.py -O plughw:0,1

Shouldn't be necessary, and it certainly shouldn't use "sudo" which will launch my program, Python and GNURadio with root authority. Bad idea.

If "sudo" appears to be required, instead make the user a member of the group that owns the resource being requested. That limits the exposure and risk.

I hope this helps.