Forum: GNU Radio audio card sampling rate problem

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
D3a6ebcacb90235b3388ddfd7f575a34?d=identicon&s=25 unknown (Guest)
on 2007-07-04 22:33
(Received via mailing list)
Hi all,

I have been experienting with gnuradio for some time and I have noticed
an annoying problem
with the audio sampling rate: in the scripts from the example directory
it is set to a hard
value of 32ksamples/s. However, my laptop audio card (or its linux
driver) do not support
this speed, only 44100 or 48000. So when updating to scripts from new
gnuradio source it is
always necessary to adapt the values in the scripts. Is there some way
how to ask the alsa
system about supported audio sampling rates from within a python script?
I guess there can
be more users with such limitations and it would be nice if the final
gnuradio applications
would determine the audio rates automatically.

Best regards,

3596cfe1d579c65b9babd35e8787977c?d=identicon&s=25 Matt Ettus (Guest)
on 2007-07-04 22:37
(Received via mailing list)
Jiri Pittner wrote:
Use the following option   "-O plughw:0.0"

That tells alsa to use its own resampler.

533e669652a899ecd3b838295aef0837?d=identicon&s=25 Angilberto Muniz Sb (Guest)
on 2007-07-04 22:41
(Received via mailing list)
Is there a way or method to calculate (find) the
minimum signal level to input into the ADC?

I mean, if I decide to build or interface a custom RF
board, how much gain should I provide in the analog
path, assuming a 500nV at the antenna terminal?

Thank you,


Luggage? GPS? Comic books?
Check out fitting gifts for grads at Yahoo! Search
D3a6ebcacb90235b3388ddfd7f575a34?d=identicon&s=25 Jiri Pittner (Guest)
on 2007-07-04 22:59
(Received via mailing list)
I get an error with that:

|jp:/home/jiri/pokusy/gnuradio/examples/python/usrp> ./ -R B -f 98.7e6 
-O plughw:0.0
>>> gr_fir_ccf: using SSE
>>> gr_fir_fff: using SSE
>>> gr_fir_fcc: using SSE
ALSA lib pcm_hw.c:1351:(_snd_pcm_hw_open) Invalid value for card
audio_alsa_sink[plughw:0.0]: No such device
Traceback (most recent call last):
   File "./", line 325, in ?
     app = stdgui.stdapp (wfm_rx_graph, "USRP WFM RX")
line 36, in __init__
     wx.App.__init__ (self, redirect=False)
line 7700, in __init__
line 7352, in _BootstrapApp
     return _core_.PyApp__BootstrapApp(*args, **kwargs)
line 39, in OnInit
     frame = stdframe (self.flow_graph_maker, self.title, self._nstatus)
line 60, in __init__
     self.panel = stdpanel (self, self, flow_graph_maker)
line 81, in __init__
     self.fg = flow_graph_maker (frame, self, vbox, sys.argv)
   File "./", line 99, in __init__
     False)   # ok_to_block
   File "/usr/local/lib/python2.4/site-packages/gnuradio/",
line 236, in sink
     return _audio_alsa.sink(*args)
RuntimeError: audio_alsa_sink

I am using alsa 1.0.14a-r1 and kernel 2.6.21-gentoo.
8cc60441dc67b4e59421ebe95dc63c23?d=identicon&s=25 Tom Rondeau (Guest)
on 2007-07-06 13:07
(Received via mailing list)
Jiri Pittner wrote:
> I get an error with that:
> |jp:/home/jiri/pokusy/gnuradio/examples/python/usrp>
> ./ -R B -f 98.7e6 -O plughw:0.0

That was a typo. It should be "-O plughw:0,0". Note the comma instead of
the period.

This topic is locked and can not be replied to.