Skip to content

Commit

Permalink
add missing code + make standard r828d work
Browse files Browse the repository at this point in the history
  • Loading branch information
rtlsdrblog committed May 18, 2023
1 parent 7700ec3 commit b8be1be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/tuner_r82xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#define R820T_I2C_ADDR 0x34
#define R828D_I2C_ADDR 0x74
#define R828D_XTAL_FREQ 28800000 //28800000 //16000000
#define R828D_XTAL_FREQ 16000000

#define R82XX_CHECK_ADDR 0x00
#define R82XX_CHECK_VAL 0x69
Expand Down
4 changes: 4 additions & 0 deletions src/librtlsdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1603,6 +1603,9 @@ int rtlsdr_open(rtlsdr_dev_t **out_dev, uint32_t index)
rtlsdr_init_baseband(dev);
dev->dev_lost = 0;

/* Get device manufacturer and product id */
r = rtlsdr_get_usb_strings(dev, dev->manufact, dev->product, NULL);

/* Probe tuners */
rtlsdr_set_i2c_repeater(dev, 1);

Expand Down Expand Up @@ -1672,6 +1675,7 @@ int rtlsdr_open(rtlsdr_dev_t **out_dev, uint32_t index)
// If NOT an RTL-SDR Blog V4, set typical R828D 16 MHz freq. Otherwise, keep at 28.8 MHz.
if (!(rtlsdr_check_dongle_model(dev, "RTLSDRBlog", "Blog V4")))
{
fprintf(stdout, "setting 16mhz");
dev->tun_xtal = R828D_XTAL_FREQ;
}
/* fall-through */
Expand Down

0 comments on commit b8be1be

Please sign in to comment.