aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/cx88
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-04-05 11:18:54 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-08 05:56:47 -0400
commit48a8a03b5806179f12dd6994a6957f797c13675f (patch)
tree63c7bf1f777bfa446859228375e37a14975eb33a /drivers/media/pci/cx88
parenta9bd87c232b87014b20fdf52416f80c5c1e869fc (diff)
[media] cx88: kernel bz#9476: Fix tone setting for Nova-S+ model 92001
Hauppauge Nova-S-Plus DVB-S model 92001 does not lock on horizontal polarisation. According with the info provided at the BZ, model 92002 does. The difference is that, on model 92001, the tone select is done via isl6421, while, on other devices, this is done via cx24123 code. This patch adds a way to override the demod's set_tone at isl6421 driver. In order to avoid regressions, the override is enabled only for cx88 Nova S plus model 92001. For all other models and devices, the set_tone is provided by the demod driver. Patch originally proposed at bz@9476[1] by Michel Meyers and John Donoghue but applying the original patch would break support for all other devices based on isl6421. [1] https://bugzilla.kernel.org/show_bug.cgi?id=9476 Tested-by: Adam Sampson <ats@offog.org> Tested-by: Hans-Peter Jansen <hpj@urpla.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/pci/cx88')
-rw-r--r--drivers/media/pci/cx88/cx88-cards.c1
-rw-r--r--drivers/media/pci/cx88/cx88-dvb.c16
-rw-r--r--drivers/media/pci/cx88/cx88.h1
3 files changed, 14 insertions, 4 deletions
diff --git a/drivers/media/pci/cx88/cx88-cards.c b/drivers/media/pci/cx88/cx88-cards.c
index e2e0b8faf7a4..07b700a9ed7f 100644
--- a/drivers/media/pci/cx88/cx88-cards.c
+++ b/drivers/media/pci/cx88/cx88-cards.c
@@ -2855,6 +2855,7 @@ static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
2855 core->board.tuner_type = tv.tuner_type; 2855 core->board.tuner_type = tv.tuner_type;
2856 core->tuner_formats = tv.tuner_formats; 2856 core->tuner_formats = tv.tuner_formats;
2857 core->board.radio.type = tv.has_radio ? CX88_RADIO : 0; 2857 core->board.radio.type = tv.has_radio ? CX88_RADIO : 0;
2858 core->model = tv.model;
2858 2859
2859 /* Make sure we support the board model */ 2860 /* Make sure we support the board model */
2860 switch (tv.model) 2861 switch (tv.model)
diff --git a/drivers/media/pci/cx88/cx88-dvb.c b/drivers/media/pci/cx88/cx88-dvb.c
index 672b267a2d3e..053ed1ba1d85 100644
--- a/drivers/media/pci/cx88/cx88-dvb.c
+++ b/drivers/media/pci/cx88/cx88-dvb.c
@@ -1042,7 +1042,7 @@ static int dvb_register(struct cx8802_dev *dev)
1042 if (!dvb_attach(isl6421_attach, 1042 if (!dvb_attach(isl6421_attach,
1043 fe0->dvb.frontend, 1043 fe0->dvb.frontend,
1044 &dev->core->i2c_adap, 1044 &dev->core->i2c_adap,
1045 0x08, ISL6421_DCL, 0x00)) 1045 0x08, ISL6421_DCL, 0x00, false))
1046 goto frontend_detach; 1046 goto frontend_detach;
1047 } 1047 }
1048 /* MFE frontend 2 */ 1048 /* MFE frontend 2 */
@@ -1279,8 +1279,16 @@ static int dvb_register(struct cx8802_dev *dev)
1279 &hauppauge_novas_config, 1279 &hauppauge_novas_config,
1280 &core->i2c_adap); 1280 &core->i2c_adap);
1281 if (fe0->dvb.frontend) { 1281 if (fe0->dvb.frontend) {
1282 bool override_tone;
1283
1284 if (core->model == 92001)
1285 override_tone = true;
1286 else
1287 override_tone = false;
1288
1282 if (!dvb_attach(isl6421_attach, fe0->dvb.frontend, 1289 if (!dvb_attach(isl6421_attach, fe0->dvb.frontend,
1283 &core->i2c_adap, 0x08, ISL6421_DCL, 0x00)) 1290 &core->i2c_adap, 0x08, ISL6421_DCL, 0x00,
1291 override_tone))
1284 goto frontend_detach; 1292 goto frontend_detach;
1285 } 1293 }
1286 break; 1294 break;
@@ -1403,7 +1411,7 @@ static int dvb_register(struct cx8802_dev *dev)
1403 if (!dvb_attach(isl6421_attach, 1411 if (!dvb_attach(isl6421_attach,
1404 fe0->dvb.frontend, 1412 fe0->dvb.frontend,
1405 &dev->core->i2c_adap, 1413 &dev->core->i2c_adap,
1406 0x08, ISL6421_DCL, 0x00)) 1414 0x08, ISL6421_DCL, 0x00, false))
1407 goto frontend_detach; 1415 goto frontend_detach;
1408 } 1416 }
1409 /* MFE frontend 2 */ 1417 /* MFE frontend 2 */
@@ -1431,7 +1439,7 @@ static int dvb_register(struct cx8802_dev *dev)
1431 if (!dvb_attach(isl6421_attach, 1439 if (!dvb_attach(isl6421_attach,
1432 fe0->dvb.frontend, 1440 fe0->dvb.frontend,
1433 &dev->core->i2c_adap, 1441 &dev->core->i2c_adap,
1434 0x08, ISL6421_DCL, 0x00)) 1442 0x08, ISL6421_DCL, 0x00, false))
1435 goto frontend_detach; 1443 goto frontend_detach;
1436 } 1444 }
1437 break; 1445 break;
diff --git a/drivers/media/pci/cx88/cx88.h b/drivers/media/pci/cx88/cx88.h
index eca02c2435de..4e29c9deb684 100644
--- a/drivers/media/pci/cx88/cx88.h
+++ b/drivers/media/pci/cx88/cx88.h
@@ -334,6 +334,7 @@ struct cx88_core {
334 /* board name */ 334 /* board name */
335 int nr; 335 int nr;
336 char name[32]; 336 char name[32];
337 u32 model;
337 338
338 /* pci stuff */ 339 /* pci stuff */
339 int pci_bus; 340 int pci_bus;