[linux-dvb] [patch] Add support for different tuning algorithms

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

 



Andrew de Quincey wrote:

>On Thursday 17 Nov 2005 20:23, Johannes Stezenbach wrote:
>  
>
>>Hi Andrew,
>>
>>On Thu, Nov 17, 2005 at 07:29:28PM +0000, Andrew de Quincey wrote:
>>    
>>
>>>How about:
>>>
>>>/**
>>> * When set, this flag will disable any zigzagging or other "normal"
>>>tuning * behaviour. Additionally, there will be no automatic monitoring
>>>of the lock * status, and hence no frontend events will be generated.
>>> */
>>>#define FE_TUNE_MODE_ONESHOT 0x01
>>>      
>>>
>>Don't forget the comment about open() resetting the flag.
>>
>>Please post the complete frontend.h API change
>>to the list again before comitting.
>>    
>>
>
>Here you go.
>
>  
>
>------------------------------------------------------------------------
>
>? tunealgo-2.patch
>? tunealgo-3.patch
>? tunealgo-4.patch
>? tunealgo-5.patch
>? tunealgo-6.pa
>? tunealgo-6.patch
>? tunealgo.patch
>? build-2.6/.tmp_versions
>Index: linux/drivers/media/dvb/bt8xx/dst.c
>===================================================================
>RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/bt8xx/dst.c,v
>retrieving revision 1.44
>diff -a -u -r1.44 dst.c
>--- linux/drivers/media/dvb/bt8xx/dst.c	24 Oct 2005 00:10:35 -0000	1.44
>+++ linux/drivers/media/dvb/bt8xx/dst.c	17 Nov 2005 21:03:12 -0000
>@@ -1341,30 +1341,39 @@
> 	return 0;
> }
> 
>-static int dst_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_parameters *p)
>+static int dst_set_frontend(struct dvb_frontend* fe,
>+			    struct dvb_frontend_parameters* p,
>+			    fe_tune_mode_flags_t mode_flags,
>+			    int *delay,
>+			    fe_status_t *status)
> {
> 	struct dst_state *state = fe->demodulator_priv;
> 
>-	dst_set_freq(state, p->frequency);
>-	dprintk(verbose, DST_DEBUG, 1, "Set Frequency=[%d]", p->frequency);
>-
>-	if (state->dst_type == DST_TYPE_IS_SAT) {
>-		if (state->type_flags & DST_TYPE_HAS_OBS_REGS)
>-			dst_set_inversion(state, p->inversion);
>-		dst_set_fec(state, p->u.qpsk.fec_inner);
>-		dst_set_symbolrate(state, p->u.qpsk.symbol_rate);
>-		dst_set_polarization(state);
>-		dprintk(verbose, DST_DEBUG, 1, "Set Symbolrate=[%d]", p->u.qpsk.symbol_rate);
>-
>-	} else if (state->dst_type == DST_TYPE_IS_TERR)
>-		dst_set_bandwidth(state, p->u.ofdm.bandwidth);
>-	else if (state->dst_type == DST_TYPE_IS_CABLE) {
>-		dst_set_fec(state, p->u.qam.fec_inner);
>-		dst_set_symbolrate(state, p->u.qam.symbol_rate);
>-		dst_set_modulation(state, p->u.qam.modulation);
>+	if (p != NULL) {
>+		dst_set_freq(state, p->frequency);
>+		dprintk(verbose, DST_DEBUG, 1, "Set Frequency=[%d]", p->frequency);
>+
>+		if (state->dst_type == DST_TYPE_IS_SAT) {
>+			if (state->type_flags & DST_TYPE_HAS_OBS_REGS)
>+				dst_set_inversion(state, p->inversion);
>+			dst_set_fec(state, p->u.qpsk.fec_inner);
>+			dst_set_symbolrate(state, p->u.qpsk.symbol_rate);
>+			dst_set_polarization(state);
>+			dprintk(verbose, DST_DEBUG, 1, "Set Symbolrate=[%d]", p->u.qpsk.symbol_rate);
>+
>+		} else if (state->dst_type == DST_TYPE_IS_TERR)
>+			dst_set_bandwidth(state, p->u.ofdm.bandwidth);
>+		else if (state->dst_type == DST_TYPE_IS_CABLE) {
>+			dst_set_fec(state, p->u.qam.fec_inner);
>+			dst_set_symbolrate(state, p->u.qam.symbol_rate);
>+			dst_set_modulation(state, p->u.qam.modulation);
>+		}
>+		dst_write_tuna(fe);
> 	}
>-	dst_write_tuna(fe);
> 
>+	dst_read_status(fe, status);
>+
>+	*delay = HZ/10;
> 	return 0;
> }
> 
>@@ -1445,7 +1454,7 @@
> 
> 	.release = dst_release,
> 	.init = dst_init,
>-	.set_frontend = dst_set_frontend,
>+	.tune = dst_set_frontend,
> 	.get_frontend = dst_get_frontend,
> 	.read_status = dst_read_status,
> 	.read_signal_strength = dst_read_signal_strength,
>@@ -1469,7 +1478,7 @@
> 
> 	.release = dst_release,
> 	.init = dst_init,
>-	.set_frontend = dst_set_frontend,
>+	.tune = dst_set_frontend,
> 	.get_frontend = dst_get_frontend,
> 	.read_status = dst_read_status,
> 	.read_signal_strength = dst_read_signal_strength,
>@@ -1496,7 +1505,7 @@
> 
> 	.release = dst_release,
> 	.init = dst_init,
>-	.set_frontend = dst_set_frontend,
>+	.tune = dst_set_frontend,
> 	.get_frontend = dst_get_frontend,
> 	.read_status = dst_read_status,
> 	.read_signal_strength = dst_read_signal_strength,
>  
>

Ack'd.


Manu



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

  Powered by Linux