e4000_init(): use corrected xtal frequency

Otherwise the tuner would use the uncorrected xtal value
after enabling and disabling the direct sampling mode

Signed-off-by: Steve Markgraf <steve@steve-m.de>
master
Steve Markgraf 12 years ago
parent 9b8b0e53f6
commit c5d47b7f04
  1. 2
      src/librtlsdr.c

@ -97,7 +97,7 @@ void rtlsdr_set_gpio_bit(rtlsdr_dev_t *dev, uint8_t gpio, int val);
int e4000_init(void *dev) {
rtlsdr_dev_t* devt = (rtlsdr_dev_t*)dev;
devt->e4k_s.i2c_addr = E4K_I2C_ADDR;
devt->e4k_s.vco.fosc = devt->tun_xtal; /* no need to correct it here */
rtlsdr_get_xtal_freq(devt, NULL, &devt->e4k_s.vco.fosc);
devt->e4k_s.rtl_dev = dev;
return e4k_init(&devt->e4k_s);
}

Loading…
Cancel
Save