diff options
author | Chris Pascoe <c.pascoe@itee.uq.edu.au> | 2008-04-22 13:45:15 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:07:45 -0400 |
commit | b3fb91d20ca111316854a166ff88b0c8c0f2388b (patch) | |
tree | efdccc4715f7d0c37514bd6b43d4419b3fac9b76 | |
parent | 9507901ef329b2dd3417372c7c9b2abcfd5c1885 (diff) |
V4L/DVB (7258): Support DVB-T tuning on the DViCO FusionHDTV DVB-T Pro
Add support for tuning DVB-T channels on DViCO's FusionHDTV DVB-T Pro board.
The IR remote and analog tuner are not supported at this time.
Some changes made by Mauro Chehab to allow merging it with some other xc3028
patches.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | Documentation/video4linux/CARDLIST.cx88 | 1 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-cards.c | 65 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 23 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88.h | 1 |
4 files changed, 85 insertions, 5 deletions
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88 index c92795b6e697..423da1543815 100644 --- a/Documentation/video4linux/CARDLIST.cx88 +++ b/Documentation/video4linux/CARDLIST.cx88 | |||
@@ -62,3 +62,4 @@ | |||
62 | 61 -> Winfast TV2000 XP Global [107d:6f18] | 62 | 61 -> Winfast TV2000 XP Global [107d:6f18] |
63 | 62 -> PowerColor Real Angel 330 [14f1:ea3d] | 63 | 62 -> PowerColor Real Angel 330 [14f1:ea3d] |
64 | 63 -> Geniatech X8000-MT DVBT [14f1:8852] | 64 | 63 -> Geniatech X8000-MT DVBT [14f1:8852] |
65 | 64 -> DViCO FusionHDTV DVB-T PRO [18ac:db30] | ||
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c index d07286fa21f5..1dc70f27f7f9 100644 --- a/drivers/media/video/cx88/cx88-cards.c +++ b/drivers/media/video/cx88/cx88-cards.c | |||
@@ -1543,7 +1543,24 @@ static const struct cx88_board cx88_boards[] = { | |||
1543 | .gpio3 = 0x00000000, | 1543 | .gpio3 = 0x00000000, |
1544 | }, | 1544 | }, |
1545 | .mpeg = CX88_MPEG_DVB, | 1545 | .mpeg = CX88_MPEG_DVB, |
1546 | } | 1546 | }, |
1547 | [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO] = { | ||
1548 | .name = "DViCO FusionHDTV DVB-T PRO", | ||
1549 | .tuner_type = TUNER_ABSENT, /* XXX: Has XC3028 */ | ||
1550 | .radio_type = UNSET, | ||
1551 | .tuner_addr = ADDR_UNSET, | ||
1552 | .radio_addr = ADDR_UNSET, | ||
1553 | .input = { { | ||
1554 | .type = CX88_VMUX_COMPOSITE1, | ||
1555 | .vmux = 1, | ||
1556 | .gpio0 = 0x000067df, | ||
1557 | }, { | ||
1558 | .type = CX88_VMUX_SVIDEO, | ||
1559 | .vmux = 2, | ||
1560 | .gpio0 = 0x000067df, | ||
1561 | } }, | ||
1562 | .mpeg = CX88_MPEG_DVB, | ||
1563 | }, | ||
1547 | }; | 1564 | }; |
1548 | 1565 | ||
1549 | /* ------------------------------------------------------------------ */ | 1566 | /* ------------------------------------------------------------------ */ |
@@ -1748,7 +1765,11 @@ static const struct cx88_subid cx88_subids[] = { | |||
1748 | .subdevice = 0xdb11, | 1765 | .subdevice = 0xdb11, |
1749 | .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS, | 1766 | .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS, |
1750 | /* Re-branded DViCO: UltraView DVB-T Plus */ | 1767 | /* Re-branded DViCO: UltraView DVB-T Plus */ |
1751 | },{ | 1768 | }, { |
1769 | .subvendor = 0x18ac, | ||
1770 | .subdevice = 0xdb30, | ||
1771 | .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO, | ||
1772 | }, { | ||
1752 | .subvendor = 0x17de, | 1773 | .subvendor = 0x17de, |
1753 | .subdevice = 0x0840, | 1774 | .subdevice = 0x0840, |
1754 | .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT, | 1775 | .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT, |
@@ -2009,6 +2030,28 @@ static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data) | |||
2009 | CX88_RADIO : 0; | 2030 | CX88_RADIO : 0; |
2010 | } | 2031 | } |
2011 | 2032 | ||
2033 | /* ------------------------------------------------------------------- */ | ||
2034 | /* some Divco specific stuff */ | ||
2035 | static int cx88_dvico_xc2028_callback(void *ptr, int command, int arg) | ||
2036 | { | ||
2037 | struct cx88_core *core = ptr; | ||
2038 | |||
2039 | switch (command) { | ||
2040 | case XC2028_TUNER_RESET: | ||
2041 | cx_set(MO_GP0_IO, 0x0200); | ||
2042 | cx_clear(MO_GP0_IO, 0x02); | ||
2043 | mdelay(100); | ||
2044 | cx_set(MO_GP0_IO, 0x02); | ||
2045 | mdelay(100); | ||
2046 | break; | ||
2047 | default: | ||
2048 | return -EINVAL; | ||
2049 | } | ||
2050 | |||
2051 | return 0; | ||
2052 | } | ||
2053 | |||
2054 | |||
2012 | /* ----------------------------------------------------------------------- */ | 2055 | /* ----------------------------------------------------------------------- */ |
2013 | /* some Geniatech specific stuff */ | 2056 | /* some Geniatech specific stuff */ |
2014 | 2057 | ||
@@ -2098,6 +2141,8 @@ static int cx88_xc2028_tuner_callback(void *priv, int command, int arg) | |||
2098 | case CX88_BOARD_POWERCOLOR_REAL_ANGEL: | 2141 | case CX88_BOARD_POWERCOLOR_REAL_ANGEL: |
2099 | case CX88_BOARD_GENIATECH_X8000_MT: | 2142 | case CX88_BOARD_GENIATECH_X8000_MT: |
2100 | return cx88_xc3028_geniatech_tuner_callback(priv, command, arg); | 2143 | return cx88_xc3028_geniatech_tuner_callback(priv, command, arg); |
2144 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO: | ||
2145 | return cx88_dvico_xc2028_callback(priv, command, arg); | ||
2101 | } | 2146 | } |
2102 | 2147 | ||
2103 | switch (command) { | 2148 | switch (command) { |
@@ -2267,6 +2312,7 @@ static void cx88_card_setup(struct cx88_core *core) | |||
2267 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1: | 2312 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1: |
2268 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS: | 2313 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS: |
2269 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID: | 2314 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID: |
2315 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO: | ||
2270 | /* GPIO0:0 is hooked to mt352 reset pin */ | 2316 | /* GPIO0:0 is hooked to mt352 reset pin */ |
2271 | cx_set(MO_GP0_IO, 0x00000101); | 2317 | cx_set(MO_GP0_IO, 0x00000101); |
2272 | cx_clear(MO_GP0_IO, 0x00000001); | 2318 | cx_clear(MO_GP0_IO, 0x00000001); |
@@ -2338,9 +2384,18 @@ static void cx88_card_setup(struct cx88_core *core) | |||
2338 | 2384 | ||
2339 | ctl.fname = XC2028_DEFAULT_FIRMWARE; | 2385 | ctl.fname = XC2028_DEFAULT_FIRMWARE; |
2340 | ctl.max_len = 64; | 2386 | ctl.max_len = 64; |
2341 | /* FIXME: Those should be device-dependent */ | 2387 | |
2342 | ctl.demod = XC3028_FE_OREN538; | 2388 | switch (core->boardnr) { |
2343 | ctl.mts = 1; | 2389 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO: |
2390 | ctl.scode_table = XC3028_FE_ZARLINK456; | ||
2391 | break; | ||
2392 | case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO: | ||
2393 | ctl.demod = XC3028_FE_OREN538; | ||
2394 | break; | ||
2395 | default: | ||
2396 | ctl.demod = XC3028_FE_OREN538; | ||
2397 | ctl.mts = 1; | ||
2398 | } | ||
2344 | 2399 | ||
2345 | xc2028_cfg.tuner = TUNER_XC2028; | 2400 | xc2028_cfg.tuner = TUNER_XC2028; |
2346 | xc2028_cfg.priv = &ctl; | 2401 | xc2028_cfg.priv = &ctl; |
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index c786d951a04b..591037d8d14f 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -237,6 +237,19 @@ static struct zl10353_config dvico_fusionhdtv_hybrid = { | |||
237 | .no_tuner = 1, | 237 | .no_tuner = 1, |
238 | }; | 238 | }; |
239 | 239 | ||
240 | static struct zl10353_config dvico_fusionhdtv_xc3028 = { | ||
241 | .demod_address = 0x0f, | ||
242 | .if2 = 45600, | ||
243 | .no_tuner = 1, | ||
244 | }; | ||
245 | |||
246 | static struct mt352_config dvico_fusionhdtv_mt352_xc3028 = { | ||
247 | .demod_address = 0x0f, | ||
248 | .if2 = 4560, | ||
249 | .no_tuner = 1, | ||
250 | .demod_init = dvico_fusionhdtv_demod_init, | ||
251 | }; | ||
252 | |||
240 | static struct zl10353_config dvico_fusionhdtv_plus_v1_1 = { | 253 | static struct zl10353_config dvico_fusionhdtv_plus_v1_1 = { |
241 | .demod_address = 0x0f, | 254 | .demod_address = 0x0f, |
242 | }; | 255 | }; |
@@ -567,6 +580,16 @@ static int dvb_register(struct cx8802_dev *dev) | |||
567 | DVB_PLL_THOMSON_FE6600); | 580 | DVB_PLL_THOMSON_FE6600); |
568 | } | 581 | } |
569 | break; | 582 | break; |
583 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO: | ||
584 | dev->dvb.frontend = dvb_attach(zl10353_attach, | ||
585 | &dvico_fusionhdtv_xc3028, | ||
586 | &dev->core->i2c_adap); | ||
587 | if (dev->dvb.frontend == NULL) | ||
588 | dev->dvb.frontend = dvb_attach(mt352_attach, | ||
589 | &dvico_fusionhdtv_mt352_xc3028, | ||
590 | &dev->core->i2c_adap); | ||
591 | attach_xc3028 = 1; | ||
592 | break; | ||
570 | case CX88_BOARD_PCHDTV_HD3000: | 593 | case CX88_BOARD_PCHDTV_HD3000: |
571 | dev->dvb.frontend = dvb_attach(or51132_attach, &pchdtv_hd3000, | 594 | dev->dvb.frontend = dvb_attach(or51132_attach, &pchdtv_hd3000, |
572 | &dev->core->i2c_adap); | 595 | &dev->core->i2c_adap); |
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h index 5145bf2f5557..9df3f198a4df 100644 --- a/drivers/media/video/cx88/cx88.h +++ b/drivers/media/video/cx88/cx88.h | |||
@@ -216,6 +216,7 @@ extern struct sram_channel cx88_sram_channels[]; | |||
216 | #define CX88_BOARD_WINFAST_TV2000_XP_GLOBAL 61 | 216 | #define CX88_BOARD_WINFAST_TV2000_XP_GLOBAL 61 |
217 | #define CX88_BOARD_POWERCOLOR_REAL_ANGEL 62 | 217 | #define CX88_BOARD_POWERCOLOR_REAL_ANGEL 62 |
218 | #define CX88_BOARD_GENIATECH_X8000_MT 63 | 218 | #define CX88_BOARD_GENIATECH_X8000_MT 63 |
219 | #define CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO 64 | ||
219 | 220 | ||
220 | enum cx88_itype { | 221 | enum cx88_itype { |
221 | CX88_VMUX_COMPOSITE1 = 1, | 222 | CX88_VMUX_COMPOSITE1 = 1, |