Trouble reexecuting a microphone audio source

I’m just getting started with grc but I am having problems already.

I have a simple flow graph: an audio source with a device name “hw:1,0”
connected to a WX scope sink.

hw:1,0 is my Logitech headset according to ‘arecord -l’.

The first time i run my flow graph after booting up, it works fine.
After stoping
the flow graph, any subsequent time I try to run it, I get an error. I
can only
clear the error by rebooting. Simply restarting grc is not enough.

My ‘uname -u’ output is:

Linux zbox 3.2.0-4-amd64 #1 SMP Debian 3.2.63-2+deb7u2 x86_64 GNU/Linux

and i built my gnuradio with build-gnuradio a few days ago.
Here is the grc output:

tom@zbox:~$ gnuradio-companion linux; GNU C++ version 4.7.2; Boost_104900; UHD_003.008.000-52-g2068af70

<<< Welcome to GNU Radio Companion 3.7.5.1 >>>

Preferences file: /home/tom/.grc
Block paths:
/usr/local/share/gnuradio/grc/blocks
/home/tom/.grc_gnuradio

Loading: “/home/tom/grc/playing.grc”

Done

Showing: “/home/tom/grc/playing.grc”

Loading: “/home/tom/dialtone.grc”

Done

Generating: “/home/tom/grc/top_block.py”

Executing: “/home/tom/grc/top_block.py”

Using Volk machine: avx_64_mmx_orc
INFO: Audio source arch: alsa

Done

Generating: “/home/tom/grc/top_block.py”

Executing: “/home/tom/grc/top_block.py”

Using Volk machine: avx_64_mmx_orc
INFO: Audio source arch: alsa
ERROR: [hw:1,0]: snd_pcm_hw_params failed: Input/output error
Traceback (most recent call last):
File “/home/tom/grc/top_block.py”, line 76, in
tb.Start(True)
File “/usr/local/lib/python2.7/dist-
packages/grc_gnuradio/wxgui/top_block_gui.py”, line 73, in Start
self.start()
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/gr/top_block.py”, line
104, in start
top_block_start_unlocked(self._tb, max_noutput_items)
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/gr/runtime_swig.py”,
line 4724, in top_block_start_unlocked
return _runtime_swig.top_block_start_unlocked(*args, **kwargs)
RuntimeError: check topology failed on audio_alsa_source(8) using
ninputs=0,
noutputs=1

Done

Just a thought; when you stop your flow graph, are you using the big red
X
button in the GRC menu bar (the improper method), or closing the WXGUI
sink
window (the proper method)? I was doing it the wrong way for quite some
time and that caused issues with hardware access.

Lou

Thomas Early wrote

only
clear the error by rebooting. Simply restarting grc is not enough.


View this message in context:
http://gnuradio.4.n7.nabble.com/trouble-reexecuting-a-microphone-audio-source-tp51603p51614.html
Sent from the GnuRadio mailing list archive at Nabble.com.

Thanks much Lou. That was my problem.

I thought I saw in a Ossmann sdr video that we were always suppose to
use the
big red x. I’ll have to go back and watch again.

How do I stop a flow graph that only has an audio sink and no gui sink?

Did I miss a link to a “intro to grc” tutorial? It took me a while to
figure
out an audio sink max is 1.0.

Huh, good question, I just use CTRL-C for GR programs launched from the
terminal, and had no issues with hardware. If you set the GRC option
block
to NO GUI, I don’t recall if it even runs the flow; it may just generate
the
top_block.py and you must manually launch from the terminal.

In general, you don’t want a peak value of 1.0 into any hardware sink;
need
to back it off some.

Anyway:
http://gnuradio.org/redmine/projects/gnuradio/wiki/TutorialsWritePythonApplications
“That’s all there is to create a flow graph. The last 5 lines do nothing
but
start the flow graph (line 22). The try and except statements simply
make
sure the flow graph (which would otherwise run infinitely) are stopped
when
Ctrl+C is pressed (which triggers a KeyboardInterrupt Python
exception).”

Lou

Thomas Early wrote

out an audio sink max is 1.0.

View this message in context:
http://gnuradio.4.n7.nabble.com/trouble-reexecuting-a-microphone-audio-source-tp51603p51622.html
Sent from the GnuRadio mailing list archive at Nabble.com.