[linux-dvb] Patches to fix support for VisionPlus DTV (VP1020) / tuning problem

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

 



Steffen Motzer wrote:
> This revised patch for dst.c also fixes the tuning problems. It seems 
> that sometimes the asic acknowledged a command but failed to execute it. 
> This might have also be the reason why sometimes szap reported that the 
> tuner supposedly had lost the lock on the signal even though it did not.
> 
> The values for signal-quality (dB) and signal-level are returned at 
> different offsets and need to be converted for this particular 
> VisionPlus card.
>
> 
> ------------------------------------------------------------------------
> 
> *** dst_common.h.orig	2005-04-23 17:30:45.000000000 +0200
> --- dst_common.h	2005-04-23 17:31:02.000000000 +0200
> ***************
> *** 46,51 ****
> --- 46,52 ----
>   #define DST_TYPE_HAS_FW_1	8
>   #define DST_TYPE_HAS_FW_2	16
>   #define DST_TYPE_HAS_FW_3	32
> + #define DST_TYPE_CONV_LEVEL_SNR 64
>   
>   
>   
> 
> 
> ------------------------------------------------------------------------
> 
> *** dst.c.orig	2005-04-23 17:30:19.000000000 +0200
> --- dst.c	2005-04-23 17:30:56.000000000 +0200
> *************** MODULE_PARM_DESC(new_fw, "Support for th
> *** 58,63 ****
> --- 58,65 ----
>   #define ATTEMPT_TUNE	2
>   #define HAS_POWER	4
>   
> + #define ASIC_DELAY     50
> + 
>   static void dst_packsize(struct dst_state* state, int psize)
>   {
>   	union dst_gpio_packet bits;
> *************** int rdc_reset_state(struct dst_state *st
> *** 129,139 ****
>   		return -1;
>   	}
>   
> ! 	msleep(10);
>   
>   	if (dst_gpio_outb(state, RDC_8820_INT, RDC_8820_INT, RDC_8820_INT, NO_DELAY) < 0) {
>   		dprintk("%s: dst_gpio_outb ERROR !\n", __FUNCTION__);
> ! 		msleep(10);

This will be problematic on many cards .. The FTA cards are less 
susceptible to this syndrome. The CI based cards as well as DVB-C cards 
are very much susceptible ..

>   		return -1;
>   	}
>   
> --- 131,141 ----
>   		return -1;
>   	}
>   
> ! 	msleep(ASIC_DELAY);
>   
>   	if (dst_gpio_outb(state, RDC_8820_INT, RDC_8820_INT, RDC_8820_INT, NO_DELAY) < 0) {
>   		dprintk("%s: dst_gpio_outb ERROR !\n", __FUNCTION__);
> ! 		msleep(ASIC_DELAY);

Same here too ..
>   		return -1;
>   	}
>   
> *************** int dst_error_recovery(struct dst_state 
> *** 213,221 ****
>   {
>   	dprintk("%s: Trying to return from previous errors...\n", __FUNCTION__);
>   	dst_pio_disable(state);
> ! 	msleep(10);
>   	dst_pio_enable(state);
> ! 	msleep(10);
>   
>   	return 0;
>   }
> --- 215,223 ----
>   {
>   	dprintk("%s: Trying to return from previous errors...\n", __FUNCTION__);
>   	dst_pio_disable(state);
> ! 	msleep(ASIC_DELAY);

Same here too ..

>   	dst_pio_enable(state);
> ! 	msleep(ASIC_DELAY);
>   

Same here too ..
>   	return 0;
>   }
> *************** int dst_error_bailout(struct dst_state *
> *** 226,232 ****
>   	dprintk("%s: Trying to bailout from previous error...\n", __FUNCTION__);
>   	rdc_8820_reset(state);
>   	dst_pio_disable(state);
> ! 	msleep(10);

This would cause the error recovery mechanism to fail completely in case 
of an error ..

>   
>   	return 0;
>   }
> --- 228,234 ----
>   	dprintk("%s: Trying to bailout from previous error...\n", __FUNCTION__);
>   	rdc_8820_reset(state);
>   	dst_pio_disable(state);
> ! 	msleep(ASIC_DELAY);
>   
>   	return 0;
>   }
> *************** int dst_comm_init(struct dst_state* stat
> *** 245,250 ****
> --- 247,257 ----
>   		dprintk("%s: RDC 8820 State RESET Failed.\n", __FUNCTION__);
>   		return -1;
>   	}
> + 	msleep(ASIC_DELAY);
> + 	dst_wait_dst_ready(state,NO_DELAY);
> + 	dst_pio_enable(state);
> + 	msleep(ASIC_DELAY);
> + 

>   	return 0;
>   }
>   EXPORT_SYMBOL(dst_comm_init);
> *************** struct dst_types dst_tlist[] = {
> *** 684,689 ****
> --- 691,704 ----
>   		.dst_feature = 0
>   	},
>   
> + 	{
> +                 .device_id = "200103A",
> +                 .offset = 0,
> +                 .dst_type = DST_TYPE_IS_SAT,
> +                 .type_flags = DST_TYPE_HAS_SYMDIV | DST_TYPE_HAS_FW_1 | DST_TYPE_CONV_LEVEL_SNR,
> +                 .dst_feature = 0
> +         },
> + 
>   	{ }
>   
>   };
> *************** static int dst_get_device_id(struct dst_
> *** 702,707 ****
> --- 717,727 ----
>   
>   	device_type[7] = dst_check_sum(device_type, 7);
>   
> + 	if ((dst_comm_init(state)) < 0) {
> + 		dprintk("%s: DST Communication initialization failed.\n", __FUNCTION__);
> + 		return -1;
> + 	}
> + 

I don't think this is right, but i will check it up ..

Manu



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

  Powered by Linux