]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[media] Add support for two Leadtek Winfast TV 2000XP types
authorIstvan Varga <istvan_v@mailbox.hu>
Sun, 11 Dec 2011 23:20:24 +0000 (20:20 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 7 Jan 2012 13:47:30 +0000 (11:47 -0200)
Add support for two new types of Leadtek Winfast TV 2000XP tuner

The author of this patch is Istvan Varga.
Only resending current reformated version against current git.

Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx88/cx88-cards.c
drivers/media/video/cx88/cx88-input.c
drivers/media/video/cx88/cx88.h

index 8b66b642a76bdb7037a355f4f2c6217a5a119163..62c7ad050f9bb0b067a963405ddda6e8cbcd1838 100644 (file)
@@ -1643,6 +1643,78 @@ static const struct cx88_board cx88_boards[] = {
                        .gpio3  = 0x0000,
                },
        },
+       [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36] = {
+               .name           = "Leadtek TV2000 XP Global (SC4100)",
+               .tuner_type     = TUNER_XC4000,
+               .tuner_addr     = 0x61,
+               .radio_type     = UNSET,
+               .radio_addr     = ADDR_UNSET,
+               .input          = { {
+                       .type   = CX88_VMUX_TELEVISION,
+                       .vmux   = 0,
+                       .gpio0  = 0x0400,       /* pin 2 = 0 */
+                       .gpio1  = 0x0000,
+                       .gpio2  = 0x0C04,       /* pin 18 = 1, pin 19 = 0 */
+                       .gpio3  = 0x0000,
+               }, {
+                       .type   = CX88_VMUX_COMPOSITE1,
+                       .vmux   = 1,
+                       .gpio0  = 0x0400,       /* pin 2 = 0 */
+                       .gpio1  = 0x0000,
+                       .gpio2  = 0x0C0C,       /* pin 18 = 1, pin 19 = 1 */
+                       .gpio3  = 0x0000,
+               }, {
+                       .type   = CX88_VMUX_SVIDEO,
+                       .vmux   = 2,
+                       .gpio0  = 0x0400,       /* pin 2 = 0 */
+                       .gpio1  = 0x0000,
+                       .gpio2  = 0x0C0C,       /* pin 18 = 1, pin 19 = 1 */
+                       .gpio3  = 0x0000,
+               } },
+               .radio = {
+                       .type   = CX88_RADIO,
+                       .gpio0  = 0x0400,        /* pin 2 = 0 */
+                       .gpio1  = 0x0000,
+                       .gpio2  = 0x0C00,       /* pin 18 = 0, pin 19 = 0 */
+                       .gpio3  = 0x0000,
+               },
+       },
+       [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43] = {
+               .name           = "Leadtek TV2000 XP Global (XC4100)",
+               .tuner_type     = TUNER_XC4000,
+               .tuner_addr     = 0x61,
+               .radio_type     = UNSET,
+               .radio_addr     = ADDR_UNSET,
+               .input          = { {
+                       .type   = CX88_VMUX_TELEVISION,
+                       .vmux   = 0,
+                       .gpio0  = 0x0400,       /* pin 2 = 0 */
+                       .gpio1  = 0x6040,       /* pin 14 = 1, pin 13 = 0 */
+                       .gpio2  = 0x0000,
+                       .gpio3  = 0x0000,
+               }, {
+                       .type   = CX88_VMUX_COMPOSITE1,
+                       .vmux   = 1,
+                       .gpio0  = 0x0400,       /* pin 2 = 0 */
+                       .gpio1  = 0x6060,       /* pin 14 = 1, pin 13 = 1 */
+                       .gpio2  = 0x0000,
+                       .gpio3  = 0x0000,
+               }, {
+                       .type   = CX88_VMUX_SVIDEO,
+                       .vmux   = 2,
+                       .gpio0  = 0x0400,       /* pin 2 = 0 */
+                       .gpio1  = 0x6060,       /* pin 14 = 1, pin 13 = 1 */
+                       .gpio2  = 0x0000,
+                       .gpio3  = 0x0000,
+               } },
+               .radio = {
+                       .type   = CX88_RADIO,
+                       .gpio0  = 0x0400,        /* pin 2 = 0 */
+                       .gpio1  = 0x6000,        /* pin 14 = 1, pin 13 = 0 */
+                       .gpio2  = 0x0000,
+                       .gpio3  = 0x0000,
+               },
+       },
        [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = {
                .name           = "PowerColor RA330",   /* Long names may confuse LIRC. */
                .tuner_type     = TUNER_XC2028,
@@ -2718,6 +2790,21 @@ static const struct cx88_subid cx88_subids[] = {
                .subvendor = 0x107d,
                .subdevice = 0x6618,
                .card      = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
+       }, {
+               /* TV2000 XP Global [107d:6618] */
+               .subvendor = 0x107d,
+               .subdevice = 0x6619,
+               .card      = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
+       }, {
+               /* WinFast TV2000 XP Global with XC4000 tuner */
+               .subvendor = 0x107d,
+               .subdevice = 0x6f36,
+               .card      = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36,
+       }, {
+               /* WinFast TV2000 XP Global with XC4000 tuner and different GPIOs */
+               .subvendor = 0x107d,
+               .subdevice = 0x6f43,
+               .card      = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43,
        }, {
                .subvendor = 0xb034,
                .subdevice = 0x3034,
@@ -3075,6 +3162,8 @@ static int cx88_xc4000_tuner_callback(struct cx88_core *core,
        switch (core->boardnr) {
        case CX88_BOARD_WINFAST_DTV1800H_XC4000:
        case CX88_BOARD_WINFAST_DTV2000H_PLUS:
+       case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36:
+       case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43:
                return cx88_xc4000_winfast2000h_plus_callback(core,
                                                              command, arg);
        }
@@ -3251,6 +3340,8 @@ static void cx88_card_setup_pre_i2c(struct cx88_core *core)
 
        case CX88_BOARD_WINFAST_DTV1800H_XC4000:
        case CX88_BOARD_WINFAST_DTV2000H_PLUS:
+       case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36:
+       case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43:
                cx88_xc4000_winfast2000h_plus_callback(core,
                                                       XC4000_TUNER_RESET, 0);
                break;
index e614201b5ed33b5994ec4528ece3574e7f90919d..ebf448c48ca3335ce6cdb0a0091270fcdb96bd57 100644 (file)
@@ -103,6 +103,8 @@ static void cx88_ir_handle_key(struct cx88_IR *ir)
        case CX88_BOARD_WINFAST_DTV1800H_XC4000:
        case CX88_BOARD_WINFAST_DTV2000H_PLUS:
        case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
+       case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36:
+       case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43:
                gpio = (gpio & 0x6ff) | ((cx_read(MO_GP1_IO) << 8) & 0x900);
                auxgpio = gpio;
                break;
@@ -302,6 +304,8 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
        case CX88_BOARD_WINFAST2000XP_EXPERT:
        case CX88_BOARD_WINFAST_DTV1000:
        case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
+       case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36:
+       case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43:
                ir_codes = RC_MAP_WINFAST;
                ir->gpio_addr = MO_GP0_IO;
                ir->mask_keycode = 0x8f8;
index fa8d307e1a3d2299618bdf5266aea118b68f7670..c9659def2a787d79ecfa97c5cc56ff62b4521e47 100644 (file)
@@ -244,6 +244,8 @@ extern const struct sram_channel const cx88_sram_channels[];
 #define CX88_BOARD_TEVII_S464              86
 #define CX88_BOARD_WINFAST_DTV2000H_PLUS   87
 #define CX88_BOARD_WINFAST_DTV1800H_XC4000 88
+#define CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36 89
+#define CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43 90
 
 enum cx88_itype {
        CX88_VMUX_COMPOSITE1 = 1,