[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] Can't restart ALSA audio, but OSS works
From: |
cswiger |
Subject: |
[Discuss-gnuradio] Can't restart ALSA audio, but OSS works |
Date: |
Tue, 21 Jun 2005 15:32:52 -0400 (EDT) |
Just noticed something, using ALSA, once the flow graph is stopped,
restarting gives an error:
>>> from gnuradio import gr
>>> fg=gr.flow_graph()
>>> src = gr.sig_source_f(32000,gr.GR_SIN_WAVE,350,.2,0)
>>> from gnuradio import audio
>>> sink = audio.sink (32000)
>>> fg.connect(src,sink)
>>> fg.start()
>>> fg.stop()
>>> fg.start()
ALSA lib pcm_hw.c:370:(snd_pcm_hw_hw_free) SNDRV_PCM_IOCTL_HW_FREE failed:
File descriptor in bad state
audio_alsa_sink[hw:0,0]: snd_pcm_hw_params failed: File descriptor in bad
state
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.3/site-packages/gnuradio/gr/flow_graph.py",
line 83, in start
self._setup_connections ()
File "/usr/local/lib/python2.3/site-packages/gnuradio/gr/flow_graph.py",
line 112, in _setup_connections
self.validate ()
File
"/usr/local/lib/python2.3/site-packages/gnuradio/gr/basic_flow_graph.py",
line 164, in validate
raise ValueError, ("%s::check_topology (%d, %d) failed" % (m, ninputs,
noutputs))
ValueError: <gr_block audio_alsa_sink (1)>::check_topology (1, 0) failed
>>>
Whereas OSS audio works:
>>> from gnuradio import gr
>>> from gnuradio import audio_oss as audio
>>> fg = gr.flow_graph()
>>> src = gr.sig_source_f(32000,gr.GR_SIN_WAVE,350,.2,0)
>>> sink = audio.sink(32000)
>>> fg.connect(src,sink)
>>> fg.start()
>>> fg.stop()
>>> fg.start()
>>> fg.stop()
>>> fg.start()
>>> fg.stop()
--Chuck
- [Discuss-gnuradio] Can't restart ALSA audio, but OSS works,
cswiger <=