[PATCH] [linux-dvb] DiB3000MC : autosearch doesn't work

Mario Rossi mariofutire at googlemail.com
Sun Oct 29 11:21:25 CET 2006


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));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dib3000mc.patch
Type: text/x-patch
Size: 608 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20061029/78d971f5/dib3000mc.bin


More information about the linux-dvb mailing list