rtl_fm and r820t tuner

Steve Markgraf steve at steve-m.de
Tue Nov 12 21:53:40 UTC 2013


Hi,

On 12.11.2013 22:02, Miguel A. Vallejo wrote:
> It's clear rtl_fm does not set any gain to the r820t tuner

Can't confirm. Using the current master, an R820T stick, and the
exact same commands you posted I get the following:

http://steve-m.de/pics/rtl_fm/0db.png
http://steve-m.de/pics/rtl_fm/30db.png

Can you please try the following patch and report back your output?

diff --git a/src/librtlsdr.c b/src/librtlsdr.c
index 9b76a96..8a52602 100644
--- a/src/librtlsdr.c
+++ b/src/librtlsdr.c
@@ -948,6 +948,7 @@ int rtlsdr_set_tuner_gain(rtlsdr_dev_t *dev, int gain)
        if (dev->tuner->set_gain) {
                rtlsdr_set_i2c_repeater(dev, 1);
                r = dev->tuner->set_gain((void *)dev, gain);
+               fprintf(stderr, "%s(%d) -> %d\n", __FUNCTION__, gain, r);
                rtlsdr_set_i2c_repeater(dev, 0);
        }

@@ -993,6 +994,7 @@ int rtlsdr_set_tuner_gain_mode(rtlsdr_dev_t *dev,
int mode)
        if (dev->tuner->set_gain_mode) {
                rtlsdr_set_i2c_repeater(dev, 1);
                r = dev->tuner->set_gain_mode((void *)dev, mode);
+               fprintf(stderr, "%s(%d) -> %d\n", __FUNCTION__, mode, r);
                rtlsdr_set_i2c_repeater(dev, 0);
        }


Regards,
Steve






More information about the osmocom-sdr mailing list