Re: DiB3000MC rewritten and MT2060 is ready to go into main

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Klaus,

Klaus Frahm wrote:
On 30 Jul, matthieu castet wrote:



I also see that the signal strength is reduced with the new driver, only
Do you have a mt2060 ?

in my case I still have a good reception, on the contrary this may even have
participated to avoid another problem (described my other answer of this
thread). With the new driver the tzap commands gives me:


tuning to 714167000 Hz
video pid 0x0078, audio pid 0x0082
status 03 | signal bb17 | snr 0000 | ber 001fffff | unc 0000ffff | status 1f | signal ba37 | snr 0000 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal 0000 | snr ffff | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal 0000 | snr ffff | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal 0000 | snr ffff | ber 00000000 | unc 00000000 | FE_HAS_LOCK

and I think the signal "0000" is in reality 100% and I am convinced that my
reception is indeed 100% (an external amplified antenna) despite the fact that I use a T-peace in the antenna connection (which is normally not very good).
The old driver signal strenght is broken, you need to apply this patch to get something usefull [1].


Patrick, I look at the driver and saw that some AGC setting specific to tuner are different :
old driver do :
static const struct dib3000p_agc_config dib3000p_agc_microtune_mt2060 = {
- { 0x196, 0x301d, 0x0, 0x1cc7, 0xffff, 0x5c29,
- 0xa8f6, 0x5eb8, 0x65ff, 0x40ff, 0x8a, 0x1114 }
-};

/* AGC setting - specific to the tuners */
    wr(36, agc->val[0]);
    wr(37, agc->val[1]);
    wr(38, agc->val[2]);
    wr(39, agc->val[3]);

    wr(42, agc->val[4]);
    wr(43, agc->val[5]);
    wr(44, agc->val[6]);
    wr(45, agc->val[7]);
    wr(46, agc->val[8]);
    wr(47, agc->val[9]);
    wr(48, agc->val[10]);
    wr(49, agc->val[11]);

new one do :
+static struct dibx000_agc_config dib3000p_mt2060_agc_config = {
+ .band_caps = BAND_VHF | BAND_UHF,
+ .setup = (0 << 15) | (0 << 14) | (1 << 13) | (1 << 12) | (29 << 0),
+
+ .agc1_max = 48497, //was 65535
+ .agc1_min = 23593,
+ .agc2_max = 46531, //was 43254
+ .agc2_min = 24904, //was 24248
+
+ .agc1_pt1 = 0x65,
+ .agc1_pt2 = 0x69, //was 0xff
+
+ .agc1_slope1 = 0x51, //was 0x40
+ .agc1_slope2 = 0x27, //was 0xff
+
+ .agc2_pt1 = 0,
+ .agc2_pt2 = 0x33, //was 0x8a
+
+ .agc2_slope1 = 0x35, //was 0x11
+ .agc2_slope2 = 0x37, //was 0x14
+};

static struct dib3000mc_config stk3000p_dib3000p_config = {
+ &dib3000p_mt2060_agc_config,
+
+ .max_time = 0x196,
+ .ln_adc_level = 0x1cc7,
+
+ .output_mpeg2_in_188_bytes = 1,
+};

/* agc */
+ dib3000mc_write_word(state, 36, state->cfg->max_time);
+ dib3000mc_write_word(state, 37, agc->setup);
+ dib3000mc_write_word(state, 38, state->cfg->pwm3_value);
+ dib3000mc_write_word(state, 39, state->cfg->ln_adc_level);
+
+
+ dib3000mc_write_word(state, 42, agc->agc1_max);
+ dib3000mc_write_word(state, 43, agc->agc1_min);
+ dib3000mc_write_word(state, 44, agc->agc2_max);
+ dib3000mc_write_word(state, 45, agc->agc2_min);
+ dib3000mc_write_word(state, 46, (agc->agc1_pt1 << 8) | agc->agc1_pt2);
+ dib3000mc_write_word(state, 47, (agc->agc1_slope1 << 8) | agc->agc1_slope2);
+ dib3000mc_write_word(state, 48, (agc->agc2_pt1 << 8) | agc->agc2_pt2);
+ dib3000mc_write_word(state, 49, (agc->agc2_slope1 << 8) | agc->agc2_slope2);

Do you any infos why this changes where made ?


Cheers,
Matthieu

[1]
--- linux.old/drivers/media/dvb/frontend/dib3000mc.c	2006-07-28 17:48:01.000000000 +0200
+++ linux/drivers/media/dvb/frontend/dib3000mc.c	2006-07-30 22:37:47.000000000 +0200
@@ -702,8 +702,9 @@
 static int dib3000mc_read_signal_strength(struct dvb_frontend* fe, u16 *strength)
 {
 	struct dib3000_state* state = fe->demodulator_priv;
-	u16 val = rd(DIB3000MC_REG_SIGNAL_NOISE_LSB);
-	*strength = (((val >> 6) & 0xff) << 8) + (val & 0x3f);
+	//u16 val = rd(DIB3000MC_REG_SIGNAL_NOISE_LSB);
+	//*strength = (((val >> 6) & 0xff) << 8) + (val & 0x3f);
+	*strength = 65535 - rd(DIB3000MC_REG_RF_POWER);
 
 	deb_stat("signal: mantisse = %d, exponent = %d\n",(*strength >> 8) & 0xff, *strength & 0xff);
 	return 0;
_______________________________________________

linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux