[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] [patch] usrp_wfm_rcv_nogui.py with pll-tuner
From: |
Patrick Strasser |
Subject: |
[Discuss-gnuradio] [patch] usrp_wfm_rcv_nogui.py with pll-tuner |
Date: |
Tue, 23 May 2006 13:13:02 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050602 Thunderbird/1.0.2 Mnenhy/0.7.2.0 |
Hello!
I've extended the FM-receiver with an option to use the pll tuner.
Without pll my PIII 350Mhz decoded FM mono quite fine, with pll it's
heavily stuttering.
Patrick
Index: usrp_wfm_rcv_nogui.py
===================================================================
RCS file:
/sources/gnuradio/gnuradio-examples/python/usrp/usrp_wfm_rcv_nogui.py,v
retrieving revision 1.9
diff -u -r1.9 usrp_wfm_rcv_nogui.py
--- usrp_wfm_rcv_nogui.py 31 Mar 2006 18:33:05 -0000 1.9
+++ usrp_wfm_rcv_nogui.py 23 May 2006 11:08:38 -0000
@@ -34,6 +34,8 @@
help="set frequency to FREQ", metavar="FREQ")
parser.add_option("-g", "--gain", type="eng_float", default=None,
help="set gain in dB (default is midpoint)")
+ parser.add_option("-p", "--pll", action="store_true",
default=False,
+ help="use the PLL stereo decoder")
parser.add_option("-O", "--audio-output", type="string",
default="",
help="pcm device name. E.g., hw:0,0 or
surround51 or /dev/dsp")
@@ -77,9 +79,14 @@
#print len(chan_filt_coeffs)
chan_filt = gr.fir_filter_ccf (chanfilt_decim, chan_filt_coeffs)
- self.guts = blks.wfm_rcv (self, demod_rate, audio_decimation)
-
+ if options.pll:
+ self.guts = blks.wfm_rcv_pll (self, demod_rate,
audio_decimation)
+ else:
+ self.guts = blks.wfm_rcv (self, demod_rate, audio_decimation)
+
self.volume_control = gr.multiply_const_ff(self.vol)
+ self.volume_control_l = gr.multiply_const_ff(self.vol)
+ self.volume_control_r = gr.multiply_const_ff(self.vol)
# sound card as final sink
audio_sink = audio.sink(int(audio_rate),
@@ -87,9 +94,13 @@
False) # ok_to_block
# now wire it all together
- self.connect (self.u, chan_filt, self.guts,
self.volume_control, audio_sink)
-
-
+ self.connect (self.u, chan_filt, self.guts)
+ if options.pll:
+ self.connect ((self.guts, 0), self.volume_control_l,
(audio_sink,0))
+ self.connect ((self.guts, 1), self.volume_control_r,
(audio_sink,1))
+ else:
+ self.connect (self.guts, self.volume_control, audio_sink)
+
if options.gain is None:
# if no gain was specified, use the mid-point in dB
g = self.subdev.gain_range()
@@ -108,6 +119,8 @@
def set_vol (self, vol):
self.vol = vol
self.volume_control.set_k(self.vol)
+ self.volume_control_l.set_k(self.vol)
+ self.volume_control_r.set_k(self.vol)
self.update_status_bar ()
def set_freq(self, target_freq):
--
Engineers motto: cheap, good, fast: choose any two
Patrick Strasser <patrick dot strasser at tugraz dot at>
Student of Telematik, Techn. University Graz, Austria
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Discuss-gnuradio] [patch] usrp_wfm_rcv_nogui.py with pll-tuner,
Patrick Strasser <=