Skip to contentSkip to conversation

Only use DVBv5 internally on frontend drivers

PATCH In review Mauro Carvalho Chehab 3 participants 102 messages Dec 30, 2011 – Jan 3, 2012 Page 2 of 2

Subsystems (3)
lore
Share & tools
lore
#82 lore raw

PATCH v2 82/94 tlg2300: convert set_fontend to use DVBv5 parameters

In reply to Mauro Carvalho Chehab

Instead of using dvb_frontend_parameters struct, that were designed for a subset of the supported standards, use the DVBv5 cache information.

Also, fill the supported delivery systems at dvb_frontend_ops struct.

---
 drivers/media/video/tlg2300/pd-common.h |    2 +-
 drivers/media/video/tlg2300/pd-dvb.c    |   23 ++++++++++++-----------
 2 files changed, 13 insertions(+), 12 deletions(-)
drivers/media/video/tlg2300/pd-common.h +1 -1
index 56564e6..5dd73b7 100644
@@ -140,7 +140,7 @@ struct pd_dvb_adapter {
 	u8			reserved[3];
 
 	/* data for power resume*/
-	struct dvb_frontend_parameters fe_param;
+	struct dtv_frontend_properties fe_param;
 
 	/* for channel scanning */
 	int		prev_freq;
drivers/media/video/tlg2300/pd-dvb.c +12 -11
index f864c17..7998811 100644
@@ -12,9 +12,9 @@
 static void dvb_urb_cleanup(struct pd_dvb_adapter *pd_dvb);
 
 static int dvb_bandwidth[][2] = {
-	{ TLG_BW_8, BANDWIDTH_8_MHZ },
-	{ TLG_BW_7, BANDWIDTH_7_MHZ },
-	{ TLG_BW_6, BANDWIDTH_6_MHZ }
+	{ TLG_BW_8, 8000000 },
+	{ TLG_BW_7, 7000000 },
+	{ TLG_BW_6, 6000000 }
 };
 static int dvb_bandwidth_length = ARRAY_SIZE(dvb_bandwidth);
 
@@ -146,9 +146,9 @@ static int fw_delay_overflow(struct pd_dvb_adapter *adapter)
 	return msec > 800 ? true : false;
 }
 
