Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6f56e7d authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

[media] dvb: don't use DVBv3 bandwidth macros



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

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 88ab898f
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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");
+1 −4
Original line number Diff line number Diff line
@@ -625,7 +625,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:
@@ -645,10 +644,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;
		}
@@ -672,7 +669,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);

+1 −6
Original line number Diff line number Diff line
@@ -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;
}
+2 −12
Original line number Diff line number Diff line
@@ -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;

+1 −11
Original line number Diff line number Diff line
@@ -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;
}

Loading