summaryrefslogtreecommitdiff
path: root/drivers/media/usb/dvb-usb-v2/af9035.c
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2014-06-12 20:12:24 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-26 12:04:10 -0300
commit3ab25123373270152a9fae98e3c48ef1b2a878c0 (patch)
tree7e334344e819edf3fc06ead31c47bcaae579735c /drivers/media/usb/dvb-usb-v2/af9035.c
parent60ecb71a72e93384f6b0f3c5a18a2d1e73f48036 (diff)
[media] af9035: override tuner for AVerMedia A835B devices
Tuner ID set into EEPROM is wrong, 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. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/dvb-usb-v2/af9035.c')
-rw-r--r--drivers/media/usb/dvb-usb-v2/af9035.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c
index 221af2b6e6cf..75ec1c659fdd 100644
--- a/drivers/media/usb/dvb-usb-v2/af9035.c
+++ b/drivers/media/usb/dvb-usb-v2/af9035.c
@@ -799,6 +799,25 @@ static int af9035_read_config(struct dvb_usb_device *d)
addr += 0x10; /* shift for the 2nd tuner params */
}
+ /*
+ * These AVerMedia devices has a bad EEPROM content :-(
+ * Override some wrong values here.
+ */
+ if (le16_to_cpu(d->udev->descriptor.idVendor) == USB_VID_AVERMEDIA) {
+ switch (le16_to_cpu(d->udev->descriptor.idProduct)) {
+ case USB_PID_AVERMEDIA_A835B_1835:
+ case USB_PID_AVERMEDIA_A835B_2835:
+ case USB_PID_AVERMEDIA_A835B_3835:
+ dev_info(&d->udev->dev,
+ "%s: overriding tuner from %02x to %02x\n",
+ KBUILD_MODNAME, state->af9033_config[0].tuner,
+ AF9033_TUNER_IT9135_60);
+
+ state->af9033_config[0].tuner = AF9033_TUNER_IT9135_60;
+ break;
+ }
+ }
+
skip_eeprom:
/* get demod clock */
ret = af9035_rd_reg(d, 0x00d800, &tmp);