Commit 1cbbf90d authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

[media] af9035: override tuner id when bad value set into eeprom

Tuner ID set into EEPROM is wrong in some cases, which causes driver
to select wrong tuner profile. That leads device non-working. Fix
issue by overriding known bad tuner IDs with suitable default value.

Thanks to MX-NET Telekomunikace s.r.o. for providing non-working
DTV stick, that I could fix the bug!

Cc: stable@vger.kernel.org # v3.15+
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 13936af3
...@@ -704,15 +704,41 @@ static int af9035_read_config(struct dvb_usb_device *d) ...@@ -704,15 +704,41 @@ static int af9035_read_config(struct dvb_usb_device *d)
if (ret < 0) if (ret < 0)
goto err; goto err;
if (tmp == 0x00) dev_dbg(&d->udev->dev, "%s: [%d]tuner=%02x\n",
dev_dbg(&d->udev->dev, __func__, i, tmp);
"%s: [%d]tuner not set, using default\n",
__func__, i); /* tuner sanity check */
else if (state->chip_type == 0x9135) {
if (state->chip_version == 0x02) {
/* IT9135 BX (v2) */
switch (tmp) {
case AF9033_TUNER_IT9135_60:
case AF9033_TUNER_IT9135_61:
case AF9033_TUNER_IT9135_62:
state->af9033_config[i].tuner = tmp;
break;
}
} else {
/* IT9135 AX (v1) */
switch (tmp) {
case AF9033_TUNER_IT9135_38:
case AF9033_TUNER_IT9135_51:
case AF9033_TUNER_IT9135_52:
state->af9033_config[i].tuner = tmp;
break;
}
}
} else {
/* AF9035 */
state->af9033_config[i].tuner = tmp; state->af9033_config[i].tuner = tmp;
}
dev_dbg(&d->udev->dev, "%s: [%d]tuner=%02x\n", if (state->af9033_config[i].tuner != tmp) {
__func__, i, state->af9033_config[i].tuner); dev_info(&d->udev->dev,
"%s: [%d] overriding tuner from %02x to %02x\n",
KBUILD_MODNAME, i, tmp,
state->af9033_config[i].tuner);
}
switch (state->af9033_config[i].tuner) { switch (state->af9033_config[i].tuner) {
case AF9033_TUNER_TUA9001: case AF9033_TUNER_TUA9001:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment