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

Commit 3d945be0 authored by Benjamin Larsson's avatar Benjamin Larsson Committed by Mauro Carvalho Chehab
Browse files

[media] mn88473: simplify bandwidth registers setting code

parent 3b786f13
Loading
Loading
Loading
Loading
+6 −21
Original line number Diff line number Diff line
@@ -59,31 +59,16 @@ static int mn88473_set_frontend(struct dvb_frontend *fe)
		goto err;
	}

	switch (c->delivery_system) {
	case SYS_DVBT:
	case SYS_DVBT2:
	if (c->bandwidth_hz <= 6000000) {
			/* IF 3570000 Hz, BW 6000000 Hz */
		memcpy(bw_val, "\xe9\x55\x55\x1c\x29\x1c\x29", 7);
	} else if (c->bandwidth_hz <= 7000000) {
			/* IF 4570000 Hz, BW 7000000 Hz */
		memcpy(bw_val, "\xc8\x00\x00\x17\x0a\x17\x0a", 7);
	} else if (c->bandwidth_hz <= 8000000) {
			/* IF 4570000 Hz, BW 8000000 Hz */
		memcpy(bw_val, "\xaf\x00\x00\x11\xec\x11\xec", 7);
	} else {
		ret = -EINVAL;
		goto err;
	}
		break;
	case SYS_DVBC_ANNEX_A:
		/* IF 5070000 Hz, BW 8000000 Hz */
		memcpy(bw_val, "\xaf\x00\x00\x11\xec\x11\xec", 7);
		break;
	default:
		ret = -EINVAL;
		goto err;
	}

	/* program tuner */
	if (fe->ops.tuner_ops.set_params) {