From 2a568c79488a3a6d038222d246ac24a68cce8186 Mon Sep 17 00:00:00 2001 From: rtlsdrblog Date: Tue, 16 May 2023 14:52:27 +1200 Subject: [PATCH] revert change, fixed in hardware --- include/tuner_r82xx.h | 2 +- src/tuner_r82xx.c | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/tuner_r82xx.h b/include/tuner_r82xx.h index cba23b2..2dffa28 100644 --- a/include/tuner_r82xx.h +++ b/include/tuner_r82xx.h @@ -27,7 +27,7 @@ #define R820T_I2C_ADDR 0x34 #define R828D_I2C_ADDR 0x74 -#define R828D_XTAL_FREQ 28800000 //16000000 +#define R828D_XTAL_FREQ 28800000 //28800000 //16000000 #define R82XX_CHECK_ADDR 0x00 #define R82XX_CHECK_VAL 0x69 diff --git a/src/tuner_r82xx.c b/src/tuner_r82xx.c index 4c3b699..d7879a0 100644 --- a/src/tuner_r82xx.c +++ b/src/tuner_r82xx.c @@ -277,12 +277,9 @@ static int r82xx_write(struct r82xx_priv *priv, uint8_t reg, const uint8_t *val, if (rc != size + 1) { fprintf(stderr, "%s: i2c wr failed=%d reg=%02x len=%d\n", __FUNCTION__, rc, reg, size); - // R828D causes an error on reg 0x0c and 0x10, and this causes the init to fail - // But if we just ignore the errors, eventhing works fine. - // TODO: Look into why 0x0C and 0x10 cause a i2c wr failed=-1 error with the R828D - //if (rc < 0) - // return rc; - //return -1; + if (rc < 0) + return rc; + return -1; } reg += size;