E100 - dial_tone.py error

Hi,
I am new to using GNUradio and the USRP hardware.I installed GNUradio,
GRC and UHD on the E100. I have run the examples for the UHD and it is
working without any problem. From the GNUradio examples, When I tried
running the dial_tone.py, I get the following error:
audio_alsa_sink[hw:0,0]: Device or resource busyTraceback (most recent
call last):File “./dial_tone.py”, line 55, in
my_top_block().run()File “./dial_tone.py”, line 48, in init dst =
audio.sink (sample_rate, options.audio_output)File
“/usr/local/lib/python2.6/site-packages/gnuradio/audio_alsa.py”, line
329, in sink return _audio_alsa.sink(*args, **kwargs)RuntimeError:
audio_alsa_sink
Also,in python, the importing of modules is working:Python 2.6.5
(r265:79063, Dec 14 2010, 12:41:31)[GCC 4.5.2 20101204 (prerelease)] on
linux2Type “help”, “copyright”, “credits” or “license” for more
information.>>> from gnuradio import gr>>> from gnuradio import audio>>>
When I go to System–> Preferences --> Sound, a window pops up that says
‘Waiting for sound system to respond’. Does this mean that there is no
sound system?How can I verify that my GNUradio install on the E100 is
done right?
Thanks,Divya.

I have not been able to get sound working (quickly) on my E100 either so
I gave up and plugged in a USB headset which I address as hw:1,0 in
python.

Sound works just fine on my E100. I haven’t done anything special aside
from turning up the sound levels in alsamixer.

I have updated the c++ dial_tone example, and can successfully use it on
my
E100 without issue. The updated code is here:

https://github.com/bhilburn/gnuradio-on-e100/tree/benchmark_uhd_work/gnuradio-examples/c++/dial_tone

https://github.com/bhilburn/gnuradio-on-e100/tree/benchmark_uhd_work/gnuradio-examples/c++/dial_toneNote
that the commits for that are kind of scattered about, unfortunately.
After
updating the dial_tone example, I turned it into a test for something
else,
and then realized the updated dial_tone on its own was useful and
reverted
it back. As a result, you probably don’t want to cherry-pick individual
commits, but just grab the files you want. I could put together a patch
that does it, but I’m about to head out for the day.

Remember to enable the Makefile and SUBDIR, like the README file says in
the
dial_tone directory.

Hope this helps!

Cheers,
Ben

Oh, forgot to mention:

If you aren’t sure about where the problem lies, turn up the volume in
alsamixer, then try running this command:


$ mplayer /usr/share/sounds/gnome/default/alerts/sonar.ogg

(note that you may have to root):


$ su

mplayer /usr/share/sounds/gnome/default/alerts/sonar.ogg


If you don’t hear anything, then I would debug the issue outside of
GNURadio
to simplify the number of things involved.

Cheers,
Ben

On 03/08/2011 11:12 AM, Divya Paul wrote:

Hi,
I am new to using GNUradio and the USRP hardware. I installed GNUradio, GRC and
UHD on the E100. I have run the examples for the UHD and it is working without any
problem. From the GNUradio examples, When I tried running the dial_tone.py, I get
the following error:
audio_alsa_sink[hw:0,0]: Device or resource busyTraceback (most recent call
last): File “./dial_tone.py”, line 55, in my_top_block().run() File
“./dial_tone.py”, line 48, in init dst = audio.sink (sample_rate,
options.audio_output) File
“/usr/local/lib/python2.6/site-packages/gnuradio/audio_alsa.py”, line 329, in sink
return _audio_alsa.sink(*args, **kwargs)RuntimeError: audio_alsa_sink
Also,in python, the importing of modules is working:Python 2.6.5 (r265:79063,
Dec 14 2010, 12:41:31) [GCC 4.5.2 20101204 (prerelease)] on linux2Type “help”,
“copyright”, “credits” or “license” for more information.>>> from gnuradio import
gr>>> from gnuradio import audio>>>
When I go to System–> Preferences --> Sound, a window pops up that says
‘Waiting for sound system to respond’. Does this mean that there is no sound
system? How can I verify that my GNUradio install on the E100 is done right?

The pulseaudio daemon may have grabbed the sound driver. Try “killall -9
pulseaudio” and try the test again.

I need to figure out why it works for some people and not others.

Philip

That worked! Thank you!


From: Philip B. [email protected]
To: Divya Paul [email protected]
Cc: [email protected]
Sent: Tuesday, March 8, 2011 21:00:02
Subject: Re: [Discuss-gnuradio] E100 - dial_tone.py error

On 03/08/2011 11:12 AM, Divya Paul wrote:

sink return _audio_alsa.sink(*args, **kwargs)RuntimeError: audio_alsa_sink
Also,in python, the importing of modules is working:Python 2.6.5 (r265:79063,
Dec 14 2010, 12:41:31) [GCC 4.5.2 20101204 (prerelease)] on linux2Type “help”,
“copyright”, “credits” or “license” for more information.>>> from gnuradio
import gr>>> from gnuradio import audio>>>
When I go to System–> Preferences → Sound, a window pops up that says
‘Waiting for sound system to respond’. Does this mean that there is no sound
system? How can I verify that my GNUradio install on the E100 is done right?

The pulseaudio daemon may have grabbed the sound driver. Try “killall -9
pulseaudio” and try the test again.

I need to figure out why it works for some people and not others.

Philip

On 09-03-11 03:00, Philip B. wrote:

is no sound system? How can I verify that my GNUradio install on the
E100 is done right?

The pulseaudio daemon may have grabbed the sound driver. Try “killall -9
pulseaudio” and try the test again.

I need to figure out why it works for some people and not others.

I use the ‘pulse’ device of alsa. This integrates perfectly with all the
other sounds generated in the system. Even with sounds generated by
vmware guests.

When using ‘aplay -L’ the hw device is shown with the message ‘Direct
hardware device without any conversions’. If you send audio in a
samplerate that is not supported by the card, it will not open.

Also in the file .gnuradio/config.conf there is a section [audio_alsa]
where some defaults and alsa config is specified.

Gr. Sim