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

Commit 51858d13 authored by Michael Krufky's avatar Michael Krufky Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (8036): tda18271: toggle rf agc speed mode on TDA18271HD/C2 only

parent 119a7c7e
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
@@ -75,8 +75,10 @@ static int tda18271_channel_configuration(struct dvb_frontend *fe,
	regs[R_EP3]  &= ~0x1f; /* clear std bits */
	regs[R_EP3]  |= (map->agc_mode << 3) | map->std;

	if (priv->id == TDA18271HDC2) {
		/* set rfagc to high speed mode */
		regs[R_EP3] &= ~0x04;
	}

	/* set cal mode to normal */
	regs[R_EP4]  &= ~0x03;
@@ -168,12 +170,14 @@ static int tda18271_channel_configuration(struct dvb_frontend *fe,

	msleep(20);

	if (priv->id == TDA18271HDC2) {
		/* set rfagc to normal speed mode */
		if (map->fm_rfn)
			regs[R_EP3] &= ~0x04;
		else
			regs[R_EP3] |= 0x04;
		ret = tda18271_write_regs(fe, R_EP3, 1);
	}
fail:
	return ret;
}