discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: audio sink RuntimeError: audio_oss_sink


From: aardric
Subject: Re: audio sink RuntimeError: audio_oss_sink
Date: Sat, 15 Aug 2020 02:53:02 +0000

Wow. I didn't expect such a quick response; thank you all.
I noticed an option in the /etc/sysconfig/sound file:
# Load OSS-emulation modules at boot-up? (yes/no)
# OSS-emulation modules are needed if you use OSS applications
# with ALSA drivers.  This option specifies whether these modules are
# loaded at boot-time.
#
LOAD_OSS_EMUL_MODULES="yes"

For shits and giggles, I enabled it and found /dsp and /audio directories appeared after I next restarted the system.
After this, /dsp, /audio and blank work in the device field of the audio sink. The audio sink now works as well as
pulse audio (so system not broken for general use). The KDE pulse audio controls work with the audio sink although
pavucontrol& does not (audio sink reports  error: "audio_oss_sink: /dev/audio: Device or resource busy"). I don't
require pavucontrol so long as the KDE audio controls work.
Running aplay -L shows no change from before. 
So I am happy to consider this resolved and no long a diversion from other aspects of gnuradio.
Perhaps in a couple of months I will be able to contribute something useful to the project.

cheers,
Rick
Date: Fri, 14 Aug 2020 13:50:51 +0200
From: Marcus Müller <mueller@kit.edu>
To: <discuss-gnuradio@gnu.org>
Subject: Re: audio sink RuntimeError: audio_oss_sink
Message-ID: c1e99e0b-0146-a0b9-520f-243c9d8b2b3a@kit.edu" moz-do-not-send="true"><c1e99e0b-0146-a0b9-520f-243c9d8b2b3a@kit.edu>
Content-Type: text/plain; charset="utf-8"

Hi Rick,

does it work when you put nothing in the device field? (because that
should select the default audio architecture, ALSA in your case, and use
the default device, which would be Pulse Audio sitting behind "default".)
Using "sysdefault" can normally fail, since that might not be a
shareable device. "default" is really what you'd normally be going for.
A program I like to use to see which programs use Pulseaudio, natively
or through the "default" ALSA device, by the way, is `pavucontrol`.

Best regards,
Marcus

On 14.08.20 00:27, aardric wrote:
Hail,

    I am introducing myself to SDR technology and gnuradio through
whatever project documentation I find, dissecting the code and executing
simple experimental flow graphs to test understanding of concepts,
hoping to avoid forum queries (this is my first). Although the audio
sink is not critical to my ultimate use of gnuradio and a bit of a
diversion I will eventually start digging into it. However, I thought to
submit a query on whether there is something obvious I should try in
order to get it working. I am using gnu radio companion 3.8.1.0 (Python
3.6.10) and feeding the audio sink with a 1 kHz tone from the signal
source block.

(1) staring with:
:~> aplay -L
null
     Discard all samples (playback) or generate zero samples (capture)
default
     Default ALSA Output (currently PulseAudio Sound Server)
sysdefault:CARD=PCH
     HDA Intel PCH, ALC892 Analog
     Default Audio Device
front:CARD=PCH,DEV=0
     HDA Intel PCH, ALC892 Analog
     Front speakers
surround21:CARD=PCH,DEV=0
     HDA Intel PCH, ALC892 Analog
     2.1 Surround output to Front and Subwoofer speakers
(...)
hdmi:CARD=PCH,DEV=0
     HDA Intel PCH, HDMI 0
     HDMI Audio Output
hdmi:CARD=PCH,DEV=1
     HDA Intel PCH, HDMI 1
     HDMI Audio Output
hdmi:CARD=PCH,DEV=2
     HDA Intel PCH, HDMI 2
     HDMI Audio Output
hdmi:CARD=PCH,DEV=3
     HDA Intel PCH, HDMI 3
     HDMI Audio Output
hdmi:CARD=PCH,DEV=4
     HDA Intel PCH, HDMI 4
     HDMI Audio Output

(2) using sysdefault:CARD=PCH for the audio sink device name,
both 44.1 kS/s and 48 kS/s the following runtime error results:

(3)
gr::log :INFO: audio source - Audio sink arch: oss
audio_oss_sink: sysdefault:CARD=PCH: No such file or directory
Traceback (most recent call last):
   File "/gnuradio/examples/audiotest.py", line 136, in <module>
     main()
   File "/gnuradio/examples/audiotest.py", line 112, in main
     tb = top_block_cls()
   File "/gnuradio/examples/audiotest.py", line 78, in __init__
     self.audio_sink_0 = audio.sink(samp_rate, 'sysdefault:CARD=PCH', True)
   File
"/usr/local/lib64/python3.6/site-packages/gnuradio/audio/audio_swig.py",
line 220, in make
     return _audio_swig.sink_make(*args, **kwargs)
RuntimeError: audio_oss_sink

 >>> Done (return code 1)

(4) Fixing this isn't critical and in time I will get to the bottom of
it; the forum query just removes the possibility of an obvious answer
that most everyone else knows about. My guess is that I have to disable
the Pulse audio server.


Rick





reply via email to

[Prev in Thread] Current Thread [Next in Thread]