Audio card sampling rate problem

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,

Jiri

Jiri Pittner wrote:

Use the following option “-O plughw:0.0”

That tells alsa to use its own resampler.

Matt

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,

Angilberto.

  ____________________________________________________________________________________

Luggage? GPS? Comic books?
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz

I get an error with that:

|jp:/home/jiri/pokusy/gnuradio/examples/python/usrp> ./usrp_wfm_rcv_pll.py -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 “./usrp_wfm_rcv_pll.py”, line 325, in ?
app = stdgui.stdapp (wfm_rx_graph, “USRP WFM RX”)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/wxgui/stdgui.py”,
line 36, in init
wx.App.init (self, redirect=False)
File
“/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_core.py”,
line 7700, in init
self._BootstrapApp()
File
“/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_core.py”,
line 7352, in _BootstrapApp
return core.PyApp__BootstrapApp(*args, **kwargs)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/wxgui/stdgui.py”,
line 39, in OnInit
frame = stdframe (self.flow_graph_maker, self.title, self._nstatus)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/wxgui/stdgui.py”,
line 60, in init
self.panel = stdpanel (self, self, flow_graph_maker)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/wxgui/stdgui.py”,
line 81, in init
self.fg = flow_graph_maker (frame, self, vbox, sys.argv)
File “./usrp_wfm_rcv_pll.py”, line 99, in init
False) # ok_to_block
File “/usr/local/lib/python2.4/site-packages/gnuradio/audio_alsa.py”,
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.
Jiri

Jiri Pittner wrote:

I get an error with that:

|jp:/home/jiri/pokusy/gnuradio/examples/python/usrp>
./usrp_wfm_rcv_pll.py -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.

Tom

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs