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 /drivers/media/video/cx88/cx88-cards.c | |
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>
Diffstat (limited to 'drivers/media/video/cx88/cx88-cards.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-cards.c | 65 |
1 files changed, 60 insertions, 5 deletions
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; |