kopia lustrzana https://github.com/keenerd/rtl-sdr
r82xx: direct sampling fixes from tejeez
rodzic
f3b45e1005
commit
06af0f90f5
|
@ -946,7 +946,7 @@ static int r82xx_set_if_filter(struct r82xx_priv *priv, int hpf, int lpf) {
|
|||
else if(cal > 15) cal = 15;
|
||||
priv->fil_cal_code = cal;
|
||||
|
||||
fprintf(stderr, "Setting IF filter for %d...%d kHz: hp_cor=0x%02x, fil_cal_code=%d\n", hpf, lpf, hp_cor, cal);
|
||||
//fprintf(stderr, "Setting IF filter for %d...%d kHz: hp_cor=0x%02x, fil_cal_code=%d\n", hpf, lpf, hp_cor, cal);
|
||||
|
||||
rc = r82xx_write_reg_mask(priv, 0x0a,
|
||||
filt_q | priv->fil_cal_code, 0x1f);
|
||||
|
@ -1113,17 +1113,22 @@ int r82xx_set_nomod(struct r82xx_priv *priv)
|
|||
|
||||
fprintf(stderr, "Using R820T no-mod direct sampling mode\n");
|
||||
|
||||
/*rc = r82xx_set_bw(priv, 1000000);
|
||||
if (rc < 0)
|
||||
goto err;*/
|
||||
/* should probably play a bit more with the mux settings
|
||||
to see if something works even better than this */
|
||||
|
||||
/* experimentally determined magic numbers
|
||||
* needs more experimenting with all the registers */
|
||||
rc = r82xx_set_mux(priv, 300000000);
|
||||
if (rc < 0)
|
||||
goto err;
|
||||
if (rc < 0) goto err;
|
||||
|
||||
r82xx_set_pll(priv, 25000000);
|
||||
/* the VCO frequency setting still seems to have some effect on the noise floor */
|
||||
rc = r82xx_set_pll(priv, 50000000);
|
||||
if (rc < 0) goto err;
|
||||
|
||||
/* the most important part: set a divider number that does not really work */
|
||||
rc = r82xx_write_reg_mask(priv, 0x10, 0xd0, 0xe0);
|
||||
if (rc < 0) goto err;
|
||||
|
||||
/* VCO power off? */
|
||||
rc = r82xx_write_reg_mask(priv, 0x12, 0xe0, 0xe0);
|
||||
|
||||
err:
|
||||
if (rc < 0)
|
||||
|
|
Ładowanie…
Reference in New Issue