-static int poseidon_set_fe(struct dvb_frontend *fe,
-			struct dvb_frontend_parameters *fep)
+static int poseidon_set_fe(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *fep = &fe->dtv_property_cache;
 	s32 ret = 0, cmd_status = 0;
 	s32 i, bandwidth = -1;
 	struct poseidon *pd = fe->demodulator_priv;
@@ -159,7 +159,7 @@ static int poseidon_set_fe(struct dvb_frontend *fe,
 
 	mutex_lock(&pd->lock);
 	for (i = 0; i < dvb_bandwidth_length; i++)
-		if (fep->u.ofdm.bandwidth == dvb_bandwidth[i][1])
+		if (fep->bandwidth_hz == dvb_bandwidth[i][1])
 			bandwidth = dvb_bandwidth[i][0];
 
 	if (check_scan_ok(fep->frequency, bandwidth, pd_dvb)) {
@@ -210,7 +210,7 @@ static int pm_dvb_resume(struct poseidon *pd)
 
 	poseidon_check_mode_dvbt(pd);
 	msleep(300);
-	poseidon_set_fe(&pd_dvb->dvb_fe, &pd_dvb->fe_param);
+	poseidon_set_fe(&pd_dvb->dvb_fe);
 
 	dvb_start_streaming(pd_dvb);
 	return 0;
@@ -227,12 +227,12 @@ static s32 poseidon_fe_init(struct dvb_frontend *fe)
 	pd->pm_resume  = pm_dvb_resume;
 #endif
 	memset(&pd_dvb->fe_param, 0,
-			sizeof(struct dvb_frontend_parameters));
+			sizeof(struct dtv_frontend_properties));
 	return 0;
 }
 
 static int poseidon_get_fe(struct dvb_frontend *fe,
-			struct dvb_frontend_parameters *fep)
+			struct dtv_frontend_properties *fep)
 {
 	struct poseidon *pd = fe->demodulator_priv;
 	struct pd_dvb_adapter *pd_dvb = &pd->dvb_data;
@@ -332,6 +332,7 @@ static int poseidon_read_unc_blocks(struct dvb_frontend *fe, u32 *unc)
 }
 
 static struct dvb_frontend_ops poseidon_frontend_ops = {
+	.delsys = { SYS_DVBT },
 	.info = {
 		.name		= "Poseidon DVB-T",
 		.type		= FE_OFDM,
@@ -353,8 +354,8 @@ static struct dvb_frontend_ops poseidon_frontend_ops = {
 	.init = poseidon_fe_init,
 	.sleep = poseidon_fe_sleep,
 
-	.set_frontend_legacy = poseidon_set_fe,
-	.get_frontend_legacy = poseidon_get_fe,
+	.set_frontend = poseidon_set_fe,
+	.get_frontend = poseidon_get_fe,
 	.get_tune_settings = poseidon_fe_get_tune_settings,
 
 	.read_status	= poseidon_read_status,
Signature · 1 line
1.7.8.352.g876a6
#83 lore raw

PATCH v2 83/94 dvb-core: remove get|set_frontend_legacy

In reply to Mauro Carvalho Chehab

Now that all drivers were converted, we can get rid of those emulation calls.

---
 drivers/media/dvb/dvb-core/dvb_frontend.c |   24 ++++--------------------
 drivers/media/dvb/dvb-core/dvb_frontend.h |    2 --
 2 files changed, 4 insertions(+), 22 deletions(-)
drivers/media/dvb/dvb-core/dvb_frontend.c +4 -20
index 1eefb91..5bb6c1d 100644
@@ -145,7 +145,7 @@ static int dtv_get_frontend(struct dvb_frontend *fe,
 
 static bool has_get_frontend(struct dvb_frontend *fe)
 {
-	return fe->ops.get_frontend || fe->ops.get_frontend_legacy;
+	return fe->ops.get_frontend;
 }
 
 static void dvb_frontend_add_event(struct dvb_frontend *fe, fe_status_t status)
@@ -361,8 +361,6 @@ static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wra
 		fepriv->parameters_in.inversion = fepriv->inversion;
 	if (fe->ops.set_frontend)
 		fe_set_err = fe->ops.set_frontend(fe);
-	else if (fe->ops.set_frontend_legacy)
-		fe_set_err = fe->ops.set_frontend_legacy(fe, &fepriv->parameters_in);
 	fepriv->parameters_out = fepriv->parameters_in;
 	if (fe_set_err < 0) {
 		fepriv->state = FESTATE_ERROR;
@@ -394,9 +392,6 @@ static void dvb_frontend_swzigzag(struct dvb_frontend *fe)
 		if (fepriv->state & FESTATE_RETUNE) {
 			if (fe->ops.set_frontend)
 				retval = fe->ops.set_frontend(fe);
-			else if (fe->ops.set_frontend_legacy)
-				retval = fe->ops.set_frontend_legacy(fe,
-							&fepriv->parameters_in);
 			fepriv->parameters_out = fepriv->parameters_in;
 			if (retval < 0)
 				fepriv->state = FESTATE_ERROR;
@@ -1271,7 +1266,6 @@ static int dtv_get_frontend(struct dvb_frontend *fe,
 	const struct dtv_frontend_properties *cache = &fe->dtv_property_cache;
 	struct dtv_frontend_properties tmp_cache;
 	struct dvb_frontend_parameters tmp_out;
-	bool fill_cache = (c != NULL);
 	bool fill_params = (p_out != NULL);
 	int r;
 
@@ -1283,7 +1277,6 @@ static int dtv_get_frontend(struct dvb_frontend *fe,
 	else
 		memcpy(c, cache, sizeof(*c));
 
-	/* Then try the DVBv5 one */
 	if (fe->ops.get_frontend) {
 		r = fe->ops.get_frontend(fe, c);
 		if (unlikely(r < 0))
@@ -1293,17 +1286,8 @@ static int dtv_get_frontend(struct dvb_frontend *fe,
 		return 0;
 	}
 
-	/* As no DVBv5 call exists, use the DVBv3 one */
-	if (fe->ops.get_frontend_legacy) {
-		r = fe->ops.get_frontend_legacy(fe, p_out);
-		if (unlikely(r < 0))
-			return r;
-		if (fill_cache)
-			dtv_property_cache_sync(fe, c, p_out);
-		return 0;
-	}
-
-	return -EOPNOTSUPP;
+	/* As everything is in cache, this is always supported */
+	return 0;
 }
 
 static int dvb_frontend_ioctl_legacy(struct file *file,
@@ -1758,7 +1742,7 @@ static int dvb_frontend_ioctl_properties(struct file *file,
 
 		/*
 		 * Fills the cache out struct with the cache contents, plus
-		 * the data retrieved from get_frontend/get_frontend_legacy.
+		 * the data retrieved from get_frontend.
 		 */
 		dtv_get_frontend(fe, &cache_out, NULL);
 		for (i = 0; i < tvps->num; i++) {
drivers/media/dvb/dvb-core/dvb_frontend.h +0 -2
index 06ec17a..23456b3 100644
@@ -282,11 +282,9 @@ struct dvb_frontend_ops {
 	enum dvbfe_algo (*get_frontend_algo)(struct dvb_frontend *fe);
 
 	/* these two are only used for the swzigzag code */
-	int (*set_frontend_legacy)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params);
 	int (*set_frontend)(struct dvb_frontend* fe);
 	int (*get_tune_settings)(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* settings);
 
-	int (*get_frontend_legacy)(struct dvb_frontend *fe, struct dvb_frontend_parameters *params);
 	int (*get_frontend)(struct dvb_frontend *fe, struct dtv_frontend_properties *props);
 
 	int (*read_status)(struct dvb_frontend* fe, fe_status_t* status);
Signature · 1 line
1.7.8.352.g876a6
#84 lore raw

PATCH v2 84/94 dvb: simplify get_tune_settings() struct

In reply to Mauro Carvalho Chehab

In the past, dvb_frontent_parameters were passed inside the struct where get_tuner_settings should store their result.

This is not needed anymore, as all parameters needed are stored already at the fe property cache. So, use it, where needed.

---
 drivers/media/dvb/dvb-core/dvb_frontend.c |    3 ---
 drivers/media/dvb/dvb-core/dvb_frontend.h |    1 -
 drivers/media/dvb/frontends/s5h1420.c     |   16 ++++++++--------
 drivers/media/dvb/frontends/stv0299.c     |    9 +++++----
 drivers/media/dvb/frontends/tda10086.c    |   16 +++++++++-------
 5 files changed, 22 insertions(+), 23 deletions(-)
drivers/media/dvb/dvb-core/dvb_frontend.c +0 -3
index 5bb6c1d..bf733c4 100644
@@ -1977,13 +1977,10 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
 		fepriv->parameters_out = fepriv->parameters_in;
 
 		memset(&fetunesettings, 0, sizeof(struct dvb_frontend_tune_settings));
-		memcpy(&fetunesettings.parameters, parg,
-		       sizeof (struct dvb_frontend_parameters));
 
 		/* force auto frequency inversion if requested */
 		if (dvb_force_auto_inversion) {
 			fepriv->parameters_in.inversion = INVERSION_AUTO;
-			fetunesettings.parameters.inversion = INVERSION_AUTO;
 		}
 		if (fe->ops.info.type == FE_OFDM) {
 			/* without hierarchical coding code_rate_LP is irrelevant,
drivers/media/dvb/dvb-core/dvb_frontend.h +0 -1
index 23456b3..4b49bcd 100644
@@ -52,7 +52,6 @@ struct dvb_frontend_tune_settings {
 	int min_delay_ms;
 	int step_size;
 	int max_drift;
-	struct dvb_frontend_parameters parameters;
 };
 
 struct dvb_frontend;
drivers/media/dvb/frontends/s5h1420.c +8 -8
index 3bdfcbe..0726494 100644
@@ -639,7 +639,6 @@ static int s5h1420_set_frontend(struct dvb_frontend* fe)
 	dprintk("enter %s\n", __func__);
 
 	/* check if we should do a fast-tune */
-	memcpy(&fesettings.parameters, p, sizeof(struct dtv_frontend_properties));
 	s5h1420_get_tune_settings(fe, &fesettings);
 	frequency_delta = p->frequency - state->tunedfreq;
 	if ((frequency_delta > -fesettings.max_drift) &&
@@ -782,29 +781,30 @@ static int s5h1420_get_frontend(struct dvb_frontend* fe,
 static int s5h1420_get_tune_settings(struct dvb_frontend* fe,
 				     struct dvb_frontend_tune_settings* fesettings)
 {
-	if (fesettings->parameters.u.qpsk.symbol_rate > 20000000) {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
+	if (p->symbol_rate > 20000000) {
 		fesettings->min_delay_ms = 50;
 		fesettings->step_size = 2000;
 		fesettings->max_drift = 8000;
-	} else if (fesettings->parameters.u.qpsk.symbol_rate > 12000000) {
+	} else if (p->symbol_rate > 12000000) {
 		fesettings->min_delay_ms = 100;
 		fesettings->step_size = 1500;
 		fesettings->max_drift = 9000;
-	} else if (fesettings->parameters.u.qpsk.symbol_rate > 8000000) {
+	} else if (p->symbol_rate > 8000000) {
 		fesettings->min_delay_ms = 100;
 		fesettings->step_size = 1000;
 		fesettings->max_drift = 8000;
-	} else if (fesettings->parameters.u.qpsk.symbol_rate > 4000000) {
+	} else if (p->symbol_rate > 4000000) {
 		fesettings->min_delay_ms = 100;
 		fesettings->step_size = 500;
 		fesettings->max_drift = 7000;
-	} else if (fesettings->parameters.u.qpsk.symbol_rate > 2000000) {
+	} else if (p->symbol_rate > 2000000) {
 		fesettings->min_delay_ms = 200;
-		fesettings->step_size = (fesettings->parameters.u.qpsk.symbol_rate / 8000);
+		fesettings->step_size = (p->symbol_rate / 8000);
 		fesettings->max_drift = 14 * fesettings->step_size;
 	} else {
 		fesettings->min_delay_ms = 200;
-		fesettings->step_size = (fesettings->parameters.u.qpsk.symbol_rate / 8000);
+		fesettings->step_size = (p->symbol_rate / 8000);
 		fesettings->max_drift = 18 * fesettings->step_size;
 	}
 
drivers/media/dvb/frontends/stv0299.c +5 -4
index abf4bff..ad6f3a6 100644
@@ -647,14 +647,15 @@ static int stv0299_i2c_gate_ctrl(struct dvb_frontend* fe, int enable)
 static int stv0299_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings)
 {
 	struct stv0299_state* state = fe->demodulator_priv;
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 
 	fesettings->min_delay_ms = state->config->min_delay_ms;
-	if (fesettings->parameters.u.qpsk.symbol_rate < 10000000) {
-		fesettings->step_size = fesettings->parameters.u.qpsk.symbol_rate / 32000;
+	if (p->symbol_rate < 10000000) {
+		fesettings->step_size = p->symbol_rate / 32000;
 		fesettings->max_drift = 5000;
 	} else {
-		fesettings->step_size = fesettings->parameters.u.qpsk.symbol_rate / 16000;
-		fesettings->max_drift = fesettings->parameters.u.qpsk.symbol_rate / 2000;
+		fesettings->step_size = p->symbol_rate / 16000;
+		fesettings->max_drift = p->symbol_rate / 2000;
 	}
 	return 0;
 }
drivers/media/dvb/frontends/tda10086.c +9 -7
index 81fa57b..cfc6e0e 100644
@@ -664,29 +664,31 @@ static int tda10086_i2c_gate_ctrl(struct dvb_frontend* fe, int enable)
 
 static int tda10086_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings)
 {
-	if (fesettings->parameters.u.qpsk.symbol_rate > 20000000) {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
+
+	if (p->symbol_rate > 20000000) {
 		fesettings->min_delay_ms = 50;
 		fesettings->step_size = 2000;
 		fesettings->max_drift = 8000;
-	} else if (fesettings->parameters.u.qpsk.symbol_rate > 12000000) {
+	} else if (p->symbol_rate > 12000000) {
 		fesettings->min_delay_ms = 100;
 		fesettings->step_size = 1500;
 		fesettings->max_drift = 9000;
-	} else if (fesettings->parameters.u.qpsk.symbol_rate > 8000000) {
+	} else if (p->symbol_rate > 8000000) {
 		fesettings->min_delay_ms = 100;
 		fesettings->step_size = 1000;
 		fesettings->max_drift = 8000;
-	} else if (fesettings->parameters.u.qpsk.symbol_rate > 4000000) {
+	} else if (p->symbol_rate > 4000000) {
 		fesettings->min_delay_ms = 100;
 		fesettings->step_size = 500;
 		fesettings->max_drift = 7000;
-	} else if (fesettings->parameters.u.qpsk.symbol_rate > 2000000) {
+	} else if (p->symbol_rate > 2000000) {
 		fesettings->min_delay_ms = 200;
-		fesettings->step_size = (fesettings->parameters.u.qpsk.symbol_rate / 8000);
+		fesettings->step_size = p->symbol_rate / 8000;
 		fesettings->max_drift = 14 * fesettings->step_size;
 	} else {
 		fesettings->min_delay_ms = 200;
-		fesettings->step_size = (fesettings->parameters.u.qpsk.symbol_rate / 8000);
+		fesettings->step_size =  p->symbol_rate / 8000;
 		fesettings->max_drift = 18 * fesettings->step_size;
 	}
 
Signature · 1 line
1.7.8.352.g876a6
#85 lore raw

PATCH v2 85/94 dvb-core: Don't pass DVBv3 parameters on tune() fops

In reply to Mauro Carvalho Chehab

As all parameters are passed via DVBv5 to the frontends, there's no need to pass them again via fops. Also, most drivers weren't using it anyway. So, instead, just pass a parameter to indicate if the hardware algorithm wants the driver to re-tune or not.

---
 drivers/media/dvb/bt8xx/dst.c             |   19 ++++++++++---------
 drivers/media/dvb/dvb-core/dvb_frontend.c |    9 +++------
 drivers/media/dvb/dvb-core/dvb_frontend.h |    2 +-
 drivers/media/dvb/frontends/cx24116.c     |    4 ++--
 drivers/media/dvb/frontends/cx24123.c     |    4 ++--
 drivers/media/dvb/frontends/ds3000.c      |    4 ++--
 drivers/media/dvb/frontends/mb86a20s.c    |    4 ++--
 drivers/media/dvb/frontends/s921.c        |    4 ++--
 drivers/media/dvb/pt1/va1j5jf8007s.c      |    4 ++--
 drivers/media/dvb/pt1/va1j5jf8007t.c      |    4 ++--
 10 files changed, 28 insertions(+), 30 deletions(-)
drivers/media/dvb/bt8xx/dst.c +10 -9
index 7d60893..80b1f2a 100644
@@ -1643,31 +1643,32 @@ static int dst_set_frontend(struct dvb_frontend *fe)
 }
 
 static int dst_tune_frontend(struct dvb_frontend* fe,
-			    struct dvb_frontend_parameters* p,
+			    bool re_tune,
 			    unsigned int mode_flags,
 			    unsigned int *delay,
 			    fe_status_t *status)
 {
 	struct dst_state *state = fe->demodulator_priv;
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 
-	if (p != NULL) {
+	if (re_tune) {
 		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_fec(state, p->fec_inner);
+			dst_set_symbolrate(state, p->symbol_rate);
 			dst_set_polarization(state);
-			dprintk(verbose, DST_DEBUG, 1, "Set Symbolrate=[%d]", p->u.qpsk.symbol_rate);
+			dprintk(verbose, DST_DEBUG, 1, "Set Symbolrate=[%d]", p->symbol_rate);
 
 		} else if (state->dst_type == DST_TYPE_IS_TERR)
-			dst_set_bandwidth(state, p->u.ofdm.bandwidth);
+			dst_set_bandwidth(state, p->bandwidth_hz);
 		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_set_fec(state, p->fec_inner);
+			dst_set_symbolrate(state, p->symbol_rate);
+			dst_set_modulation(state, p->modulation);
 		}
 		dst_write_tuna(fe);
 	}
drivers/media/dvb/dvb-core/dvb_frontend.c +3 -6
index bf733c4..8cdc666 100644
@@ -547,7 +547,7 @@ static int dvb_frontend_thread(void *data)
 	fe_status_t s;
 	enum dvbfe_algo algo;
 
-	struct dvb_frontend_parameters *params;
+	bool re_tune = false;
 
 	dprintk("%s\n", __func__);
 
@@ -596,18 +596,15 @@ restart:
 			switch (algo) {
 			case DVBFE_ALGO_HW:
 				dprintk("%s: Frontend ALGO = DVBFE_ALGO_HW\n", __func__);
-				params = NULL; /* have we been asked to RETUNE ? */
 
 				if (fepriv->state & FESTATE_RETUNE) {
 					dprintk("%s: Retune requested, FESTATE_RETUNE\n", __func__);
-					params = &fepriv->parameters_in;
+					re_tune = true;
 					fepriv->state = FESTATE_TUNED;
 				}
 
 				if (fe->ops.tune)
-					fe->ops.tune(fe, params, fepriv->tune_mode_flags, &fepriv->delay, &s);
-				if (params)
-					fepriv->parameters_out = *params;
+					fe->ops.tune(fe, re_tune, fepriv->tune_mode_flags, &fepriv->delay, &s);
 
 				if (s != fepriv->status && !(fepriv->tune_mode_flags & FE_TUNE_MODE_ONESHOT)) {
 					dprintk("%s: state changed, adding current state\n", __func__);
drivers/media/dvb/dvb-core/dvb_frontend.h +1 -1
index 4b49bcd..e10fe77 100644
@@ -273,7 +273,7 @@ struct dvb_frontend_ops {
 
 	/* if this is set, it overrides the default swzigzag */
 	int (*tune)(struct dvb_frontend* fe,
-		    struct dvb_frontend_parameters* params,
+		    bool re_tune,
 		    unsigned int mode_flags,
 		    unsigned int *delay,
 		    fe_status_t *status);
drivers/media/dvb/frontends/cx24116.c +2 -2
index f24819a..e29de1c 100644
@@ -1440,7 +1440,7 @@ tuned:  /* Set/Reset B/W */
 	return cx24116_cmd_execute(fe, &cmd);
 }
 
-static int cx24116_tune(struct dvb_frontend *fe, struct dvb_frontend_parameters *params,
+static int cx24116_tune(struct dvb_frontend *fe, bool re_tune,
 	unsigned int mode_flags, unsigned int *delay, fe_status_t *status)
 {
 	/*
@@ -1452,7 +1452,7 @@ static int cx24116_tune(struct dvb_frontend *fe, struct dvb_frontend_parameters
 	 */
 
 	*delay = HZ / 5;
-	if (params) {
+	if (re_tune) {
 		int ret = cx24116_set_frontend(fe);
 		if (ret)
 			return ret;
drivers/media/dvb/frontends/cx24123.c +2 -2
index a8af0bd..faafb1f 100644
@@ -1006,14 +1006,14 @@ static int cx24123_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone)
 }
 
 static int cx24123_tune(struct dvb_frontend *fe,
-			struct dvb_frontend_parameters *params,
+			bool re_tune,
 			unsigned int mode_flags,
 			unsigned int *delay,
 			fe_status_t *status)
 {
 	int retval = 0;
 
-	if (params != NULL)
+	if (re_tune)
 		retval = cx24123_set_frontend(fe);
 
 	if (!(mode_flags & FE_TUNE_MODE_ONESHOT))
drivers/media/dvb/frontends/ds3000.c +2 -2
index f8fa80a..c6a43c4 100644
@@ -1205,12 +1205,12 @@ static int ds3000_set_frontend(struct dvb_frontend *fe)
 }
 
 static int ds3000_tune(struct dvb_frontend *fe,
-			struct dvb_frontend_parameters *p,
+			bool re_tune,
 			unsigned int mode_flags,
 			unsigned int *delay,
 			fe_status_t *status)
 {
-	if (p) {
+	if (re_tune) {
 		int ret = ds3000_set_frontend(fe);
 		if (ret)
 			return ret;
drivers/media/dvb/frontends/mb86a20s.c +2 -2
index a67d7ef..d71d6ee 100644
@@ -540,7 +540,7 @@ static int mb86a20s_get_frontend(struct dvb_frontend *fe,
 }
 
 static int mb86a20s_tune(struct dvb_frontend *fe,
-			struct dvb_frontend_parameters *params,
+			bool re_tune,
 			unsigned int mode_flags,
 			unsigned int *delay,
 			fe_status_t *status)
@@ -549,7 +549,7 @@ static int mb86a20s_tune(struct dvb_frontend *fe,
 
 	dprintk("\n");
 
-	if (params != NULL)
+	if (re_tune)
 		rc = mb86a20s_set_frontend(fe);
 
 	if (!(mode_flags & FE_TUNE_MODE_ONESHOT))
drivers/media/dvb/frontends/s921.c +2 -2
index 4c452f4..2e15f92 100644
@@ -445,7 +445,7 @@ static int s921_get_frontend(struct dvb_frontend *fe,
 }
 
 static int s921_tune(struct dvb_frontend *fe,
-			struct dvb_frontend_parameters *params,
+			bool re_tune,
 			unsigned int mode_flags,
 			unsigned int *delay,
 			fe_status_t *status)
@@ -454,7 +454,7 @@ static int s921_tune(struct dvb_frontend *fe,
 
 	dprintk("\n");
 
-	if (params != NULL)
+	if (re_tune)
 		rc = s921_set_frontend(fe);
 
 	if (!(mode_flags & FE_TUNE_MODE_ONESHOT))
drivers/media/dvb/pt1/va1j5jf8007s.c +2 -2
index 451641c..78344e3 100644
@@ -385,7 +385,7 @@ va1j5jf8007s_check_ts_id(struct va1j5jf8007s_state *state, int *lock)
 
 static int
 va1j5jf8007s_tune(struct dvb_frontend *fe,
-		  struct dvb_frontend_parameters *params,
+		  bool re_tune,
 		  unsigned int mode_flags,  unsigned int *delay,
 		  fe_status_t *status)
 {
@@ -395,7 +395,7 @@ va1j5jf8007s_tune(struct dvb_frontend *fe,
 
 	state = fe->demodulator_priv;
 
-	if (params != NULL)
+	if (re_tune)
 		state->tune_state = VA1J5JF8007S_SET_FREQUENCY_1;
 
 	switch (state->tune_state) {
drivers/media/dvb/pt1/va1j5jf8007t.c +2 -2
index 0f085c3..c642820 100644
@@ -264,7 +264,7 @@ static int va1j5jf8007t_check_modulation(struct va1j5jf8007t_state *state,
 
 static int
 va1j5jf8007t_tune(struct dvb_frontend *fe,
-		  struct dvb_frontend_parameters *params,
+		  bool re_tune,
 		  unsigned int mode_flags,  unsigned int *delay,
 		  fe_status_t *status)
 {
@@ -274,7 +274,7 @@ va1j5jf8007t_tune(struct dvb_frontend *fe,
 
 	state = fe->demodulator_priv;
 
-	if (params != NULL)
+	if (re_tune)
 		state->tune_state = VA1J5JF8007T_SET_FREQUENCY;
 
 	switch (state->tune_state) {
Signature · 1 line
1.7.8.352.g876a6
#86 lore raw

PATCH v2 86/94 dvb: don't pass a DVBv3 parameter for search() fops

In reply to Mauro Carvalho Chehab

Just like the other DVB algorithms, drivers should use the DVBv5 way to retrieve parameters: via the cache struct.

Actually, several drivers were partially using the DVBv3 struct and partially using the DVBv5 way, with is confusing and may lead into troubles.

---
 drivers/media/dvb/dvb-core/dvb_frontend.c   |    2 +-
 drivers/media/dvb/dvb-core/dvb_frontend.h   |    2 +-
 drivers/media/dvb/frontends/cxd2820r_core.c |    3 +--
 drivers/media/dvb/frontends/mb86a16.c       |    6 +++---
 drivers/media/dvb/frontends/stb0899_drv.c   |    6 +++---
 drivers/media/dvb/frontends/stv0900_core.c  |    3 +--
 drivers/media/dvb/frontends/stv090x.c       |    8 ++++----
 7 files changed, 14 insertions(+), 16 deletions(-)
drivers/media/dvb/dvb-core/dvb_frontend.c +1 -1
index 8cdc666..18a7e23 100644
@@ -628,7 +628,7 @@ restart:
 				 */
 				if (fepriv->algo_status & DVBFE_ALGO_SEARCH_AGAIN) {
 					if (fe->ops.search) {
-						fepriv->algo_status = fe->ops.search(fe, &fepriv->parameters_in);
+						fepriv->algo_status = fe->ops.search(fe);
 						/* We did do a search as was requested, the flags are
 						 * now unset as well and has the flags wrt to search.
 						 */
drivers/media/dvb/dvb-core/dvb_frontend.h +1 -1
index e10fe77..79f01ce 100644
@@ -306,7 +306,7 @@ struct dvb_frontend_ops {
 	/* These callbacks are for devices that implement their own
 	 * tuning algorithms, rather than a simple swzigzag
 	 */
-	enum dvbfe_search (*search)(struct dvb_frontend *fe, struct dvb_frontend_parameters *p);
+	enum dvbfe_search (*search)(struct dvb_frontend *fe);
 	int (*track)(struct dvb_frontend *fe, struct dvb_frontend_parameters *p);
 
 	struct dvb_tuner_ops tuner_ops;
drivers/media/dvb/frontends/cxd2820r_core.c +1 -2
index 5b2d840..96ceed7 100644
@@ -653,8 +653,7 @@ static int cxd2820r_get_tune_settings(struct dvb_frontend *fe,
 	return ret;
 }
 
-static enum dvbfe_search cxd2820r_search(struct dvb_frontend *fe,
-	struct dvb_frontend_parameters *p)
+static enum dvbfe_search cxd2820r_search(struct dvb_frontend *fe)
 {
 	struct cxd2820r_priv *priv = fe->demodulator_priv;
 	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
drivers/media/dvb/frontends/mb86a16.c +3 -3
index 292ba7b..45844f4 100644
@@ -1621,13 +1621,13 @@ err:
 	return -EREMOTEIO;
 }
 
-static enum dvbfe_search mb86a16_search(struct dvb_frontend *fe,
-					struct dvb_frontend_parameters *p)
+static enum dvbfe_search mb86a16_search(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct mb86a16_state *state = fe->demodulator_priv;
 
 	state->frequency = p->frequency / 1000;
-	state->srate = p->u.qpsk.symbol_rate / 1000;
+	state->srate = p->symbol_rate / 1000;
 
 	if (!mb86a16_set_fe(state)) {
 		dprintk(verbose, MB86A16_ERROR, 1, "Successfully acquired LOCK");
drivers/media/dvb/frontends/stb0899_drv.c +3 -3
index 0c47a99..93afc79 100644
@@ -1431,7 +1431,7 @@ static void stb0899_set_iterations(struct stb0899_state *state)
 	stb0899_write_s2reg(state, STB0899_S2FEC, STB0899_BASE_MAX_ITER, STB0899_OFF0_MAX_ITER, reg);
 }
 
-static enum dvbfe_search stb0899_search(struct dvb_frontend *fe, struct dvb_frontend_parameters *p)
+static enum dvbfe_search stb0899_search(struct dvb_frontend *fe)
 {
 	struct stb0899_state *state = fe->demodulator_priv;
 	struct stb0899_params *i_params = &state->params;
@@ -1441,8 +1441,8 @@ static enum dvbfe_search stb0899_search(struct dvb_frontend *fe, struct dvb_fron
 
 	u32 SearchRange, gain;
 
-	i_params->freq	= p->frequency;
-	i_params->srate = p->u.qpsk.symbol_rate;
+	i_params->freq	= props->frequency;
+	i_params->srate = props->symbol_rate;
 	state->delsys = props->delivery_system;
 	dprintk(state->verbose, FE_DEBUG, 1, "delivery system=%d", state->delsys);
 
drivers/media/dvb/frontends/stv0900_core.c +1 -2
index 3f7e62f..83e9a81 100644
@@ -1558,8 +1558,7 @@ static int stv0900_status(struct stv0900_internal *intp,
 	return locked;
 }
 
-static enum dvbfe_search stv0900_search(struct dvb_frontend *fe,
-					struct dvb_frontend_parameters *params)
+static enum dvbfe_search stv0900_search(struct dvb_frontend *fe)
 {
 	struct stv0900_state *state = fe->demodulator_priv;
 	struct stv0900_internal *intp = state->internal;
drivers/media/dvb/frontends/stv090x.c +4 -4
index 574ef67..dd8ded5 100644
@@ -3427,17 +3427,17 @@ err:
 	return -1;
 }
 
-static enum dvbfe_search stv090x_search(struct dvb_frontend *fe, struct dvb_frontend_parameters *p)
+static enum dvbfe_search stv090x_search(struct dvb_frontend *fe)
 {
 	struct stv090x_state *state = fe->demodulator_priv;
 	struct dtv_frontend_properties *props = &fe->dtv_property_cache;
 
-	if (p->frequency == 0)
+	if (props->frequency == 0)
 		return DVBFE_ALGO_SEARCH_INVALID;
 
 	state->delsys = props->delivery_system;
-	state->frequency = p->frequency;
-	state->srate = p->u.qpsk.symbol_rate;
+	state->frequency = props->frequency;
+	state->srate = props->symbol_rate;
 	state->search_mode = STV090x_SEARCH_AUTO;
 	state->algo = STV090x_COLD_SEARCH;
 	state->fec = STV090x_PRERR;
Signature · 1 line
1.7.8.352.g876a6
#87 lore raw

PATCH v2 87/94 dvb: remove the track() fops

In reply to Mauro Carvalho Chehab

This callback is not used anywhere. Maybe it were used in the past to optimize the custom algo, but, as it is not used anymore, let's just remove it.

If later needed, some patch may re-add it with a proper implementation.

---
 drivers/media/dvb/dvb-core/dvb_frontend.c  |    5 +----
 drivers/media/dvb/dvb-core/dvb_frontend.h  |    1 -
 drivers/media/dvb/frontends/stb0899_drv.c  |   21 ---------------------
 drivers/media/dvb/frontends/stv0900_core.c |    7 -------
 4 files changed, 1 insertions(+), 33 deletions(-)
drivers/media/dvb/dvb-core/dvb_frontend.c +1 -4
index 18a7e23..68d284b 100644
@@ -637,10 +637,7 @@ restart:
 					}
 				}
 				/* Track the carrier if the search was successful */
-				if (fepriv->algo_status == DVBFE_ALGO_SEARCH_SUCCESS) {
-					if (fe->ops.track)
-						fe->ops.track(fe, &fepriv->parameters_in);
-				} else {
+				if (fepriv->algo_status != DVBFE_ALGO_SEARCH_SUCCESS) {
 					fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN;
 					fepriv->delay = HZ / 2;
 				}
drivers/media/dvb/dvb-core/dvb_frontend.h +0 -1
index 79f01ce..52efcbd 100644
@@ -307,7 +307,6 @@ struct dvb_frontend_ops {
 	 * tuning algorithms, rather than a simple swzigzag
 	 */
 	enum dvbfe_search (*search)(struct dvb_frontend *fe);
-	int (*track)(struct dvb_frontend *fe, struct dvb_frontend_parameters *p);
 
 	struct dvb_tuner_ops tuner_ops;
 	struct analog_demod_ops analog_ops;
drivers/media/dvb/frontends/stb0899_drv.c +0 -21
index 93afc79..9fad627 100644
@@ -1568,26 +1568,6 @@ static enum dvbfe_search stb0899_search(struct dvb_frontend *fe)
 
 	return DVBFE_ALGO_SEARCH_ERROR;
 }
-/*
- * stb0899_track
- * periodically check the signal level against a specified
- * threshold level and perform derotator centering.
- * called once we have a lock from a successful search
- * event.
- *
- * Will be called periodically called to maintain the
- * lock.
- *
- * Will be used to get parameters as well as info from
- * the decoded baseband header
- *
- * Once a new lock has established, the internal state
- * frequency (internal->freq) is updated
- */
-static int stb0899_track(struct dvb_frontend *fe, struct dvb_frontend_parameters *p)
-{
-	return 0;
-}
 
 static int stb0899_get_frontend(struct dvb_frontend *fe, struct dtv_frontend_properties *p)
 {
@@ -1647,7 +1627,6 @@ static struct dvb_frontend_ops stb0899_ops = {
 
 	.get_frontend_algo		= stb0899_frontend_algo,
 	.search				= stb0899_search,
-	.track				= stb0899_track,
 	.get_frontend                   = stb0899_get_frontend,
 
 
drivers/media/dvb/frontends/stv0900_core.c +0 -7
index 83e9a81..8af1e624 100644
@@ -1658,12 +1658,6 @@ static int stv0900_read_status(struct dvb_frontend *fe, enum fe_status *status)
 	return 0;
 }
 
-static int stv0900_track(struct dvb_frontend *fe,
-			struct dvb_frontend_parameters *p)
-{
-	return 0;
-}
-
 static int stv0900_stop_ts(struct dvb_frontend *fe, int stop_ts)
 {
 
@@ -1891,7 +1885,6 @@ static struct dvb_frontend_ops stv0900_ops = {
 	.diseqc_recv_slave_reply	= stv0900_recv_slave_reply,
 	.set_tone			= stv0900_set_tone,
 	.search				= stv0900_search,
-	.track				= stv0900_track,
 	.read_status			= stv0900_read_status,
 	.read_ber			= stv0900_read_ber,
 	.read_signal_strength		= stv0900_read_signal_strength,
Signature · 1 line
1.7.8.352.g876a6
#88 lore raw

PATCH v2 88/94 dvb-core: don't use fe_bandwidth_t on driver

In reply to Mauro Carvalho Chehab

Now that everybody is talking DVBv5 API dialect, using this DVBv3 macro internally is not ok.

---
 drivers/media/dvb/bt8xx/dst_common.h    |    2 +-
 drivers/media/dvb/frontends/dib3000mc.c |    2 +-
 drivers/media/dvb/frontends/dib7000m.c  |    2 +-
 drivers/media/dvb/frontends/tda10048.c  |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/media/dvb/bt8xx/dst_common.h +1 -1
index d88cf2a..d70d98f 100644
@@ -124,7 +124,7 @@ struct dst_state {
 	u16 decode_snr;
 	unsigned long cur_jiff;
 	u8 k22;
-	fe_bandwidth_t bandwidth;
+	u32 bandwidth;
 	u32 dst_hw_cap;
 	u8 dst_fw_version;
 	fe_sec_mini_cmd_t minicmd;
drivers/media/dvb/frontends/dib3000mc.c +1 -1
index 8130028..d98a010 100644
@@ -40,7 +40,7 @@ struct dib3000mc_state {
 
 	u32 timf;
 
-	fe_bandwidth_t current_bandwidth;
+	u32 current_bandwidth;
 
 	u16 dev_id;
 
drivers/media/dvb/frontends/dib7000m.c +1 -1
index eb90c4f..b6a25a2 100644
@@ -38,7 +38,7 @@ struct dib7000m_state {
 	u16 wbd_ref;
 
 	u8 current_band;
-	fe_bandwidth_t current_bandwidth;
+	u32 current_bandwidth;
 	struct dibx000_agc_config *current_agc;
 	u32 timf;
 	u32 timf_default;
drivers/media/dvb/frontends/tda10048.c +1 -1
index 80de9f6..dfd1d5a 100644
@@ -153,7 +153,7 @@ struct tda10048_state {
 	u32 pll_pfactor;
 	u32 sample_freq;
 
-	enum fe_bandwidth bandwidth;
+	u32 bandwidth;
 };
 
 static struct init_tab {
Signature · 1 line
1.7.8.352.g876a6
#89 lore raw

PATCH v2 89/94 dvb: don't use DVBv3 bandwidth macros

In reply to Mauro Carvalho Chehab

Every frontend now uses DVBv5 way. So, let's not use the DVBv3 macros internally anymore.

---
 drivers/media/common/tuners/mt2266.c         |    4 +---
 drivers/media/common/tuners/mxl5007t.c       |    5 +----
 drivers/media/common/tuners/tda18271-fe.c    |    7 +------
 drivers/media/common/tuners/tda827x.c        |   14 ++------------
 drivers/media/common/tuners/tuner-simple.c   |   12 +-----------
 drivers/media/common/tuners/xc4000.c         |   11 +++--------
 drivers/media/common/tuners/xc5000.c         |   12 +++---------
 drivers/media/dvb/dvb-usb/mxl111sf-tuner.c   |    5 +----
 drivers/media/dvb/frontends/af9013.c         |    2 +-
 drivers/media/dvb/frontends/af9013_priv.h    |    2 +-
 drivers/media/dvb/frontends/dib3000mb_priv.h |    2 +-
 drivers/media/dvb/frontends/dvb-pll.c        |    7 +------
 12 files changed, 17 insertions(+), 66 deletions(-)
drivers/media/common/tuners/mt2266.c +1 -3
index 2fb5a60..bca4d75 100644
@@ -150,20 +150,18 @@ static int mt2266_set_params(struct dvb_frontend *fe)
 	case 6000000:
 		mt2266_writeregs(priv, mt2266_init_6mhz,
 				 sizeof(mt2266_init_6mhz));
-		priv->bandwidth = BANDWIDTH_6_MHZ;
 		break;
 	case 8000000:
 		mt2266_writeregs(priv, mt2266_init_8mhz,
 				 sizeof(mt2266_init_8mhz));
-		priv->bandwidth = BANDWIDTH_8_MHZ;
 		break;
 	case 7000000:
 	default:
 		mt2266_writeregs(priv, mt2266_init_7mhz,
 				 sizeof(mt2266_init_7mhz));
-		priv->bandwidth = BANDWIDTH_7_MHZ;
 		break;
 	}
+	priv->bandwidth = c->bandwidth_hz;
 
 	if (band == MT2266_VHF && priv->band == MT2266_UHF) {
 		dprintk("Switch from UHF to VHF");
drivers/media/common/tuners/mxl5007t.c +1 -4
index 5d71e22..88bbc21 100644
@@ -624,7 +624,6 @@ static int mxl5007t_set_params(struct dvb_frontend *fe)
 	enum mxl5007t_mode mode;
 	int ret;
 	u32 freq = c->frequency;
-	u32 band = BANDWIDTH_6_MHZ;
 
 	switch (delsys) {
 	case SYS_ATSC:
@@ -644,10 +643,8 @@ static int mxl5007t_set_params(struct dvb_frontend *fe)
 			break;
 		case 7000000:
 			bw = MxL_BW_7MHz;
-			band = BANDWIDTH_7_MHZ;
 		case 8000000:
 			bw = MxL_BW_8MHz;
-			band = BANDWIDTH_8_MHZ;
 		default:
 			return -EINVAL;
 		}
@@ -671,7 +668,7 @@ static int mxl5007t_set_params(struct dvb_frontend *fe)
 		goto fail;
 
 	state->frequency = freq;
-	state->bandwidth = band;
+	state->bandwidth = c->bandwidth_hz;
 fail:
 	mutex_unlock(&state->lock);
 
drivers/media/common/tuners/tda18271-fe.c +1 -6
index 53299b0..d3d91ea 100644
@@ -934,7 +934,6 @@ static int tda18271_set_params(struct dvb_frontend *fe)
 	u32 delsys = c->delivery_system;
 	u32 bw = c->bandwidth_hz;
 	u32 freq = c->frequency;
-	u32 band = BANDWIDTH_6_MHZ;
 	struct tda18271_priv *priv = fe->tuner_priv;
 	struct tda18271_std_map *std_map = &priv->std;
 	struct tda18271_std_map_item *map;
@@ -953,10 +952,8 @@ static int tda18271_set_params(struct dvb_frontend *fe)
 			map = &std_map->dvbt_6;
 		} else if (bw <= 7000000) {
 			map = &std_map->dvbt_7;
-			band = BANDWIDTH_7_MHZ;
 		} else {
 			map = &std_map->dvbt_8;
-			band = BANDWIDTH_8_MHZ;
 		}
 		break;
 	case SYS_DVBC_ANNEX_B:
@@ -968,10 +965,8 @@ static int tda18271_set_params(struct dvb_frontend *fe)
 			map = &std_map->qam_6;
 		} else if (bw <= 7000000) {
 			map = &std_map->qam_7;
-			band = BANDWIDTH_7_MHZ;
 		} else {
 			map = &std_map->qam_8;
-			band = BANDWIDTH_8_MHZ;
 		}
 		break;
 	default:
@@ -990,7 +985,7 @@ static int tda18271_set_params(struct dvb_frontend *fe)
 
 	priv->if_freq   = map->if_freq;
 	priv->frequency = freq;
-	priv->bandwidth = band;
+	priv->bandwidth = bw;
 fail:
 	return ret;
 }
drivers/media/common/tuners/tda827x.c +2 -12
index d96d0b9..e180def 100644
@@ -158,7 +158,6 @@ static int tda827xo_set_params(struct dvb_frontend *fe)
 	struct tda827x_priv *priv = fe->tuner_priv;
 	u8 buf[14];
 	int rc;
-	u32 band;
 
 	struct i2c_msg msg = { .addr = priv->i2c_addr, .flags = 0,
 			       .buf = buf, .len = sizeof(buf) };
@@ -168,16 +167,12 @@ static int tda827xo_set_params(struct dvb_frontend *fe)
 	dprintk("%s:\n", __func__);
 	if (c->bandwidth_hz == 0) {
 		if_freq = 5000000;
-		band = BANDWIDTH_8_MHZ;
 	} else if (c->bandwidth_hz <= 6000000) {
 		if_freq = 4000000;
-		band = BANDWIDTH_6_MHZ;
 	} else if (c->bandwidth_hz <= 7000000) {
 		if_freq = 4500000;
-		band = BANDWIDTH_7_MHZ;
 	} else {	/* 8 MHz */
 		if_freq = 5000000;
-		band = BANDWIDTH_8_MHZ;
 	}
 	tuner_freq = c->frequency;
 
@@ -224,7 +219,7 @@ static int tda827xo_set_params(struct dvb_frontend *fe)
 		goto err;
 
 	priv->frequency = c->frequency;
-	priv->bandwidth = band;
+	priv->bandwidth = c->bandwidth_hz;
 
 	return 0;
 
@@ -522,7 +517,6 @@ static int tda827xa_set_params(struct dvb_frontend *fe)
 	struct tda827x_priv *priv = fe->tuner_priv;
 	struct tda827xa_data *frequency_map = tda827xa_dvbt;
 	u8 buf[11];
-	u32 band;
 
 	struct i2c_msg msg = { .addr = priv->i2c_addr, .flags = 0,
 			       .buf = buf, .len = sizeof(buf) };
@@ -537,16 +531,12 @@ static int tda827xa_set_params(struct dvb_frontend *fe)
 
 	if (c->bandwidth_hz == 0) {
 		if_freq = 5000000;
-		band = BANDWIDTH_8_MHZ;
 	} else if (c->bandwidth_hz <= 6000000) {
 		if_freq = 4000000;
-		band = BANDWIDTH_6_MHZ;
 	} else if (c->bandwidth_hz <= 7000000) {
 		if_freq = 4500000;
-		band = BANDWIDTH_7_MHZ;
 	} else {	/* 8 MHz */
 		if_freq = 5000000;
-		band = BANDWIDTH_8_MHZ;
 	}
 	tuner_freq = c->frequency;
 
@@ -652,7 +642,7 @@ static int tda827xa_set_params(struct dvb_frontend *fe)
 		goto err;
 
 	priv->frequency = c->frequency;
-	priv->bandwidth = band;
+	priv->bandwidth = c->bandwidth_hz;
 
 	return 0;
 
drivers/media/common/tuners/tuner-simple.c +1 -11
index ce91c43..39e7e58 100644
@@ -1028,17 +1028,7 @@ static int simple_get_frequency(struct dvb_frontend *fe, u32 *frequency)
 static int simple_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth)
 {
 	struct tuner_simple_priv *priv = fe->tuner_priv;
-	switch (priv->bandwidth) {
-	case 6000000:
-		*bandwidth = BANDWIDTH_6_MHZ;
-		break;
-	case 7000000:
-		*bandwidth = BANDWIDTH_7_MHZ;
-		break;
-	case 8000000:
-		*bandwidth = BANDWIDTH_8_MHZ;
-		break;
-	}
+	*bandwidth = priv->bandwidth;
 	return 0;
 }
 
drivers/media/common/tuners/xc4000.c +3 -8
index d17c0f5..7b5a46e 100644
@@ -1139,7 +1139,6 @@ static int xc4000_set_params(struct dvb_frontend *fe)
 		dprintk(1, "%s() VSB modulation\n", __func__);
 		priv->rf_mode = XC_RF_MODE_AIR;
 		priv->freq_hz = c->frequency - 1750000;
-		priv->bandwidth = BANDWIDTH_6_MHZ;
 		priv->video_standard = XC4000_DTV6;
 		type = DTV6;
 		break;
@@ -1147,7 +1146,6 @@ static int xc4000_set_params(struct dvb_frontend *fe)
 		dprintk(1, "%s() QAM modulation\n", __func__);
 		priv->rf_mode = XC_RF_MODE_CABLE;
 		priv->freq_hz = c->frequency - 1750000;
-		priv->bandwidth = BANDWIDTH_6_MHZ;
 		priv->video_standard = XC4000_DTV6;
 		type = DTV6;
 		break;
@@ -1156,26 +1154,21 @@ static int xc4000_set_params(struct dvb_frontend *fe)
 		dprintk(1, "%s() OFDM\n", __func__);
 		if (bw == 0) {
 			if (c->frequency < 400000000) {
-				priv->bandwidth = BANDWIDTH_7_MHZ;
 				priv->freq_hz = c->frequency - 2250000;
 			} else {
-				priv->bandwidth = BANDWIDTH_8_MHZ;
 				priv->freq_hz = c->frequency - 2750000;
 			}
 			priv->video_standard = XC4000_DTV7_8;
 			type = DTV78;
 		} else if (bw <= 6000000) {
-			priv->bandwidth = BANDWIDTH_6_MHZ;
 			priv->video_standard = XC4000_DTV6;
 			priv->freq_hz = c->frequency - 1750000;
 			type = DTV6;
 		} else if (bw <= 7000000) {
-			priv->bandwidth = BANDWIDTH_7_MHZ;
 			priv->video_standard = XC4000_DTV7;
 			priv->freq_hz = c->frequency - 2250000;
 			type = DTV7;
 		} else {
-			priv->bandwidth = BANDWIDTH_8_MHZ;
 			priv->video_standard = XC4000_DTV8;
 			priv->freq_hz = c->frequency - 2750000;
 			type = DTV8;
@@ -1195,6 +1188,8 @@ static int xc4000_set_params(struct dvb_frontend *fe)
 	if (check_firmware(fe, type, 0, priv->if_khz) != 0)
 		goto fail;
 
+	priv->bandwidth = c->bandwidth_hz;
+
 	ret = xc_set_signal_source(priv, priv->rf_mode);
 	if (ret != 0) {
 		printk(KERN_ERR "xc4000: xc_set_signal_source(%d) failed\n",
@@ -1591,7 +1586,7 @@ struct dvb_frontend *xc4000_attach(struct dvb_frontend *fe,
 		break;
 	case 1:
 		/* new tuner instance */
-		priv->bandwidth = BANDWIDTH_6_MHZ;
+		priv->bandwidth = 6000000;
 		/* set default configuration */
 		priv->if_khz = 4560;
 		priv->default_pm = 0;
drivers/media/common/tuners/xc5000.c +3 -9
index 7796339..296df05 100644
@@ -650,14 +650,12 @@ static int xc5000_set_params(struct dvb_frontend *fe)
 		dprintk(1, "%s() VSB modulation\n", __func__);
 		priv->rf_mode = XC_RF_MODE_AIR;
 		priv->freq_hz = freq - 1750000;
-		priv->bandwidth = BANDWIDTH_6_MHZ;
 		priv->video_standard = DTV6;
 		break;
 	case SYS_DVBC_ANNEX_B:
 		dprintk(1, "%s() QAM modulation\n", __func__);
 		priv->rf_mode = XC_RF_MODE_CABLE;
 		priv->freq_hz = freq - 1750000;
-		priv->bandwidth = BANDWIDTH_6_MHZ;
 		priv->video_standard = DTV6;
 		break;
 	case SYS_DVBT:
@@ -665,17 +663,14 @@ static int xc5000_set_params(struct dvb_frontend *fe)
 		dprintk(1, "%s() OFDM\n", __func__);
 		switch (bw) {
 		case 6000000:
-			priv->bandwidth = BANDWIDTH_6_MHZ;
 			priv->video_standard = DTV6;
 			priv->freq_hz = freq - 1750000;
 			break;
 		case 7000000:
-			priv->bandwidth = BANDWIDTH_7_MHZ;
 			priv->video_standard = DTV7;
 			priv->freq_hz = freq - 2250000;
 			break;
 		case 8000000:
-			priv->bandwidth = BANDWIDTH_8_MHZ;
 			priv->video_standard = DTV8;
 			priv->freq_hz = freq - 2750000;
 			break;
@@ -689,17 +684,14 @@ static int xc5000_set_params(struct dvb_frontend *fe)
 		dprintk(1, "%s() QAM modulation\n", __func__);
 		priv->rf_mode = XC_RF_MODE_CABLE;
 		if (bw <= 6000000) {
-			priv->bandwidth = BANDWIDTH_6_MHZ;
 			priv->video_standard = DTV6;
 			priv->freq_hz = freq - 1750000;
 			b = 6;
 		} else if (bw <= 7000000) {
-			priv->bandwidth = BANDWIDTH_7_MHZ;
 			priv->video_standard = DTV7;
 			priv->freq_hz = freq - 2250000;
 			b = 7;
 		} else {
-			priv->bandwidth = BANDWIDTH_8_MHZ;
 			priv->video_standard = DTV7_8;
 			priv->freq_hz = freq - 2750000;
 			b = 8;
@@ -745,6 +737,8 @@ static int xc5000_set_params(struct dvb_frontend *fe)
 	if (debug)
 		xc_debug_dump(priv);
 
+	priv->bandwidth = bw;
+
 	return 0;
 }
 
@@ -1126,7 +1120,7 @@ struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe,
 		break;
 	case 1:
 		/* new tuner instance */
-		priv->bandwidth = BANDWIDTH_6_MHZ;
+		priv->bandwidth = 6000000;
 		fe->tuner_priv = priv;
 		break;
 	default:
drivers/media/dvb/dvb-usb/mxl111sf-tuner.c +1 -4
index 3a533df..72db6ee 100644
@@ -279,7 +279,6 @@ static int mxl111sf_tuner_set_params(struct dvb_frontend *fe)
 	struct mxl111sf_tuner_state *state = fe->tuner_priv;
 	int ret;
 	u8 bw;
-	u32 band = BANDWIDTH_6_MHZ;
 
 	mxl_dbg("()");
 
@@ -297,11 +296,9 @@ static int mxl111sf_tuner_set_params(struct dvb_frontend *fe)
 			break;
 		case 7000000:
 			bw = 7;
-			band = BANDWIDTH_7_MHZ;
 			break;
 		case 8000000:
 			bw = 8;
-			band = BANDWIDTH_8_MHZ;
 			break;
 		default:
 			err("%s: bandwidth not set!", __func__);
@@ -317,7 +314,7 @@ static int mxl111sf_tuner_set_params(struct dvb_frontend *fe)
 		goto fail;
 
 	state->frequency = c->frequency;
-	state->bandwidth = band;
+	state->bandwidth = c->bandwidth_hz;
 fail:
 	return ret;
 }
drivers/media/dvb/frontends/af9013.c +1 -1
index 08a0364..a8aefe9 100644
@@ -220,7 +220,7 @@ static u32 af913_div(u32 a, u32 b, u32 x)
 	return r;
 }
 
-static int af9013_set_coeff(struct af9013_state *state, fe_bandwidth_t bw)
+static int af9013_set_coeff(struct af9013_state *state, u32 bw)
 {
 	int ret, i, j, found;
 	deb_info("%s: adc_clock:%d bw:%d\n", __func__,
drivers/media/dvb/frontends/af9013_priv.h +1 -1
index 67efd16..80e6be3 100644
@@ -62,7 +62,7 @@ struct snr_table {
 
 struct coeff {
 	u32 adc_clock;
-	fe_bandwidth_t bw;
+	u32 bw;
 	u8 val[24];
 };
 
drivers/media/dvb/frontends/dib3000mb_priv.h +1 -1
index 16c5265..9dc235a 100644
@@ -98,7 +98,7 @@ struct dib3000_state {
 	int timing_offset;
 	int timing_offset_comp_done;
 
-	fe_bandwidth_t last_tuned_bw;
+	u32 last_tuned_bw;
 	u32 last_tuned_freq;
 };
 
drivers/media/dvb/frontends/dvb-pll.c +1 -6
index 0625e61..95cb042 100644
@@ -634,12 +634,7 @@ static int dvb_pll_set_params(struct dvb_frontend *fe)
 	}
 
 	priv->frequency = frequency;
-	if (c->bandwidth_hz <= 6000000)
-		priv->bandwidth = BANDWIDTH_6_MHZ;
-	else if (c->bandwidth_hz <= 7000000)
-		priv->bandwidth = BANDWIDTH_7_MHZ;
-	if (c->bandwidth_hz <= 8000000)
-		priv->bandwidth = BANDWIDTH_8_MHZ;
+	priv->bandwidth = c->bandwidth_hz;
 
 	return 0;
 }
Signature · 1 line
1.7.8.352.g876a6
#90 lore raw

PATCH v2 90/94 cx23885-dvb: Remove a dirty hack that would require DVBv3

In reply to Mauro Carvalho Chehab

The cx23885-dvb driver has a dirty hack:
1) it hooks the DVBv3 legacy call to FE_SET_FRONTEND;
2) it uses internally the DVBv3 struct to decide some configs.

Replace it by a change during the gate control. This will likely work, but requires testing. Anyway, the current way will break, as soon as we stop copying data for DVBv3 for pure DVBv5 calls.

Compile-tested only.

---
 drivers/media/video/cx23885/cx23885-dvb.c |   41 ++++++++--------------------
 1 files changed, 12 insertions(+), 29 deletions(-)
drivers/media/video/cx23885/cx23885-dvb.c +12 -29
index bcb45be..28d51d8 100644
@@ -111,6 +111,8 @@ static void dvb_buf_release(struct videobuf_queue *q,
 	cx23885_free_buffer(q, (struct cx23885_buffer *)vb);
 }
 
+static int cx23885_dvb_set_frontend(struct dvb_frontend *fe);
+
 static void cx23885_dvb_gate_ctrl(struct cx23885_tsport  *port, int open)
 {
 	struct videobuf_dvb_frontends *f;
@@ -125,6 +127,12 @@ static void cx23885_dvb_gate_ctrl(struct cx23885_tsport  *port, int open)
 
 	if (fe && fe->dvb.frontend && fe->dvb.frontend->ops.i2c_gate_ctrl)
 		fe->dvb.frontend->ops.i2c_gate_ctrl(fe->dvb.frontend, open);
+
+	/*
+	 * FIXME: Improve this path to avoid calling the
+	 * cx23885_dvb_set_frontend() every time it passes here.
+	 */
+	cx23885_dvb_set_frontend(fe->dvb.frontend);
 }
 
 static struct videobuf_queue_ops dvb_qops = {
@@ -479,15 +487,15 @@ static struct xc5000_config mygica_x8506_xc5000_config = {
 	.if_khz = 5380,
 };
 
-static int cx23885_dvb_set_frontend(struct dvb_frontend *fe,
-				    struct dvb_frontend_parameters *param)
+static int cx23885_dvb_set_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct cx23885_tsport *port = fe->dvb->priv;
 	struct cx23885_dev *dev = port->dev;
 
 	switch (dev->board) {
 	case CX23885_BOARD_HAUPPAUGE_HVR1275:
-		switch (param->u.vsb.modulation) {
+		switch (p->modulation) {
 		case VSB_8:
 			cx23885_gpio_clear(dev, GPIO_5);
 			break;
@@ -507,31 +515,6 @@ static int cx23885_dvb_set_frontend(struct dvb_frontend *fe,
 	return 0;
 }
 
-static int cx23885_dvb_fe_ioctl_override(struct dvb_frontend *fe,
-					 unsigned int cmd, void *parg,
-					 unsigned int stage)
-{
-	int err = 0;
-
-	switch (stage) {
-	case DVB_FE_IOCTL_PRE:
-
-		switch (cmd) {
-		case FE_SET_FRONTEND:
-			err = cx23885_dvb_set_frontend(fe,
-				(struct dvb_frontend_parameters *) parg);
-			break;
-		}
-		break;
-
-	case DVB_FE_IOCTL_POST:
-		/* no post-ioctl handling required */
-		break;
-	}
-	return err;
-};
-
-
 static struct lgs8gxx_config magicpro_prohdtve2_lgs8g75_config = {
 	.prod = LGS8GXX_PROD_LGS8G75,
 	.demod_address = 0x19,
@@ -1151,7 +1134,7 @@ static int dvb_register(struct cx23885_tsport *port)
 	/* register everything */
 	ret = videobuf_dvb_register_bus(&port->frontends, THIS_MODULE, port,
 					&dev->pci->dev, adapter_nr, mfe_shared,
-					cx23885_dvb_fe_ioctl_override);
+					NULL);
 	if (ret)
 		goto frontend_detach;
 
Signature · 1 line
1.7.8.352.g876a6
#91 lore raw

PATCH v2 91/94 dvb-core: be sure that drivers won't use DVBv3 internally

In reply to Mauro Carvalho Chehab

Now that all frontends are implementing DVBv5, don't export the DVBv3 specific stuff to the drivers. Only the core should be aware of that, as it will keep providing DVBv3 backward compatibility.

---
 drivers/media/dvb/dvb-core/dvb_frontend.c |    3 +++
 drivers/media/dvb/dvb-core/dvb_frontend.h |    2 ++
 include/linux/dvb/frontend.h              |    6 ++++--
 3 files changed, 9 insertions(+), 2 deletions(-)
drivers/media/dvb/dvb-core/dvb_frontend.c +3 -0
index 68d284b..9131f1a 100644
@@ -25,6 +25,9 @@
  * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
  */
 
+/* Enables DVBv3 compatibility bits at the headers */
+#define __DVB_CORE__
+
 #include <linux/string.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
drivers/media/dvb/dvb-core/dvb_frontend.h +2 -0
index 52efcbd..382d97f 100644
@@ -315,6 +315,7 @@ struct dvb_frontend_ops {
 	int (*get_property)(struct dvb_frontend* fe, struct dtv_property* tvp);
 };
 
+#ifdef __DVB_CORE__
 #define MAX_EVENT 8
 
 struct dvb_fe_events {
@@ -325,6 +326,7 @@ struct dvb_fe_events {
 	wait_queue_head_t	  wait_queue;
 	struct mutex		  mtx;
 };
+#endif
 
 struct dtv_frontend_properties {
 
include/linux/dvb/frontend.h +4 -2
index a3c7623..7e7cb64 100644
@@ -181,6 +181,7 @@ typedef enum fe_transmit_mode {
 	TRANSMISSION_MODE_32K,
 } fe_transmit_mode_t;
 
+#if defined(__DVB_CORE__) || !defined (__KERNEL__)
 typedef enum fe_bandwidth {
 	BANDWIDTH_8_MHZ,
 	BANDWIDTH_7_MHZ,
@@ -190,7 +191,7 @@ typedef enum fe_bandwidth {
 	BANDWIDTH_10_MHZ,
 	BANDWIDTH_1_712_MHZ,
 } fe_bandwidth_t;
-
+#endif
 
 typedef enum fe_guard_interval {
 	GUARD_INTERVAL_1_32,
@@ -213,6 +214,7 @@ typedef enum fe_hierarchy {
 } fe_hierarchy_t;
 
 
+#if defined(__DVB_CORE__) || !defined (__KERNEL__)
 struct dvb_qpsk_parameters {
 	__u32		symbol_rate;  /* symbol rate in Symbols per second */
 	fe_code_rate_t	fec_inner;    /* forward error correction (see above) */
@@ -251,11 +253,11 @@ struct dvb_frontend_parameters {
 	} u;
 };
 
-
 struct dvb_frontend_event {
 	fe_status_t status;
 	struct dvb_frontend_parameters parameters;
 };
+#endif
 
 /* S2API Commands */
 #define DTV_UNDEFINED		0
Signature · 1 line
1.7.8.352.g876a6
#92 lore raw

PATCH v2 92/94 s921: Properly report the delivery system

In reply to Mauro Carvalho Chehab

Before this patch, a query for the delivery systems were returned SYS_UNDEFINED.

---
 drivers/media/dvb/dvb-core/dvb_frontend.c |    1 -
 drivers/media/dvb/frontends/s921.c        |    1 +
 2 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/dvb/dvb-core/dvb_frontend.c +0 -1
index 9131f1a..9dd30be 100644
@@ -1309,7 +1309,6 @@ static void dtv_set_default_delivery_caps(const struct dvb_frontend *fe, struct
 		p->u.buffer.len = ncaps;
 		return;
 	}
-
 	switch (info->type) {
 	case FE_QPSK:
 		p->u.buffer.data[ncaps++] = SYS_DVBS;
drivers/media/dvb/frontends/s921.c +1 -0
index 2e15f92..7652d3f 100644
@@ -440,6 +440,7 @@ static int s921_get_frontend(struct dvb_frontend *fe,
 
 	/* FIXME: Probably it is possible to get it from regs f1 and f2 */
 	p->frequency = state->currentfreq;
+	p->delivery_system = SYS_ISDBT;
 
 	return 0;
 }
Signature · 1 line
1.7.8.352.g876a6
#93 lore raw

PATCH v2 93/94 dvb_frontend: Fix inversion breakage due to DVBv5 conversion

In reply to Mauro Carvalho Chehab

On several places inside dvb_frontend, only the DVBv3 parameters were updated. Change it to be sure that, on all places, the DVBv5 parameters will be changed instead.

---
 drivers/media/dvb/dvb-core/dvb_frontend.c |   38 ++++++++++++++++-------------
 1 files changed, 21 insertions(+), 17 deletions(-)
drivers/media/dvb/dvb-core/dvb_frontend.c +21 -17
index 9dd30be..9d092a6 100644
@@ -288,12 +288,13 @@ static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wra
 	int ready = 0;
 	int fe_set_err = 0;
 	struct dvb_frontend_private *fepriv = fe->frontend_priv;
-	int original_inversion = fepriv->parameters_in.inversion;
-	u32 original_frequency = fepriv->parameters_in.frequency;
+	struct dtv_frontend_properties *c = &fe->dtv_property_cache, tmp;
+	int original_inversion = c->inversion;
+	u32 original_frequency = c->frequency;
 
 	/* are we using autoinversion? */
 	autoinversion = ((!(fe->ops.info.caps & FE_CAN_INVERSION_AUTO)) &&
-			 (fepriv->parameters_in.inversion == INVERSION_AUTO));
+			 (c->inversion == INVERSION_AUTO));
 
 	/* setup parameters correctly */
 	while(!ready) {
@@ -359,19 +360,20 @@ static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wra
 		fepriv->auto_step, fepriv->auto_sub_step, fepriv->started_auto_step);
 
 	/* set the frontend itself */
-	fepriv->parameters_in.frequency += fepriv->lnb_drift;
+	c->frequency += fepriv->lnb_drift;
 	if (autoinversion)
-		fepriv->parameters_in.inversion = fepriv->inversion;
+		c->inversion = fepriv->inversion;
+	tmp = *c;
 	if (fe->ops.set_frontend)
 		fe_set_err = fe->ops.set_frontend(fe);
-	fepriv->parameters_out = fepriv->parameters_in;
+	*c = tmp;
 	if (fe_set_err < 0) {
 		fepriv->state = FESTATE_ERROR;
 		return fe_set_err;
 	}
 
-	fepriv->parameters_in.frequency = original_frequency;
-	fepriv->parameters_in.inversion = original_inversion;
+	c->frequency = original_frequency;
+	c->inversion = original_inversion;
 
 	fepriv->auto_sub_step++;
 	return 0;
@@ -382,6 +384,7 @@ static void dvb_frontend_swzigzag(struct dvb_frontend *fe)
 	fe_status_t s = 0;
 	int retval = 0;
 	struct dvb_frontend_private *fepriv = fe->frontend_priv;
+	struct dtv_frontend_properties *c = &fe->dtv_property_cache, tmp;
 
 	/* if we've got no parameters, just keep idling */
 	if (fepriv->state & FESTATE_IDLE) {
@@ -393,9 +396,10 @@ static void dvb_frontend_swzigzag(struct dvb_frontend *fe)
 	/* in SCAN mode, we just set the frontend when asked and leave it alone */
 	if (fepriv->tune_mode_flags & FE_TUNE_MODE_ONESHOT) {
 		if (fepriv->state & FESTATE_RETUNE) {
+			tmp = *c;
 			if (fe->ops.set_frontend)
 				retval = fe->ops.set_frontend(fe);
-			fepriv->parameters_out = fepriv->parameters_in;
+			*c = tmp;
 			if (retval < 0)
 				fepriv->state = FESTATE_ERROR;
 			else
@@ -425,8 +429,8 @@ static void dvb_frontend_swzigzag(struct dvb_frontend *fe)
 
 		/* if we're tuned, then we have determined the correct inversion */
 		if ((!(fe->ops.info.caps & FE_CAN_INVERSION_AUTO)) &&
-		    (fepriv->parameters_in.inversion == INVERSION_AUTO)) {
-			fepriv->parameters_in.inversion = fepriv->inversion;
+		    (c->inversion == INVERSION_AUTO)) {
+			c->inversion = fepriv->inversion;
 		}
 		return;
 	}
@@ -1976,14 +1980,14 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
 
 		/* force auto frequency inversion if requested */
 		if (dvb_force_auto_inversion) {
-			fepriv->parameters_in.inversion = INVERSION_AUTO;
+			c->inversion = INVERSION_AUTO;
 		}
 		if (fe->ops.info.type == FE_OFDM) {
 			/* without hierarchical coding code_rate_LP is irrelevant,
 			 * so we tolerate the otherwise invalid FEC_NONE setting */
-			if (fepriv->parameters_in.u.ofdm.hierarchy_information == HIERARCHY_NONE &&
-			    fepriv->parameters_in.u.ofdm.code_rate_LP == FEC_NONE)
-				fepriv->parameters_in.u.ofdm.code_rate_LP = FEC_AUTO;
+			if (c->hierarchy == HIERARCHY_NONE &&
+			    c->code_rate_LP == FEC_NONE)
+				c->code_rate_LP = FEC_AUTO;
 		}
 
 		/* get frontend-specific tuning settings */
@@ -1996,8 +2000,8 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
 			switch(fe->ops.info.type) {
 			case FE_QPSK:
 				fepriv->min_delay = HZ/20;
-				fepriv->step_size = fepriv->parameters_in.u.qpsk.symbol_rate / 16000;
-				fepriv->max_drift = fepriv->parameters_in.u.qpsk.symbol_rate / 2000;
+				fepriv->step_size = c->symbol_rate / 16000;
+				fepriv->max_drift = c->symbol_rate / 2000;
 				break;
 
 			case FE_QAM:
Signature · 1 line
1.7.8.352.g876a6
#94 lore raw

PATCH v2 94/94 dvb: don't require a parameter for get_frontend

In reply to Mauro Carvalho Chehab

Just like set_frontend, use the dvb cache properties for get_frontend. This is more consistent, as both functions are now symetric. Also, at the places get_frontend is called, it makes sense to update the cache.

Most of this patch were generated by this small perl script:

	while (<>) { $file .= $_; }
	if ($file =~ m/\.get_frontend\s*=\s*([\d\w_]+)/) {
		my $get = $1;
		$file =~ s/($get)(\s*\([^\,\)]+)\,\s*struct\s+dtv_frontend_properties\s*\*\s*([_\d\w]+)\)\s*\{/\1\2)\n{\n\tstruct dtv_frontend_properties *\3 = &fe->dtv_property_cache;/g;
	}
	print $file;

Of course, the changes at dvb_frontend.[ch] were made by hand, as well as the changes on a few other places, where get_frontend() is called internally inside the driver.

On some places, get_frontend() were just a void function. Those occurrences were removed, as the DVB core handles such cases.

---
 drivers/media/dvb/bt8xx/dst.c               |    3 +-
 drivers/media/dvb/dvb-core/dvb_frontend.c   |   30 ++++++--------------------
 drivers/media/dvb/dvb-core/dvb_frontend.h   |    2 +-
 drivers/media/dvb/dvb-usb/af9005-fe.c       |    4 +-
 drivers/media/dvb/dvb-usb/cinergyT2-fe.c    |    7 ------
 drivers/media/dvb/dvb-usb/dtt200u-fe.c      |    4 +-
 drivers/media/dvb/dvb-usb/friio-fe.c        |    4 +-
 drivers/media/dvb/dvb-usb/mxl111sf-demod.c  |    4 +-
 drivers/media/dvb/dvb-usb/vp702x-fe.c       |    8 -------
 drivers/media/dvb/firewire/firedtv-fe.c     |   20 ------------------
 drivers/media/dvb/frontends/af9013.c        |    4 +-
 drivers/media/dvb/frontends/atbm8830.c      |    4 +-
 drivers/media/dvb/frontends/au8522_dig.c    |    4 +-
 drivers/media/dvb/frontends/cx22700.c       |    4 +-
 drivers/media/dvb/frontends/cx22702.c       |    4 +-
 drivers/media/dvb/frontends/cx24110.c       |    4 +-
 drivers/media/dvb/frontends/cx24123.c       |    4 +-
 drivers/media/dvb/frontends/cxd2820r_core.c |    4 +-
 drivers/media/dvb/frontends/dib3000mb.c     |    9 +++----
 drivers/media/dvb/frontends/dib3000mc.c     |   10 +++-----
 drivers/media/dvb/frontends/dib7000m.c      |   10 +++-----
 drivers/media/dvb/frontends/dib7000p.c      |    9 +++----
 drivers/media/dvb/frontends/dib8000.c       |    6 ++--
 drivers/media/dvb/frontends/dib9000.c       |    6 ++--
 drivers/media/dvb/frontends/dvb_dummy_fe.c  |    6 +++-
 drivers/media/dvb/frontends/it913x-fe.c     |    4 +-
 drivers/media/dvb/frontends/l64781.c        |    4 +-
 drivers/media/dvb/frontends/lgdt3305.c      |    4 +-
 drivers/media/dvb/frontends/lgdt330x.c      |    4 +-
 drivers/media/dvb/frontends/lgs8gl5.c       |    4 +-
 drivers/media/dvb/frontends/lgs8gxx.c       |    4 +-
 drivers/media/dvb/frontends/mb86a20s.c      |    4 +-
 drivers/media/dvb/frontends/mt312.c         |    4 +-
 drivers/media/dvb/frontends/mt352.c         |    4 +-
 drivers/media/dvb/frontends/or51132.c       |    4 +-
 drivers/media/dvb/frontends/s5h1409.c       |    4 +-
 drivers/media/dvb/frontends/s5h1411.c       |    4 +-
 drivers/media/dvb/frontends/s5h1420.c       |    4 +-
 drivers/media/dvb/frontends/s921.c          |    4 +-
 drivers/media/dvb/frontends/stb0899_drv.c   |    3 +-
 drivers/media/dvb/frontends/stb6100.c       |    2 +-
 drivers/media/dvb/frontends/stv0297.c       |    3 +-
 drivers/media/dvb/frontends/stv0299.c       |    3 +-
 drivers/media/dvb/frontends/stv0367.c       |    8 +++---
 drivers/media/dvb/frontends/stv0900_core.c  |    4 +-
 drivers/media/dvb/frontends/tda10021.c      |    3 +-
 drivers/media/dvb/frontends/tda10023.c      |    3 +-
 drivers/media/dvb/frontends/tda10048.c      |    4 +-
 drivers/media/dvb/frontends/tda1004x.c      |    3 +-
 drivers/media/dvb/frontends/tda10071.c      |    4 +-
 drivers/media/dvb/frontends/tda10086.c      |    3 +-
 drivers/media/dvb/frontends/tda8083.c       |    3 +-
 drivers/media/dvb/frontends/ves1820.c       |    3 +-
 drivers/media/dvb/frontends/ves1x93.c       |    4 +-
 drivers/media/dvb/frontends/zl10353.c       |    4 +-
 drivers/media/dvb/siano/smsdvb.c            |    4 +-
 drivers/media/video/tlg2300/pd-dvb.c        |    4 +-
 57 files changed, 125 insertions(+), 170 deletions(-)
drivers/media/dvb/bt8xx/dst.c +2 -1
index 80b1f2a..9c5cbf1 100644
@@ -1685,8 +1685,9 @@ static int dst_get_tuning_algo(struct dvb_frontend *fe)
 	return dst_algo ? DVBFE_ALGO_HW : DVBFE_ALGO_SW;
 }
 
-static int dst_get_frontend(struct dvb_frontend *fe, struct dtv_frontend_properties *p)
+static int dst_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct dst_state *state = fe->demodulator_priv;
 
 	p->frequency = state->decode_freq;
drivers/media/dvb/dvb-core/dvb_frontend.c +7 -23
index 9d092a6..9a7ee92 100644
@@ -143,7 +143,6 @@ struct dvb_frontend_private {
 
 static void dvb_frontend_wakeup(struct dvb_frontend *fe);
 static int dtv_get_frontend(struct dvb_frontend *fe,
-			    struct dtv_frontend_properties *c,
 			    struct dvb_frontend_parameters *p_out);
 
 static bool has_get_frontend(struct dvb_frontend *fe)
@@ -161,7 +160,7 @@ static void dvb_frontend_add_event(struct dvb_frontend *fe, fe_status_t status)
 	dprintk ("%s\n", __func__);
 
 	if ((status & FE_HAS_LOCK) && has_get_frontend(fe))
-		dtv_get_frontend(fe, NULL, &fepriv->parameters_out);
+		dtv_get_frontend(fe, &fepriv->parameters_out);
 
 	mutex_lock(&events->mtx);
 
@@ -1261,33 +1260,20 @@ static void dtv_property_cache_submit(struct dvb_frontend *fe)
  * If p_out is not null, it will update the DVBv3 params pointed by it.
  */
 static int dtv_get_frontend(struct dvb_frontend *fe,
-			    struct dtv_frontend_properties *c,
 			    struct dvb_frontend_parameters *p_out)
 {
-	const struct dtv_frontend_properties *cache = &fe->dtv_property_cache;
-	struct dtv_frontend_properties tmp_cache;
-	struct dvb_frontend_parameters tmp_out;
-	bool fill_params = (p_out != NULL);
 	int r;
 
-	if (!p_out)
-		p_out = & tmp_out;
-
-	if (!c)
-		c = &tmp_cache;
-	else
-		memcpy(c, cache, sizeof(*c));
-
 	if (fe->ops.get_frontend) {
-		r = fe->ops.get_frontend(fe, c);
+		r = fe->ops.get_frontend(fe);
 		if (unlikely(r < 0))
 			return r;
-		if (fill_params)
+		if (p_out)
 			dtv_property_legacy_params_sync(fe, p_out);
 		return 0;
 	}
 
-	/* As everything is in cache, this is always supported */
+	/* As everything is in cache, get_frontend fops are always supported */
 	return 0;
 }
 
@@ -1717,8 +1703,6 @@ static int dvb_frontend_ioctl_properties(struct file *file,
 
 	} else
 	if(cmd == FE_GET_PROPERTY) {
-		struct dtv_frontend_properties cache_out;
-
 		tvps = (struct dtv_properties __user *)parg;
 
 		dprintk("%s() properties.num = %d\n", __func__, tvps->num);
@@ -1744,9 +1728,9 @@ static int dvb_frontend_ioctl_properties(struct file *file,
 		 * Fills the cache out struct with the cache contents, plus
 		 * the data retrieved from get_frontend.
 		 */
-		dtv_get_frontend(fe, &cache_out, NULL);
+		dtv_get_frontend(fe, NULL);
 		for (i = 0; i < tvps->num; i++) {
-			err = dtv_property_process_get(fe, &cache_out, tvp + i, file);
+			err = dtv_property_process_get(fe, c, tvp + i, file);
 			if (err < 0)
 				goto out;
 			(tvp + i)->result = err;
@@ -2043,7 +2027,7 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
 		break;
 
 	case FE_GET_FRONTEND:
-		err = dtv_get_frontend(fe, NULL, &fepriv->parameters_out);
+		err = dtv_get_frontend(fe, &fepriv->parameters_out);
 		if (err >= 0)
 			memcpy(parg, &fepriv->parameters_out,
 			       sizeof(struct dvb_frontend_parameters));
drivers/media/dvb/dvb-core/dvb_frontend.h +1 -1
index 382d97f..1ee2e7f 100644
@@ -284,7 +284,7 @@ struct dvb_frontend_ops {
 	int (*set_frontend)(struct dvb_frontend* fe);
 	int (*get_tune_settings)(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* settings);
 
-	int (*get_frontend)(struct dvb_frontend *fe, struct dtv_frontend_properties *props);
+	int (*get_frontend)(struct dvb_frontend *fe);
 
 	int (*read_status)(struct dvb_frontend* fe, fe_status_t* status);
 	int (*read_ber)(struct dvb_frontend* fe, u32* ber);
drivers/media/dvb/dvb-usb/af9005-fe.c +2 -2
index 6c1ef61..27ad0a3 100644
@@ -1225,9 +1225,9 @@ static int af9005_fe_set_frontend(struct dvb_frontend *fe)
 	return 0;
 }
 
-static int af9005_fe_get_frontend(struct dvb_frontend *fe,
-				  struct dtv_frontend_properties *fep)
+static int af9005_fe_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *fep = &fe->dtv_property_cache;
 	struct af9005_fe_state *state = fe->demodulator_priv;
 	int ret;
 	u8 temp;
drivers/media/dvb/dvb-usb/cinergyT2-fe.c +0 -7
index 0b49d44..0b85564 100644
@@ -296,12 +296,6 @@ static int cinergyt2_fe_set_frontend(struct dvb_frontend *fe)
 	return (err < 0) ? err : 0;
 }
 
-static int cinergyt2_fe_get_frontend(struct dvb_frontend *fe,
-				  struct dtv_frontend_properties *fep)
-{
-	return 0;
-}
-
 static void cinergyt2_fe_release(struct dvb_frontend *fe)
 {
 	struct cinergyt2_fe_state *state = fe->demodulator_priv;
@@ -352,7 +346,6 @@ static struct dvb_frontend_ops cinergyt2_fe_ops = {
 	.sleep			= cinergyt2_fe_sleep,
 
 	.set_frontend		= cinergyt2_fe_set_frontend,
-	.get_frontend		= cinergyt2_fe_get_frontend,
 	.get_tune_settings	= cinergyt2_fe_get_tune_settings,
 
 	.read_status		= cinergyt2_fe_read_status,
drivers/media/dvb/dvb-usb/dtt200u-fe.c +2 -2
index 643242e..270747d 100644
@@ -133,9 +133,9 @@ static int dtt200u_fe_set_frontend(struct dvb_frontend* fe)
 	return 0;
 }
 
-static int dtt200u_fe_get_frontend(struct dvb_frontend* fe,
-				  struct dtv_frontend_properties *fep)
+static int dtt200u_fe_get_frontend(struct dvb_frontend* fe)
 {
+	struct dtv_frontend_properties *fep = &fe->dtv_property_cache;
 	struct dtt200u_fe_state *state = fe->demodulator_priv;
 	memcpy(fep,&state->fep,sizeof(struct dtv_frontend_properties));
 	return 0;
drivers/media/dvb/dvb-usb/friio-fe.c +2 -2
index 375815d..0660a87 100644
@@ -282,9 +282,9 @@ static int jdvbt90502_set_property(struct dvb_frontend *fe,
 	return r;
 }
 
-static int jdvbt90502_get_frontend(struct dvb_frontend *fe,
-				   struct dtv_frontend_properties *p)
+static int jdvbt90502_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	p->inversion = INVERSION_AUTO;
 	p->bandwidth_hz = 6000000;
 	p->code_rate_HP = FEC_AUTO;
drivers/media/dvb/dvb-usb/mxl111sf-demod.c +2 -2
index c61f246..694e207 100644
@@ -507,9 +507,9 @@ static int mxl111sf_demod_read_signal_strength(struct dvb_frontend *fe,
 	return 0;
 }
 
-static int mxl111sf_demod_get_frontend(struct dvb_frontend *fe,
-				       struct dtv_frontend_properties *p)
+static int mxl111sf_demod_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct mxl111sf_demod_state *state = fe->demodulator_priv;
 
 	mxl_dbg("()");
drivers/media/dvb/dvb-usb/vp702x-fe.c +0 -8
index fa0b811..178e938 100644
@@ -211,13 +211,6 @@ static int vp702x_fe_sleep(struct dvb_frontend *fe)
 	return 0;
 }
 
-static int vp702x_fe_get_frontend(struct dvb_frontend* fe,
-				  struct dtv_frontend_properties *fep)
-{
-	deb_fe("%s\n",__func__);
-	return 0;
-}
-
 static int vp702x_fe_send_diseqc_msg (struct dvb_frontend* fe,
 				    struct dvb_diseqc_master_cmd *m)
 {
@@ -372,7 +365,6 @@ static struct dvb_frontend_ops vp702x_fe_ops = {
 	.sleep = vp702x_fe_sleep,
 
 	.set_frontend = vp702x_fe_set_frontend,
-	.get_frontend = vp702x_fe_get_frontend,
 	.get_tune_settings = vp702x_fe_get_tune_settings,
 
 	.read_status = vp702x_fe_read_status,
drivers/media/dvb/firewire/firedtv-fe.c +0 -20
index e1705a9..39f5caa 100644
@@ -149,22 +149,6 @@ static int fdtv_set_frontend(struct dvb_frontend *fe)
 	return avc_tuner_dsd(fdtv, p);
 }
 
-static int fdtv_get_frontend(struct dvb_frontend *fe,
-			     struct dtv_frontend_properties *params)
-{
-	return -EOPNOTSUPP;
-}
-
-static int fdtv_get_property(struct dvb_frontend *fe, struct dtv_property *tvp)
-{
-	return 0;
-}
-
-static int fdtv_set_property(struct dvb_frontend *fe, struct dtv_property *tvp)
-{
-	return 0;
-}
-
 void fdtv_frontend_init(struct firedtv *fdtv, const char *name)
 {
 	struct dvb_frontend_ops *ops = &fdtv->fe.ops;
@@ -174,10 +158,6 @@ void fdtv_frontend_init(struct firedtv *fdtv, const char *name)
 	ops->sleep			= fdtv_sleep;
 
 	ops->set_frontend		= fdtv_set_frontend;
-	ops->get_frontend		= fdtv_get_frontend;
-
-	ops->get_property		= fdtv_get_property;
-	ops->set_property		= fdtv_set_property;
 
 	ops->read_status		= fdtv_read_status;
 	ops->read_ber			= fdtv_read_ber;
drivers/media/dvb/frontends/af9013.c +2 -2
index a8aefe9..e630d46 100644
@@ -670,9 +670,9 @@ error:
 	return ret;
 }
 
-static int af9013_get_frontend(struct dvb_frontend *fe,
-			       struct dtv_frontend_properties *c)
+static int af9013_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
 	struct af9013_state *state = fe->demodulator_priv;
 	int ret;
 	u8 i, buf[3];
drivers/media/dvb/frontends/atbm8830.c +2 -2
index c4edbbe..ff86074 100644
@@ -297,9 +297,9 @@ static int atbm8830_set_fe(struct dvb_frontend *fe)
 	return 0;
 }
 
-static int atbm8830_get_fe(struct dvb_frontend *fe,
-			   struct dtv_frontend_properties *c)
+static int atbm8830_get_fe(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
 	dprintk("%s\n", __func__);
 
 	/* TODO: get real readings from device */
drivers/media/dvb/frontends/au8522_dig.c +2 -2
index 027d45d..762cd5e 100644
@@ -911,9 +911,9 @@ static int au8522_read_ber(struct dvb_frontend *fe, u32 *ber)
 	return au8522_read_ucblocks(fe, ber);
 }
 
-static int au8522_get_frontend(struct dvb_frontend *fe,
-			       struct dtv_frontend_properties *c)
+static int au8522_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
 	struct au8522_state *state = fe->demodulator_priv;
 
 	c->frequency = state->current_frequency;
drivers/media/dvb/frontends/cx22700.c +2 -2
index 3c571b9..d5d61a5 100644
@@ -341,9 +341,9 @@ static int cx22700_set_frontend(struct dvb_frontend* fe)
 	return 0;
 }
 
-static int cx22700_get_frontend(struct dvb_frontend* fe,
-				struct dtv_frontend_properties *c)
+static int cx22700_get_frontend(struct dvb_frontend* fe)
 {
+	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
 	struct cx22700_state* state = fe->demodulator_priv;
 	u8 reg09 = cx22700_readreg (state, 0x09);
 
drivers/media/dvb/frontends/cx22702.c +2 -2
index 225ce84..587c3ec 100644
@@ -546,9 +546,9 @@ static int cx22702_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
 	return 0;
 }
 
-static int cx22702_get_frontend(struct dvb_frontend *fe,
-				struct dtv_frontend_properties *c)
+static int cx22702_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
 	struct cx22702_state *state = fe->demodulator_priv;
 
 	u8 reg0C = cx22702_readreg(state, 0x0C);
drivers/media/dvb/frontends/cx24110.c +2 -2
index 6f85bb1..98014fc 100644
@@ -549,9 +549,9 @@ static int cx24110_set_frontend(struct dvb_frontend* fe)
 	return 0;
 }
 
-static int cx24110_get_frontend(struct dvb_frontend* fe,
-				struct dtv_frontend_properties *p)
+static int cx24110_get_frontend(struct dvb_frontend* fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct cx24110_state *state = fe->demodulator_priv;
 	s32 afc; unsigned sclk;
 
drivers/media/dvb/frontends/cx24123.c +2 -2
index faafb1f..ad5d1a4 100644
@@ -959,9 +959,9 @@ static int cx24123_set_frontend(struct dvb_frontend *fe)
 	return 0;
 }
 
-static int cx24123_get_frontend(struct dvb_frontend *fe,
-				struct dtv_frontend_properties *p)
+static int cx24123_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct cx24123_state *state = fe->demodulator_priv;
 
 	dprintk("\n");
drivers/media/dvb/frontends/cxd2820r_core.c +2 -2
index 96ceed7..b14e509 100644
@@ -381,9 +381,9 @@ static int cxd2820r_read_status(struct dvb_frontend *fe, fe_status_t *status)
 	return ret;
 }
 
-static int cxd2820r_get_frontend(struct dvb_frontend *fe,
-				 struct dtv_frontend_properties *c)
+static int cxd2820r_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
 	struct cxd2820r_priv *priv = fe->demodulator_priv;
 	int ret;
 	dbg("%s: delsys=%d", __func__, fe->dtv_property_cache.delivery_system);
drivers/media/dvb/frontends/dib3000mb.c +4 -5
index 432d1b0..01a1e30 100644
@@ -112,8 +112,7 @@ static u16 dib3000_seq[2][2][2] =     /* fft,gua,   inv   */
 		}
 	};
 
-static int dib3000mb_get_frontend(struct dvb_frontend* fe,
-				  struct dtv_frontend_properties *c);
+static int dib3000mb_get_frontend(struct dvb_frontend* fe);
 
 static int dib3000mb_set_frontend(struct dvb_frontend* fe, int tuner)
 {
@@ -360,7 +359,7 @@ static int dib3000mb_set_frontend(struct dvb_frontend* fe, int tuner)
 		deb_setf("search_state after autosearch %d after %d checks\n",search_state,as_count);
 
 		if (search_state == 1) {
-			if (dib3000mb_get_frontend(fe, c) == 0) {
+			if (dib3000mb_get_frontend(fe) == 0) {
 				deb_setf("reading tuning data from frontend succeeded.\n");
 				return dib3000mb_set_frontend(fe, 0);
 			}
@@ -451,9 +450,9 @@ static int dib3000mb_fe_init(struct dvb_frontend* fe, int mobile_mode)
 	return 0;
 }
 
-static int dib3000mb_get_frontend(struct dvb_frontend* fe,
-				  struct dtv_frontend_properties *c)
+static int dib3000mb_get_frontend(struct dvb_frontend* fe)
 {
+	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
 	struct dib3000_state* state = fe->demodulator_priv;
 	fe_code_rate_t *cr;
 	u16 tps_val;
drivers/media/dvb/frontends/dib3000mc.c +4 -6
index d98a010..f2ad9ae 100644
@@ -632,9 +632,9 @@ struct i2c_adapter * dib3000mc_get_tuner_i2c_master(struct dvb_frontend *demod,
 
 EXPORT_SYMBOL(dib3000mc_get_tuner_i2c_master);
 
-static int dib3000mc_get_frontend(struct dvb_frontend* fe,
-				  struct dtv_frontend_properties *fep)
+static int dib3000mc_get_frontend(struct dvb_frontend* fe)
 {
+	struct dtv_frontend_properties *fep = &fe->dtv_property_cache;
 	struct dib3000mc_state *state = fe->demodulator_priv;
 	u16 tps = dib3000mc_read_word(state,458);
 
@@ -689,7 +689,7 @@ static int dib3000mc_get_frontend(struct dvb_frontend* fe,
 
 static int dib3000mc_set_frontend(struct dvb_frontend* fe)
 {
-	struct dtv_frontend_properties *fep = &fe->dtv_property_cache, tmp;
+	struct dtv_frontend_properties *fep = &fe->dtv_property_cache;
 	struct dib3000mc_state *state = fe->demodulator_priv;
 	int ret;
 
@@ -712,8 +712,6 @@ static int dib3000mc_set_frontend(struct dvb_frontend* fe)
 	    fep->code_rate_HP   == FEC_AUTO) {
 		int i = 1000, found;
 
-		tmp = *fep;
-
 		dib3000mc_autosearch_start(fe);
 		do {
 			msleep(1);
@@ -724,7 +722,7 @@ static int dib3000mc_set_frontend(struct dvb_frontend* fe)
 		if (found == 0 || found == 1)
 			return 0; // no channel found
 
-		dib3000mc_get_frontend(fe, &tmp);
+		dib3000mc_get_frontend(fe);
 	}
 
 	ret = dib3000mc_tune(fe);
drivers/media/dvb/frontends/dib7000m.c +4 -6
index b6a25a2..aa6a798 100644
@@ -1154,9 +1154,9 @@ static int dib7000m_identify(struct dib7000m_state *state)
 }
 
 
-static int dib7000m_get_frontend(struct dvb_frontend* fe,
-				 struct dtv_frontend_properties *fep)
+static int dib7000m_get_frontend(struct dvb_frontend* fe)
 {
+	struct dtv_frontend_properties *fep = &fe->dtv_property_cache;
 	struct dib7000m_state *state = fe->demodulator_priv;
 	u16 tps = dib7000m_read_word(state,480);
 
@@ -1214,7 +1214,7 @@ static int dib7000m_get_frontend(struct dvb_frontend* fe,
 
 static int dib7000m_set_frontend(struct dvb_frontend* fe)
 {
-	struct dtv_frontend_properties *fep = &fe->dtv_property_cache, tmp;
+	struct dtv_frontend_properties *fep = &fe->dtv_property_cache;
 	struct dib7000m_state *state = fe->demodulator_priv;
 	int time, ret;
 
@@ -1239,8 +1239,6 @@ static int dib7000m_set_frontend(struct dvb_frontend* fe)
 		fep->code_rate_HP      == FEC_AUTO) {
 		int i = 800, found;
 
-		tmp = *fep;
-
 		dib7000m_autosearch_start(fe);
 		do {
 			msleep(1);
@@ -1251,7 +1249,7 @@ static int dib7000m_set_frontend(struct dvb_frontend* fe)
 		if (found == 0 || found == 1)
 			return 0; // no channel found
 
-		dib7000m_get_frontend(fe, &tmp);
+		dib7000m_get_frontend(fe);
 	}
 
 	ret = dib7000m_tune(fe);
drivers/media/dvb/frontends/dib7000p.c +4 -5
index c92c1a0..361bdb1 100644
@@ -1384,9 +1384,9 @@ static int dib7000p_identify(struct dib7000p_state *st)
 	return 0;
 }
 
-static int dib7000p_get_frontend(struct dvb_frontend *fe,
-				 struct dtv_frontend_properties *fep)
+static int dib7000p_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *fep = &fe->dtv_property_cache;
 	struct dib7000p_state *state = fe->demodulator_priv;
 	u16 tps = dib7000p_read_word(state, 463);
 
@@ -1482,7 +1482,7 @@ static int dib7000p_get_frontend(struct dvb_frontend *fe,
 
 static int dib7000p_set_frontend(struct dvb_frontend *fe)
 {
-	struct dtv_frontend_properties *fep = &fe->dtv_property_cache, tmp;
+	struct dtv_frontend_properties *fep = &fe->dtv_property_cache;
 	struct dib7000p_state *state = fe->demodulator_priv;
 	int time, ret;
 
@@ -1509,7 +1509,6 @@ static int dib7000p_set_frontend(struct dvb_frontend *fe)
 		fep->guard_interval == GUARD_INTERVAL_AUTO || fep->modulation == QAM_AUTO || fep->code_rate_HP == FEC_AUTO) {
 		int i = 800, found;
 
-		tmp = *fep;
 		dib7000p_autosearch_start(fe);
 		do {
 			msleep(1);
@@ -1520,7 +1519,7 @@ static int dib7000p_set_frontend(struct dvb_frontend *fe)
 		if (found == 0 || found == 1)
 			return 0;
 
-		dib7000p_get_frontend(fe, &tmp);
+		dib7000p_get_frontend(fe);
 	}
 
 	ret = dib7000p_tune(fe);
drivers/media/dvb/frontends/dib8000.c +3 -3
index 115c099..fe07d74 100644
@@ -2810,7 +2810,7 @@ int dib8000_set_tune_state(struct dvb_frontend *fe, enum frontend_tune_state tun
 }
 EXPORT_SYMBOL(dib8000_set_tune_state);
 
-static int dib8000_get_frontend(struct dvb_frontend *fe, struct dtv_frontend_properties *c)
+static int dib8000_get_frontend(struct dvb_frontend *fe)
 {
 	struct dib8000_state *state = fe->demodulator_priv;
 	u16 i, val = 0;
@@ -2824,7 +2824,7 @@ static int dib8000_get_frontend(struct dvb_frontend *fe, struct dtv_frontend_pro
 		if (stat&FE_HAS_SYNC) {
 			dprintk("TMCC lock on the slave%i", index_frontend);
 			/* synchronize the cache with the other frontends */
-			state->fe[index_frontend]->ops.get_frontend(state->fe[index_frontend], c);
+			state->fe[index_frontend]->ops.get_frontend(state->fe[index_frontend]);
 			for (sub_index_frontend = 0; (sub_index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[sub_index_frontend] != NULL); sub_index_frontend++) {
 				if (sub_index_frontend != index_frontend) {
 					state->fe[sub_index_frontend]->dtv_property_cache.isdbt_sb_mode = state->fe[index_frontend]->dtv_property_cache.isdbt_sb_mode;
@@ -3088,7 +3088,7 @@ static int dib8000_set_frontend(struct dvb_frontend *fe)
 
 		dprintk("tune success on frontend%i", index_frontend_success);
 
-		dib8000_get_frontend(fe, &state->fe[0]->dtv_property_cache);
+		dib8000_get_frontend(fe);
 	}
 
 	for (index_frontend = 0, ret = 0; (ret >= 0) && (index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[index_frontend] != NULL); index_frontend++)
drivers/media/dvb/frontends/dib9000.c +3 -3
index 974c2b7..2312b4d 100644
@@ -1867,7 +1867,7 @@ static int dib9000_fe_get_tune_settings(struct dvb_frontend *fe, struct dvb_fron
 	return 0;
 }
 
-static int dib9000_get_frontend(struct dvb_frontend *fe, struct dtv_frontend_properties *c)
+static int dib9000_get_frontend(struct dvb_frontend *fe)
 {
 	struct dib9000_state *state = fe->demodulator_priv;
 	u8 index_frontend, sub_index_frontend;
@@ -1883,7 +1883,7 @@ static int dib9000_get_frontend(struct dvb_frontend *fe, struct dtv_frontend_pro
 			dprintk("TPS lock on the slave%i", index_frontend);
 
 			/* synchronize the cache with the other frontends */
-			state->fe[index_frontend]->ops.get_frontend(state->fe[index_frontend], c);
+			state->fe[index_frontend]->ops.get_frontend(state->fe[index_frontend]);
 			for (sub_index_frontend = 0; (sub_index_frontend < MAX_NUMBER_OF_FRONTENDS) && (state->fe[sub_index_frontend] != NULL);
 			     sub_index_frontend++) {
 				if (sub_index_frontend != index_frontend) {
@@ -2054,7 +2054,7 @@ static int dib9000_set_frontend(struct dvb_frontend *fe)
 
 	/* synchronize all the channel cache */
 	state->get_frontend_internal = 1;
-	dib9000_get_frontend(state->fe[0], &state->fe[0]->dtv_property_cache);
+	dib9000_get_frontend(state->fe[0]);
 	state->get_frontend_internal = 0;
 
 	/* retune the other frontends with the found channel */
drivers/media/dvb/frontends/dvb_dummy_fe.c +4 -2
index b5e2a70..0f0796b 100644
@@ -68,8 +68,10 @@ static int dvb_dummy_fe_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
 	return 0;
 }
 
-static int dvb_dummy_fe_get_frontend(struct dvb_frontend *fe,
-				     struct dtv_frontend_properties *c)
+/*
+ * Only needed if it actually reads something from the hardware
+ */
+static int dvb_dummy_fe_get_frontend(struct dvb_frontend *fe)
 {
 	return 0;
 }
drivers/media/dvb/frontends/it913x-fe.c +2 -2
index 5a353cb..187d9ea 100644
@@ -572,9 +572,9 @@ static int it913x_fe_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
 	return 0;
 }
 
-static int it913x_fe_get_frontend(struct dvb_frontend *fe,
-			struct dtv_frontend_properties *p)
+static int it913x_fe_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct it913x_fe_state *state = fe->demodulator_priv;
 	int ret;
 	u8 reg[8];
drivers/media/dvb/frontends/l64781.c +2 -2
index 1784e34..4fc6dda 100644
@@ -243,9 +243,9 @@ static int apply_frontend_param (struct dvb_frontend* fe)
 	return 0;
 }
 
-static int get_frontend(struct dvb_frontend* fe,
-			struct dtv_frontend_properties *p)
+static int get_frontend(struct dvb_frontend* fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct l64781_state* state = fe->demodulator_priv;
 	int tmp;
 
drivers/media/dvb/frontends/lgdt3305.c +2 -2
index 58eb7bc..0b289b2 100644
@@ -813,9 +813,9 @@ fail:
 	return ret;
 }
 
-static int lgdt3305_get_frontend(struct dvb_frontend *fe,
-				 struct dtv_frontend_properties *p)
+static int lgdt3305_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct lgdt3305_state *state = fe->demodulator_priv;
 
 	lg_dbg("\n");
drivers/media/dvb/frontends/lgdt330x.c +2 -2
index f117eeb..cf69df3 100644
@@ -428,9 +428,9 @@ static int lgdt330x_set_parameters(struct dvb_frontend* fe)
 	return 0;
 }
 
-static int lgdt330x_get_frontend(struct dvb_frontend *fe,
-				 struct dtv_frontend_properties *p)
+static int lgdt330x_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct lgdt330x_state *state = fe->demodulator_priv;
 	p->frequency = state->current_frequency;
 	return 0;
drivers/media/dvb/frontends/lgs8gl5.c +2 -2
index 0f4bc16..8f2f43b 100644
@@ -336,9 +336,9 @@ lgs8gl5_set_frontend(struct dvb_frontend *fe)
 
 
 static int
-lgs8gl5_get_frontend(struct dvb_frontend *fe,
-		struct dtv_frontend_properties *p)
+lgs8gl5_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct lgs8gl5_state *state = fe->demodulator_priv;
 	u8 inv = lgs8gl5_read_reg(state, REG_INVERSION);
 
drivers/media/dvb/frontends/lgs8gxx.c +2 -2
index da7d8f6..a47add2 100644
@@ -691,9 +691,9 @@ static int lgs8gxx_set_fe(struct dvb_frontend *fe)
 	return 0;
 }
 
-static int lgs8gxx_get_fe(struct dvb_frontend *fe,
-			  struct dtv_frontend_properties *fe_params)
+static int lgs8gxx_get_fe(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *fe_params = &fe->dtv_property_cache;
 	dprintk("%s\n", __func__);
 
 	/* TODO: get real readings from device */
drivers/media/dvb/frontends/mb86a20s.c +2 -2
index d71d6ee..4267e51 100644
@@ -525,9 +525,9 @@ static int mb86a20s_set_frontend(struct dvb_frontend *fe)
 	return rc;
 }
 
-static int mb86a20s_get_frontend(struct dvb_frontend *fe,
-				 struct dtv_frontend_properties *p)
+static int mb86a20s_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 
 	/* FIXME: For now, it does nothing */
 
drivers/media/dvb/frontends/mt312.c +2 -2
index 3e4512a..90aac0d 100644
@@ -636,9 +636,9 @@ static int mt312_set_frontend(struct dvb_frontend *fe)
 	return 0;
 }
 
-static int mt312_get_frontend(struct dvb_frontend *fe,
-			      struct dtv_frontend_properties *p)
+static int mt312_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct mt312_state *state = fe->demodulator_priv;
 	int ret;
 
drivers/media/dvb/frontends/mt352.c +2 -2
index 0155fa8..84129ae 100644
@@ -311,9 +311,9 @@ static int mt352_set_parameters(struct dvb_frontend* fe)
 	return 0;
 }
 
-static int mt352_get_parameters(struct dvb_frontend* fe,
-				struct dtv_frontend_properties *op)
+static int mt352_get_parameters(struct dvb_frontend* fe)
 {
+	struct dtv_frontend_properties *op = &fe->dtv_property_cache;
 	struct mt352_state* state = fe->demodulator_priv;
 	u16 tps;
 	u16 div;
drivers/media/dvb/frontends/or51132.c +2 -2
index 2d9e81b..5bb6f3e 100644
@@ -375,9 +375,9 @@ static int or51132_set_parameters(struct dvb_frontend* fe)
 	return 0;
 }
 
-static int or51132_get_parameters(struct dvb_frontend* fe,
-				  struct dtv_frontend_properties *p)
+static int or51132_get_parameters(struct dvb_frontend* fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct or51132_state* state = fe->demodulator_priv;
 	int status;
 	int retry = 1;
drivers/media/dvb/frontends/s5h1409.c +2 -2
index 2641fd5..21baea8 100644
@@ -925,9 +925,9 @@ static int s5h1409_read_ber(struct dvb_frontend *fe, u32 *ber)
 	return s5h1409_read_ucblocks(fe, ber);
 }
 
-static int s5h1409_get_frontend(struct dvb_frontend *fe,
-				struct dtv_frontend_properties *p)
+static int s5h1409_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct s5h1409_state *state = fe->demodulator_priv;
 
 	p->frequency = state->current_frequency;
drivers/media/dvb/frontends/s5h1411.c +2 -2
index 08f568c..b8c7feb 100644
@@ -840,9 +840,9 @@ static int s5h1411_read_ber(struct dvb_frontend *fe, u32 *ber)
 	return s5h1411_read_ucblocks(fe, ber);
 }
 
-static int s5h1411_get_frontend(struct dvb_frontend *fe,
-				struct dtv_frontend_properties *p)
+static int s5h1411_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct s5h1411_state *state = fe->demodulator_priv;
 
 	p->frequency = state->current_frequency;
drivers/media/dvb/frontends/s5h1420.c +2 -2
index 0726494..3d0334a 100644
@@ -765,9 +765,9 @@ static int s5h1420_set_frontend(struct dvb_frontend* fe)
 	return 0;
 }
 
-static int s5h1420_get_frontend(struct dvb_frontend* fe,
-				struct dtv_frontend_properties *p)
+static int s5h1420_get_frontend(struct dvb_frontend* fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct s5h1420_state* state = fe->demodulator_priv;
 
 	p->frequency = state->tunedfreq + s5h1420_getfreqoffset(state);
drivers/media/dvb/frontends/s921.c +2 -2
index 7652d3f..6012e10 100644
@@ -433,9 +433,9 @@ static int s921_set_frontend(struct dvb_frontend *fe)
 	return 0;
 }
 
-static int s921_get_frontend(struct dvb_frontend *fe,
-	struct dtv_frontend_properties *p)
+static int s921_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct s921_state *state = fe->demodulator_priv;
 
 	/* FIXME: Probably it is possible to get it from regs f1 and f2 */
drivers/media/dvb/frontends/stb0899_drv.c +2 -1
index 9fad627..c9e1785 100644
@@ -1569,8 +1569,9 @@ static enum dvbfe_search stb0899_search(struct dvb_frontend *fe)
 	return DVBFE_ALGO_SEARCH_ERROR;
 }
 
-static int stb0899_get_frontend(struct dvb_frontend *fe, struct dtv_frontend_properties *p)
+static int stb0899_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct stb0899_state *state		= fe->demodulator_priv;
 	struct stb0899_internal *internal	= &state->internal;
 
drivers/media/dvb/frontends/stb6100.c +1 -1
index a566763..2d7c901 100644
@@ -337,7 +337,7 @@ static int stb6100_set_frequency(struct dvb_frontend *fe, u32 frequency)
 
 	if (fe->ops.get_frontend) {
 		dprintk(verbose, FE_DEBUG, 1, "Get frontend parameters");
-		fe->ops.get_frontend(fe, &p);
+		fe->ops.get_frontend(fe);
 	}
 	srate = p.symbol_rate;
 
drivers/media/dvb/frontends/stv0297.c +2 -1
index 88e8e52..dd0a190 100644
@@ -614,8 +614,9 @@ timeout:
 	return 0;
 }
 
-static int stv0297_get_frontend(struct dvb_frontend *fe, struct dtv_frontend_properties *p)
+static int stv0297_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct stv0297_state *state = fe->demodulator_priv;
 	int reg_00, reg_83;
 
drivers/media/dvb/frontends/stv0299.c +2 -1
index ad6f3a6..114d112 100644
@@ -596,8 +596,9 @@ static int stv0299_set_frontend(struct dvb_frontend* fe)
 	return 0;
 }
 
-static int stv0299_get_frontend(struct dvb_frontend* fe, struct dtv_frontend_properties * p)
+static int stv0299_get_frontend(struct dvb_frontend* fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct stv0299_state* state = fe->demodulator_priv;
 	s32 derot_freq;
 	int invval;
drivers/media/dvb/frontends/stv0367.c +4 -4
index 7c8964f6..6786b9e 100644
@@ -1926,9 +1926,9 @@ static int stv0367ter_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
 	return 0;
 }
 
-static int stv0367ter_get_frontend(struct dvb_frontend *fe,
-				   struct dtv_frontend_properties *p)
+static int stv0367ter_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct stv0367_state *state = fe->demodulator_priv;
 	struct stv0367ter_state *ter_state = state->ter_state;
 
@@ -3136,9 +3136,9 @@ static int stv0367cab_set_frontend(struct dvb_frontend *fe)
 	return 0;
 }
 
-static int stv0367cab_get_frontend(struct dvb_frontend *fe,
-				   struct dtv_frontend_properties *p)
+static int stv0367cab_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct stv0367_state *state = fe->demodulator_priv;
 	struct stv0367cab_state *cab_state = state->cab_state;
 
drivers/media/dvb/frontends/stv0900_core.c +2 -2
index 8af1e624..33325ae 100644
@@ -1843,9 +1843,9 @@ static int stv0900_sleep(struct dvb_frontend *fe)
 	return 0;
 }
 
-static int stv0900_get_frontend(struct dvb_frontend *fe,
-				struct dtv_frontend_properties *p)
+static int stv0900_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct stv0900_state *state = fe->demodulator_priv;
 	struct stv0900_internal *intp = state->internal;
 	enum fe_stv0900_demod_num demod = state->demod;
drivers/media/dvb/frontends/tda10021.c +2 -1
index c8ab01b..035e0e2 100644
@@ -386,8 +386,9 @@ static int tda10021_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
 	return 0;
 }
 
-static int tda10021_get_frontend(struct dvb_frontend* fe, struct dtv_frontend_properties *p)
+static int tda10021_get_frontend(struct dvb_frontend* fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct tda10021_state* state = fe->demodulator_priv;
 	int sync;
 	s8 afc = 0;
drivers/media/dvb/frontends/tda10023.c +2 -1
index 8f451dc..55d7563 100644
@@ -456,8 +456,9 @@ static int tda10023_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
 	return 0;
 }
 
-static int tda10023_get_frontend(struct dvb_frontend* fe, struct dtv_frontend_properties *p)
+static int tda10023_get_frontend(struct dvb_frontend* fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct tda10023_state* state = fe->demodulator_priv;
 	int sync,inv;
 	s8 afc = 0;
drivers/media/dvb/frontends/tda10048.c +2 -2
index dfd1d5a..99bf0c0 100644
@@ -1028,9 +1028,9 @@ static int tda10048_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
 	return 0;
 }
 
-static int tda10048_get_frontend(struct dvb_frontend *fe,
-	struct dtv_frontend_properties *p)
+static int tda10048_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct tda10048_state *state = fe->demodulator_priv;
 
 	dprintk(1, "%s()\n", __func__);
drivers/media/dvb/frontends/tda1004x.c +2 -1
index d5e68af..e180103 100644
@@ -895,8 +895,9 @@ static int tda1004x_set_fe(struct dvb_frontend* fe)
 	return 0;
 }
 
-static int tda1004x_get_fe(struct dvb_frontend* fe, struct dtv_frontend_properties *fe_params)
+static int tda1004x_get_fe(struct dvb_frontend* fe)
 {
+	struct dtv_frontend_properties *fe_params = &fe->dtv_property_cache;
 	struct tda1004x_state* state = fe->demodulator_priv;
 
 	dprintk("%s\n", __func__);
drivers/media/dvb/frontends/tda10071.c +2 -2
index 68dcce6..d9e0bd9 100644
@@ -776,9 +776,9 @@ error:
 	return ret;
 }
 
-static int tda10071_get_frontend(struct dvb_frontend *fe,
-	struct dtv_frontend_properties *p)
+static int tda10071_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct tda10071_priv *priv = fe->demodulator_priv;
 	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
 	int ret, i;
drivers/media/dvb/frontends/tda10086.c +2 -1
index cfc6e0e..83256d5 100644
@@ -457,8 +457,9 @@ static int tda10086_set_frontend(struct dvb_frontend* fe)
 	return 0;
 }
 
-static int tda10086_get_frontend(struct dvb_frontend* fe, struct dtv_frontend_properties *fe_params)
+static int tda10086_get_frontend(struct dvb_frontend* fe)
 {
+	struct dtv_frontend_properties *fe_params = &fe->dtv_property_cache;
 	struct tda10086_state* state = fe->demodulator_priv;
 	u8 val;
 	int tmp;
drivers/media/dvb/frontends/tda8083.c +2 -1
index 88a22d3..7a16e8d 100644
@@ -335,8 +335,9 @@ static int tda8083_set_frontend(struct dvb_frontend* fe)
 	return 0;
 }
 
-static int tda8083_get_frontend(struct dvb_frontend* fe, struct dtv_frontend_properties *p)
+static int tda8083_get_frontend(struct dvb_frontend* fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct tda8083_state* state = fe->demodulator_priv;
 
 	/*  FIXME: get symbolrate & frequency offset...*/
drivers/media/dvb/frontends/ves1820.c +2 -1
index ef1b5fe..37ff9f0 100644
@@ -310,8 +310,9 @@ static int ves1820_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
 	return 0;
 }
 
-static int ves1820_get_frontend(struct dvb_frontend* fe, struct dtv_frontend_properties *p)
+static int ves1820_get_frontend(struct dvb_frontend* fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct ves1820_state* state = fe->demodulator_priv;
 	int sync;
 	s8 afc = 0;
drivers/media/dvb/frontends/ves1x93.c +2 -2
index 15929c2..13f3a21 100644
@@ -403,9 +403,9 @@ static int ves1x93_set_frontend(struct dvb_frontend* fe)
 	return 0;
 }
 
-static int ves1x93_get_frontend(struct dvb_frontend* fe,
-				struct dtv_frontend_properties *p)
+static int ves1x93_get_frontend(struct dvb_frontend* fe)
 {
+	struct dtv_frontend_properties *p = &fe->dtv_property_cache;
 	struct ves1x93_state* state = fe->demodulator_priv;
 	int afc;
 
drivers/media/dvb/frontends/zl10353.c +2 -2
index 39c1bdb..816fa86 100644
@@ -371,9 +371,9 @@ static int zl10353_set_parameters(struct dvb_frontend *fe)
 	return 0;
 }
 
-static int zl10353_get_parameters(struct dvb_frontend *fe,
-				  struct dtv_frontend_properties *c)
+static int zl10353_get_parameters(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
 	struct zl10353_state *state = fe->demodulator_priv;
 	int s6, s9;
 	u16 tps;
drivers/media/dvb/siano/smsdvb.c +2 -2
index 71ee9fa..198cc0e 100644
@@ -739,9 +739,9 @@ static int smsdvb_set_frontend(struct dvb_frontend *fe)
 	}
 }
 
-static int smsdvb_get_frontend(struct dvb_frontend *fe,
-			      struct dtv_frontend_properties *fep)
+static int smsdvb_get_frontend(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *fep = &fe->dtv_property_cache;
 	struct smsdvb_client_t *client =
 		container_of(fe, struct smsdvb_client_t, frontend);
 
drivers/media/video/tlg2300/pd-dvb.c +2 -2
index 7998811..d7aac42 100644
@@ -231,9 +231,9 @@ static s32 poseidon_fe_init(struct dvb_frontend *fe)
 	return 0;
 }
 
-static int poseidon_get_fe(struct dvb_frontend *fe,
-			struct dtv_frontend_properties *fep)
+static int poseidon_get_fe(struct dvb_frontend *fe)
 {
+	struct dtv_frontend_properties *fep = &fe->dtv_property_cache;
 	struct poseidon *pd = fe->demodulator_priv;
 	struct pd_dvb_adapter *pd_dvb = &pd->dvb_data;
 
Signature · 1 line
1.7.8.352.g876a6
#95 lore raw
In reply to Mauro Carvalho Chehab

Hi Mauro,

Quoted 3 lines · Mauro Carvalho Chehab

This patch series comes after the previous series of 47 patches. Basically, changes all DVB frontend drivers to work directly with the DVBv5 structure. This warrants that all drivers will be

Is there any git tree available with all these patches ? It would be easier to pull rather than applying almost 150 patches. :) I know I don't need them all, but just to be sure I have all the relevant changes in place for testing.

--
Thanks,
Sylwester

#96 lore raw
Quoted 11 lines · Sylwester Nawrocki

Hi Mauro,

Quoted 3 lines · Mauro Carvalho Chehab

This patch series comes after the previous series of 47 patches. Basically, changes all DVB frontend drivers to work directly with the DVBv5 structure. This warrants that all drivers will be

Is there any git tree available with all these patches ? It would be easier to pull rather than applying almost 150 patches. :) I know I don't need them all, but just to be sure I have all the relevant changes in place for testing.

Forgot to mention, and to update them on my tree. The latest version are at the branch "DVB_v5_v5" on my experimental tree:
http://git.linuxtv.org/mchehab/experimental.git/shortlog/refs/heads/DVB_v5_v5

(yeah, I know: the name become weird... It were "DVB_v5", meaning DVB API v5,
then, for each rebase, I added a new branch there)

Quoted 8 lines

--
Thanks,
Sylwester
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#97 lore raw
Quoted 13 lines · Mauro Carvalho Chehab
Quoted 11 lines · Sylwester Nawrocki

Hi Mauro,

Quoted 3 lines · Mauro Carvalho Chehab

This patch series comes after the previous series of 47 patches. Basically, changes all DVB frontend drivers to work directly with the DVBv5 structure. This warrants that all drivers will be

Is there any git tree available with all these patches ? It would be easier to pull rather than applying almost 150 patches. :) I know I don't need them all, but just to be sure I have all the relevant changes in place for testing.

Quoted 6 lines

Forgot to mention, and to update them on my tree. The latest version are at the branch "DVB_v5_v5" on my experimental tree:
http://git.linuxtv.org/mchehab/experimental.git/shortlog/refs/heads/DVB_v5_v5

(yeah, I know: the name become weird... It were "DVB_v5", meaning DVB API v5,
then, for each rebase, I added a new branch there)

Just for the record, I've tested it with as102 driver (pctv74e usb stick) and MeTV and didn't notice any runtime problems.

Signature · 2 lines
Thanks,
Sylwester
#98 lore raw
Quoted 18 lines · Sylwester Nawrocki
Quoted 17 lines · Mauro Carvalho Chehab
Quoted 11 lines · Sylwester Nawrocki

Hi Mauro,

Quoted 3 lines · Mauro Carvalho Chehab

This patch series comes after the previous series of 47 patches. Basically, changes all DVB frontend drivers to work directly with the DVBv5 structure. This warrants that all drivers will be

Is there any git tree available with all these patches ? It would be easier to pull rather than applying almost 150 patches. :) I know I don't need them all, but just to be sure I have all the relevant changes in place for testing.

Forgot to mention, and to update them on my tree. The latest version are at the branch "DVB_v5_v5" on my experimental tree:
http://git.linuxtv.org/mchehab/experimental.git/shortlog/refs/heads/DVB_v5_v5

Quoted 5 lines
Quoted 2 lines

(yeah, I know: the name become weird... It were "DVB_v5", meaning DVB API v5,
then, for each rebase, I added a new branch there)

Just for the record, I've tested it with as102 driver (pctv74e usb stick) and MeTV and didn't notice any runtime problems.

Thank you for testing it, Sylvester!

I wrote yet another set of patches (this is a shorter one) meant to finish the DVB cleanup.

The new series addresses some issues inside dvb_frontend.c. It is at:

git://linuxtv.org/mchehab/experimental.git DVBv5-v7

Thanks!
Mauro

#99 lore raw
Quoted 23 lines · Mauro Carvalho Chehab
Quoted 16 lines · Sylwester Nawrocki
Quoted 15 lines · Mauro Carvalho Chehab
Quoted 9 lines · Sylwester Nawrocki
Quoted 3 lines · Mauro Carvalho Chehab

This patch series comes after the previous series of 47 patches. Basically, changes all DVB frontend drivers to work directly with the DVBv5 structure. This warrants that all drivers will be

Is there any git tree available with all these patches ? It would be easier to pull rather than applying almost 150 patches. :) I know I don't need them all, but just to be sure I have all the relevant changes in place for testing.

Forgot to mention, and to update them on my tree. The latest version are at the branch "DVB_v5_v5" on my experimental tree:
http://git.linuxtv.org/mchehab/experimental.git/shortlog/refs/heads/DVB_v5_v5

Quoted 5 lines
Quoted 2 lines

(yeah, I know: the name become weird... It were "DVB_v5", meaning DVB API v5,
then, for each rebase, I added a new branch there)

Just for the record, I've tested it with as102 driver (pctv74e usb stick) and MeTV and didn't notice any runtime problems.

Quoted 8 lines

Thank you for testing it, Sylvester!

I wrote yet another set of patches (this is a shorter one) meant to finish the DVB cleanup.

The new series addresses some issues inside dvb_frontend.c. It is at:

git://linuxtv.org/mchehab/experimental.git DVBv5-v7

I've tested this one in same way and didn't find any regressions.

Signature · 2 lines
Thanks,
Sylwester
#100 lore raw
In reply to Mauro Carvalho Chehab
Quoted 2 lines · On Dec 30 Mauro Carvalho Chehab wrote:

Basically, changes all DVB frontend drivers to work directly with the DVBv5 structure.

[...]

Quoted 1 line

Test reports are welcome.

[...]

Quoted 1 line

[media] firedtv: convert set_fontend to use DVBv5 parameters

[...]

Quoted 3 lines
 drivers/media/dvb/firewire/firedtv-avc.c     |   95 ++++++++--------
 drivers/media/dvb/firewire/firedtv-fe.c      |   31 ++----
 drivers/media/dvb/firewire/firedtv.h         |    4 +-

I briefly tested git://linuxtv.org/media_tree.gitstaging/for_v3.3
7c61d80a9bcf on top of v3.2-rc7 on a FireDTV-T/CI with kaffeine and on a FireDTV-C/CI with kaffeine and smplayer and didn't notice any runtime problem.

Building fs/compat_ioctl.c failed for me though:
fs/compat_ioctl.c:1345:1: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_parameters’ fs/compat_ioctl.c:1345:1: error: array type has incomplete element type
etc. pp.

Signature · 3 lines
Stefan Richter
-=====-==-== ==-- =====
http://arcgraph.de/sr/
#101 lore raw
Quoted 7 lines · Stefan Richter
Quoted 2 lines · On Dec 30 Mauro Carvalho Chehab wrote:

Basically, changes all DVB frontend drivers to work directly with the DVBv5 structure.

[...]

Quoted 1 line

Test reports are welcome.

[...]

Quoted 1 line

[media] firedtv: convert set_fontend to use DVBv5 parameters

Quoted 8 lines

[...]

Quoted 3 lines
 drivers/media/dvb/firewire/firedtv-avc.c     |   95 ++++++++--------
 drivers/media/dvb/firewire/firedtv-fe.c      |   31 ++----
 drivers/media/dvb/firewire/firedtv.h         |    4 +-

I briefly tested git://linuxtv.org/media_tree.gitstaging/for_v3.3
7c61d80a9bcf on top of v3.2-rc7 on a FireDTV-T/CI with kaffeine and on a FireDTV-C/CI with kaffeine and smplayer and didn't notice any runtime problem.

Thanks for testing it!

Quoted 4 lines

Building fs/compat_ioctl.c failed for me though:
fs/compat_ioctl.c:1345:1: error: invalid application of ‘sizeof’ to incomplete type ‘struct dvb_frontend_parameters’ fs/compat_ioctl.c:1345:1: error: array type has incomplete element type
etc. pp.

Yeah, I forgot about the compat stuff ;)

The fix is simple:

	http://git.linuxtv.org/media_tree.git/commit/e97a5d893fdf45c20799b72a1c11dca3b282c89c

Basically, one patch at the tree avoids the usage of DVBv3 structs inside the drivers, as this is not supported by the DVB core anymore. The core itself (and compat) will need it, in order to provide DVBv3 compatibility.

Regards,
Mauro