[PATCH] DiB3000MC : autosearch doesn't work

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

 



I've found a difference in one of the values passed to the board
between the july driver and the current one.

It is the value of the register "SEQ" (i.e. 5) (it has apparently
something to do with autosearch).

In the current driver the value is 7 (function dib3000mc_autosearch_start).

Before, it used to be computed dynamically like that

#define DIB3000MC_SEQ_TPS(s,t)			( \
		((s & 0x0f) << 4) | \
		((t & 0x01) << 8) )

/* for auto search */
u16 dib3000_seq[2][2][2] =     /* fft,gua,   inv   */
	{ /* fft */
		{ /* gua */
			{ 0, 1 },                   /*  0   0   { 0,1 } */
			{ 3, 9 },                   /*  0   1   { 0,1 } */
		},
		{
			{ 2, 5 },                   /*  1   0   { 0,1 } */
			{ 6, 11 },                  /*  1   1   { 0,1 } */
		}
	};

	seq = dib3000_seq
		[ofdm->transmission_mode == TRANSMISSION_MODE_AUTO]
		[ofdm->guard_interval == GUARD_INTERVAL_AUTO]
		[fep->inversion == INVERSION_AUTO];

// this is the line writing it to the board ==============================
	wr(DIB3000MC_REG_SEQ_TPS, DIB3000MC_SEQ_TPS(seq,1));
// ==========================================================

Basically in case of full auro search dib3000_seq[1][1][1] = 11 and

DIB3000MC_SEQ_TPS(11,1)=432.

Using this value it seems I can auto search all available channels in
London, both the standard ones and HDTV.

Maybe Matthieu, you could try it.

diff -r 5e9d301ef13b linux/drivers/media/dvb/frontends/dib3000mc.c
--- a/linux/drivers/media/dvb/frontends/dib3000mc.c     Thu Oct 26
10:10:56 2006 -0300
+++ b/linux/drivers/media/dvb/frontends/dib3000mc.c     Sun Oct 29
10:07:52 2006 +0000
@@ -548,7 +548,7 @@ static int dib3000mc_autosearch_start(st
       fchan.vit_alpha = 1; fchan.vit_code_rate_hp = 2;
fchan.vit_code_rate_lp = 2;
       fchan.vit_hrch = 0; fchan.vit_select_hp = 1;

-       dib3000mc_set_channel_cfg(state, &fchan, 7);
+       dib3000mc_set_channel_cfg(state, &fchan, 432);

       reg = dib3000mc_read_word(state, 0);
       dib3000mc_write_word(state, 0, reg | (1 << 8));
diff -r 5e9d301ef13b linux/drivers/media/dvb/frontends/dib3000mc.c
--- a/linux/drivers/media/dvb/frontends/dib3000mc.c	Thu Oct 26 10:10:56 2006 -0300
+++ b/linux/drivers/media/dvb/frontends/dib3000mc.c	Sun Oct 29 10:07:52 2006 +0000
@@ -548,7 +548,7 @@ static int dib3000mc_autosearch_start(st
 	fchan.vit_alpha = 1; fchan.vit_code_rate_hp = 2; fchan.vit_code_rate_lp = 2;
 	fchan.vit_hrch = 0; fchan.vit_select_hp = 1;
 
-	dib3000mc_set_channel_cfg(state, &fchan, 7);
+	dib3000mc_set_channel_cfg(state, &fchan, 432);
 
 	reg = dib3000mc_read_word(state, 0);
 	dib3000mc_write_word(state, 0, reg | (1 << 8));
_______________________________________________
linux-dvb mailing list
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