lutusp / PLSDR

Software-defined radio application written in Python
GNU General Public License v3.0
156 stars 21 forks source link

audio_alsa_sink error #3

Closed ghost closed 4 years ago

ghost commented 6 years ago

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 <<

lutusp commented 6 years ago

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!

ghost commented 6 years ago

openSUSE 42.3 Hi I see that it defaulted to 'plughw', I'm not sure why. I dont have any usb audio unless it sees the rtlsdr dongle as audio? I tried 'default' but got the same error.

-------- Original message -------- From: lutusp notifications@github.com Date: 5/20/18 08:39 (GMT-09:00) To: lutusp/PLSDR PLSDR@noreply.github.com Cc: sloth1 s2@forceway.com, Author author@noreply.github.com Subject: Re: [lutusp/PLSDR] audio_alsa_sink error (#3)

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!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread. {"@context":"http://schema.org","@type":"EmailMessage","potentialAction":{"@type":"ViewAction","target":"https://github.com/lutusp/PLSDR/issues/3#issuecomment-390494812","url":"https://github.com/lutusp/PLSDR/issues/3#issuecomment-390494812","name":"View Issue"},"description":"View this Issue on GitHub","publisher":{"@type":"Organization","name":"GitHub","url":"https://github.com"}} {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/lutusp/PLSDR","title":"lutusp/PLSDR","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/lutusp/PLSDR"}},"updates":{"snippets":[{"icon":"PERSON","message":"@lutusp in #3: \u003e Linux 64bit\r\n\r\nWhich Linux distribution and version?\r\n\r\n\u003e\r\n\u003e I can't get it to work. \"A problem has come up while accessing the audio system: audio_alsa_sink\"\r\n\r\nWhich 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.\r\n\r\nThanks for your feedback! "}],"action":{"name":"View Issue","url":"https://github.com/lutusp/PLSDR/issues/3#issuecomment-390494812"}}} { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "37567f93-e2a7-4e2a-ad37-a9160fc62647", "title": "Re: [lutusp/PLSDR] audio_alsa_sink error (#3)", "sections": [ { "text": "", "activityTitle": "lutusp", "activityImage": "https://avatars0.githubusercontent.com/u/15413489?s=160\u0026v=4", "activitySubtitle": "@lutusp", "facts": [

] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"lutusp/PLSDR\",\n\"issueId\": 3,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"lutusp/PLSDR\",\n\"issueId\": 3\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/lutusp/PLSDR/issues/3#issuecomment-390494812" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 337116533\n}" } ], "themeColor": "26292E" }

lutusp commented 6 years ago

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/)?

ghost commented 6 years ago

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) <<

lutusp commented 6 years ago

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.

Ronda-00 commented 4 years ago

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
lutusp commented 4 years ago

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.