discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] audio_alsa: problem with "valve" at head of audio


From: Almohanad Fayez
Subject: Re: [Discuss-gnuradio] audio_alsa: problem with "valve" at head of audio_alsa sink sub-graph
Date: Mon, 25 Oct 2010 11:25:13 -0400 (EDT)

Marcus, this is a problem with the gnuradio/gr-audio-alsa/src/audio_alsa_source.cc.  I ran into a few weeks ago and i managed to find a quick and dirty fix for.  

I'm assuming that you're stopping the flow graph and restarting it again. if you look into the "check_topology" method.  There's a FIXME there, what I beleieve is happening, is that when you try to restart the flowgraph after stopping it GNU Radio is trying to reset  your sound card and it thinks that it's in a corrupt state. 

My fix was to add a "static bool" variable that skips the "snd_pcm_hw_params(d_pcm_handle, d_hw_params);" function call.  the flag is "static" just so you can detect your first entry.  After that run make and make install and things should work fine.


al



-----Original Message-----
From: Marcus D. Leech <address@hidden>
To: Discuss-gnuradio <address@hidden>
Sent: Sat, Oct 23, 2010 4:17 pm
Subject: [Discuss-gnuradio] audio_alsa: problem with "valve" at head of audio_alsa sink sub-graph

In my application I have a sub-graph that terminates an an audio_alsa sink.

At the "head" of this sub-graph, I've placed a valve, so that I can turn
off data being
copied to the audio_alsa sink.

When this valve transitions from "closed" (data flowing) to "open" (data
*not* flowing), it provokes
the following error in audio_alsa_sink:

audio_alsa_sink[plughw:0,0]: snd_pcm_hw_params failed: File descriptor
in bad state
terminate called after throwing an instance of 'std::runtime_error'
what(): check topology failed on audio_alsa_sink(1) using ninputs=1,
noutputs


Am I being an idiot here? Should this work? If not, why not?

Further, there's a "OK to block" parameter for an audio_alsa_sink. What
does it do?


--
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org



_______________________________________________
Discuss-gnuradio mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


reply via email to

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