aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-cards.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx88/cx88-cards.c')
-rw-r--r--drivers/media/video/cx88/cx88-cards.c111
1 files changed, 103 insertions, 8 deletions
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c
index 1bc999247fdc..c7042cf41231 100644
--- a/drivers/media/video/cx88/cx88-cards.c
+++ b/drivers/media/video/cx88/cx88-cards.c
@@ -184,17 +184,18 @@ struct cx88_board cx88_boards[] = {
184 .input = {{ 184 .input = {{
185 .type = CX88_VMUX_TELEVISION, 185 .type = CX88_VMUX_TELEVISION,
186 .vmux = 0, 186 .vmux = 0,
187 .gpio1 = 0x309f, 187 .gpio1 = 0xe09f,
188 },{ 188 },{
189 .type = CX88_VMUX_COMPOSITE1, 189 .type = CX88_VMUX_COMPOSITE1,
190 .vmux = 1, 190 .vmux = 1,
191 .gpio1 = 0x305f, 191 .gpio1 = 0xe05f,
192 },{ 192 },{
193 .type = CX88_VMUX_SVIDEO, 193 .type = CX88_VMUX_SVIDEO,
194 .vmux = 2, 194 .vmux = 2,
195 .gpio1 = 0x305f, 195 .gpio1 = 0xe05f,
196 }}, 196 }},
197 .radio = { 197 .radio = {
198 .gpio1 = 0xe0df,
198 .type = CX88_RADIO, 199 .type = CX88_RADIO,
199 }, 200 },
200 }, 201 },
@@ -322,19 +323,19 @@ struct cx88_board cx88_boards[] = {
322 .input = {{ 323 .input = {{
323 .type = CX88_VMUX_TELEVISION, 324 .type = CX88_VMUX_TELEVISION,
324 .vmux = 0, 325 .vmux = 0,
325 .gpio0 = 0xff00, 326 .gpio0 = 0xbff0,
326 },{ 327 },{
327 .type = CX88_VMUX_COMPOSITE1, 328 .type = CX88_VMUX_COMPOSITE1,
328 .vmux = 1, 329 .vmux = 1,
329 .gpio0 = 0xff03, 330 .gpio0 = 0xbff3,
330 },{ 331 },{
331 .type = CX88_VMUX_SVIDEO, 332 .type = CX88_VMUX_SVIDEO,
332 .vmux = 2, 333 .vmux = 2,
333 .gpio0 = 0xff03, 334 .gpio0 = 0xbff3,
334 }}, 335 }},
335 .radio = { 336 .radio = {
336 .type = CX88_RADIO, 337 .type = CX88_RADIO,
337 .gpio0 = 0xff00, 338 .gpio0 = 0xbff0,
338 }, 339 },
339 }, 340 },
340 [CX88_BOARD_ASUS_PVR_416] = { 341 [CX88_BOARD_ASUS_PVR_416] = {
@@ -1048,6 +1049,50 @@ struct cx88_board cx88_boards[] = {
1048 }}, 1049 }},
1049 .dvb = 1, 1050 .dvb = 1,
1050 }, 1051 },
1052 [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT] = {
1053 /* FIXME: Standard video using the cx88 broadcast decoder is
1054 * working, but blackbird isn't working yet, audio is only
1055 * working correctly for television mode. S-Video and Composite
1056 * are working for video-only, so I have them disabled for now.
1057 */
1058 .name = "KWorld HardwareMpegTV XPert",
1059 .tuner_type = TUNER_PHILIPS_TDA8290,
1060 .radio_type = UNSET,
1061 .tuner_addr = ADDR_UNSET,
1062 .radio_addr = ADDR_UNSET,
1063 .input = {{
1064 .type = CX88_VMUX_TELEVISION,
1065 .vmux = 0,
1066 .gpio0 = 0x3de2,
1067 .gpio2 = 0x00ff,
1068 }},
1069 .radio = {
1070 .type = CX88_RADIO,
1071 .gpio0 = 0x3de6,
1072 .gpio2 = 0x00ff,
1073 },
1074 },
1075 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = {
1076 .name = "DViCO FusionHDTV DVB-T Hybrid",
1077 .tuner_type = TUNER_THOMSON_FE6600,
1078 .radio_type = UNSET,
1079 .tuner_addr = ADDR_UNSET,
1080 .radio_addr = ADDR_UNSET,
1081 .input = {{
1082 .type = CX88_VMUX_TELEVISION,
1083 .vmux = 0,
1084 .gpio0 = 0x0000a75f,
1085 },{
1086 .type = CX88_VMUX_COMPOSITE1,
1087 .vmux = 1,
1088 .gpio0 = 0x0000a75b,
1089 },{
1090 .type = CX88_VMUX_SVIDEO,
1091 .vmux = 2,
1092 .gpio0 = 0x0000a75b,
1093 }},
1094 .dvb = 1,
1095 },
1051 1096
1052}; 1097};
1053const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards); 1098const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards);
@@ -1254,6 +1299,18 @@ struct cx88_subid cx88_subids[] = {
1254 .subdevice = 0xdb11, 1299 .subdevice = 0xdb11,
1255 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS, 1300 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
1256 /* Re-branded DViCO: UltraView DVB-T Plus */ 1301 /* Re-branded DViCO: UltraView DVB-T Plus */
1302 },{
1303 .subvendor = 0x17de,
1304 .subdevice = 0x0840,
1305 .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
1306 },{
1307 .subvendor = 0x18ac,
1308 .subdevice = 0xdb40,
1309 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
1310 },{
1311 .subvendor = 0x18ac,
1312 .subdevice = 0xdb44,
1313 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
1257 }, 1314 },
1258}; 1315};
1259const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids); 1316const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids);
@@ -1373,6 +1430,40 @@ static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
1373} 1430}
1374 1431
1375/* ----------------------------------------------------------------------- */ 1432/* ----------------------------------------------------------------------- */
1433/* some DViCO specific stuff */
1434
1435static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
1436{
1437 struct i2c_msg msg = { .addr = 0x45, .flags = 0 };
1438 int i, err;
1439 static u8 init_bufs[13][5] = {
1440 { 0x10, 0x00, 0x20, 0x01, 0x03 },
1441 { 0x10, 0x10, 0x01, 0x00, 0x21 },
1442 { 0x10, 0x10, 0x10, 0x00, 0xCA },
1443 { 0x10, 0x10, 0x12, 0x00, 0x08 },
1444 { 0x10, 0x10, 0x13, 0x00, 0x0A },
1445 { 0x10, 0x10, 0x16, 0x01, 0xC0 },
1446 { 0x10, 0x10, 0x22, 0x01, 0x3D },
1447 { 0x10, 0x10, 0x73, 0x01, 0x2E },
1448 { 0x10, 0x10, 0x72, 0x00, 0xC5 },
1449 { 0x10, 0x10, 0x71, 0x01, 0x97 },
1450 { 0x10, 0x10, 0x70, 0x00, 0x0F },
1451 { 0x10, 0x10, 0xB0, 0x00, 0x01 },
1452 { 0x03, 0x0C },
1453 };
1454
1455 for (i = 0; i < 13; i++) {
1456 msg.buf = init_bufs[i];
1457 msg.len = (i != 12 ? 5 : 2);
1458 err = i2c_transfer(&core->i2c_adap, &msg, 1);
1459 if (err != 1) {
1460 printk("dvico_fusionhdtv_hybrid_init buf %d failed (err = %d)!\n", i, err);
1461 return;
1462 }
1463 }
1464}
1465
1466/* ----------------------------------------------------------------------- */
1376 1467
1377void cx88_card_list(struct cx88_core *core, struct pci_dev *pci) 1468void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
1378{ 1469{
@@ -1438,11 +1529,15 @@ void cx88_card_setup(struct cx88_core *core)
1438 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1: 1529 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
1439 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS: 1530 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
1440 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL: 1531 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
1532 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
1441 /* GPIO0:0 is hooked to mt352 reset pin */ 1533 /* GPIO0:0 is hooked to mt352 reset pin */
1442 cx_set(MO_GP0_IO, 0x00000101); 1534 cx_set(MO_GP0_IO, 0x00000101);
1443 cx_clear(MO_GP0_IO, 0x00000001); 1535 cx_clear(MO_GP0_IO, 0x00000001);
1444 msleep(1); 1536 msleep(1);
1445 cx_set(MO_GP0_IO, 0x00000101); 1537 cx_set(MO_GP0_IO, 0x00000101);
1538 if (0 == core->i2c_rc &&
1539 core->board == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)
1540 dvico_fusionhdtv_hybrid_init(core);
1446 break; 1541 break;
1447 case CX88_BOARD_KWORLD_DVB_T: 1542 case CX88_BOARD_KWORLD_DVB_T:
1448 case CX88_BOARD_DNTV_LIVE_DVB_T: 1543 case CX88_BOARD_DNTV_LIVE_DVB_T:
@@ -1460,7 +1555,7 @@ void cx88_card_setup(struct cx88_core *core)
1460 if (0 == core->i2c_rc) { 1555 if (0 == core->i2c_rc) {
1461 /* enable tuner */ 1556 /* enable tuner */
1462 int i; 1557 int i;
1463 u8 buffer [] = { 0x10,0x12,0x13,0x04,0x16,0x00,0x14,0x04,0x017,0x00 }; 1558 static const u8 buffer [] = { 0x10,0x12,0x13,0x04,0x16,0x00,0x14,0x04,0x017,0x00 };
1464 core->i2c_client.addr = 0x0a; 1559 core->i2c_client.addr = 0x0a;
1465 1560
1466 for (i = 0; i < 5; i++) 1561 for (i = 0; i < 5; i++)