From 35263d0df3653abee9797bee8230030580182975 Mon Sep 17 00:00:00 2001 From: Steve Markgraf Date: Thu, 20 Sep 2012 23:44:49 +0200 Subject: [PATCH] rtlsdr_set_direct_sampling: reset IF freq to 0 on zero-IF tuners Signed-off-by: Steve Markgraf --- src/librtlsdr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/librtlsdr.c b/src/librtlsdr.c index 8866c49..0b5986b 100644 --- a/src/librtlsdr.c +++ b/src/librtlsdr.c @@ -976,6 +976,8 @@ int rtlsdr_set_direct_sampling(rtlsdr_dev_t *dev, int on) /* enable spectrum inversion */ r |= rtlsdr_demod_write_reg(dev, 1, 0x15, 0x01, 1); } else { + r |= rtlsdr_set_if_freq(dev, 0); + /* enable In-phase + Quadrature ADC input */ r |= rtlsdr_demod_write_reg(dev, 0, 0x08, 0xcd, 1);