Commit 8eb79c0b authored by istvan_v@mailbox.hu's avatar istvan_v@mailbox.hu Committed by Mauro Carvalho Chehab

[media] cx88: added support for Leadtek WinFast DTV1800 H with XC4000 tuner

This patch implements support for the Leadtek WinFast DTV1800 H card with
XC4000 tuner (107d:6f38).
Signed-off-by: default avatarIstvan Varga <istvan_v@mailbox.hu>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent f271a3af
...@@ -2120,6 +2120,47 @@ static const struct cx88_board cx88_boards[] = { ...@@ -2120,6 +2120,47 @@ static const struct cx88_board cx88_boards[] = {
}, },
.mpeg = CX88_MPEG_DVB, .mpeg = CX88_MPEG_DVB,
}, },
[CX88_BOARD_WINFAST_DTV1800H_XC4000] = {
.name = "Leadtek WinFast DTV1800 H (XC4000)",
.tuner_type = TUNER_XC4000,
.radio_type = TUNER_XC4000,
.tuner_addr = 0x61,
.radio_addr = 0x61,
/*
* GPIO setting
*
* 2: mute (0=off,1=on)
* 12: tuner reset pin
* 13: audio source (0=tuner audio,1=line in)
* 14: FM (0=on,1=off ???)
*/
.input = {{
.type = CX88_VMUX_TELEVISION,
.vmux = 0,
.gpio0 = 0x0400, /* pin 2 = 0 */
.gpio1 = 0x6040, /* pin 13 = 0, pin 14 = 1 */
.gpio2 = 0x0000,
}, {
.type = CX88_VMUX_COMPOSITE1,
.vmux = 1,
.gpio0 = 0x0400, /* pin 2 = 0 */
.gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */
.gpio2 = 0x0000,
}, {
.type = CX88_VMUX_SVIDEO,
.vmux = 2,
.gpio0 = 0x0400, /* pin 2 = 0 */
.gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */
.gpio2 = 0x0000,
}},
.radio = {
.type = CX88_RADIO,
.gpio0 = 0x0400, /* pin 2 = 0 */
.gpio1 = 0x6000, /* pin 13 = 0, pin 14 = 0 */
.gpio2 = 0x0000,
},
.mpeg = CX88_MPEG_DVB,
},
[CX88_BOARD_WINFAST_DTV2000H_PLUS] = { [CX88_BOARD_WINFAST_DTV2000H_PLUS] = {
.name = "Leadtek WinFast DTV2000 H PLUS", .name = "Leadtek WinFast DTV2000 H PLUS",
.tuner_type = TUNER_XC4000, .tuner_type = TUNER_XC4000,
...@@ -2633,6 +2674,11 @@ static const struct cx88_subid cx88_subids[] = { ...@@ -2633,6 +2674,11 @@ static const struct cx88_subid cx88_subids[] = {
.subvendor = 0x107d, .subvendor = 0x107d,
.subdevice = 0x6654, .subdevice = 0x6654,
.card = CX88_BOARD_WINFAST_DTV1800H, .card = CX88_BOARD_WINFAST_DTV1800H,
}, {
/* WinFast DTV1800 H with XC4000 tuner */
.subvendor = 0x107d,
.subdevice = 0x6f38,
.card = CX88_BOARD_WINFAST_DTV1800H_XC4000,
}, { }, {
.subvendor = 0x107d, .subvendor = 0x107d,
.subdevice = 0x6f42, .subdevice = 0x6f42,
...@@ -3027,6 +3073,7 @@ static int cx88_xc4000_tuner_callback(struct cx88_core *core, ...@@ -3027,6 +3073,7 @@ static int cx88_xc4000_tuner_callback(struct cx88_core *core,
{ {
/* Board-specific callbacks */ /* Board-specific callbacks */
switch (core->boardnr) { switch (core->boardnr) {
case CX88_BOARD_WINFAST_DTV1800H_XC4000:
case CX88_BOARD_WINFAST_DTV2000H_PLUS: case CX88_BOARD_WINFAST_DTV2000H_PLUS:
return cx88_xc4000_winfast2000h_plus_callback(core, return cx88_xc4000_winfast2000h_plus_callback(core,
command, arg); command, arg);
...@@ -3207,6 +3254,7 @@ static void cx88_card_setup_pre_i2c(struct cx88_core *core) ...@@ -3207,6 +3254,7 @@ static void cx88_card_setup_pre_i2c(struct cx88_core *core)
mdelay(50); mdelay(50);
break; break;
case CX88_BOARD_WINFAST_DTV1800H_XC4000:
case CX88_BOARD_WINFAST_DTV2000H_PLUS: case CX88_BOARD_WINFAST_DTV2000H_PLUS:
cx88_xc4000_winfast2000h_plus_callback(core, cx88_xc4000_winfast2000h_plus_callback(core,
XC4000_TUNER_RESET, 0); XC4000_TUNER_RESET, 0);
......
...@@ -1328,6 +1328,7 @@ static int dvb_register(struct cx8802_dev *dev) ...@@ -1328,6 +1328,7 @@ static int dvb_register(struct cx8802_dev *dev)
goto frontend_detach; goto frontend_detach;
} }
break; break;
case CX88_BOARD_WINFAST_DTV1800H_XC4000:
case CX88_BOARD_WINFAST_DTV2000H_PLUS: case CX88_BOARD_WINFAST_DTV2000H_PLUS:
fe0->dvb.frontend = dvb_attach(zl10353_attach, fe0->dvb.frontend = dvb_attach(zl10353_attach,
&cx88_pinnacle_hybrid_pctv, &cx88_pinnacle_hybrid_pctv,
......
...@@ -100,6 +100,7 @@ static void cx88_ir_handle_key(struct cx88_IR *ir) ...@@ -100,6 +100,7 @@ static void cx88_ir_handle_key(struct cx88_IR *ir)
break; break;
case CX88_BOARD_WINFAST_DTV1000: case CX88_BOARD_WINFAST_DTV1000:
case CX88_BOARD_WINFAST_DTV1800H: case CX88_BOARD_WINFAST_DTV1800H:
case CX88_BOARD_WINFAST_DTV1800H_XC4000:
case CX88_BOARD_WINFAST_DTV2000H_PLUS: case CX88_BOARD_WINFAST_DTV2000H_PLUS:
case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL: case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
gpio = (gpio & 0x6ff) | ((cx_read(MO_GP1_IO) << 8) & 0x900); gpio = (gpio & 0x6ff) | ((cx_read(MO_GP1_IO) << 8) & 0x900);
...@@ -290,6 +291,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) ...@@ -290,6 +291,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
case CX88_BOARD_WINFAST_DTV2000H: case CX88_BOARD_WINFAST_DTV2000H:
case CX88_BOARD_WINFAST_DTV2000H_J: case CX88_BOARD_WINFAST_DTV2000H_J:
case CX88_BOARD_WINFAST_DTV1800H: case CX88_BOARD_WINFAST_DTV1800H:
case CX88_BOARD_WINFAST_DTV1800H_XC4000:
case CX88_BOARD_WINFAST_DTV2000H_PLUS: case CX88_BOARD_WINFAST_DTV2000H_PLUS:
ir_codes = RC_MAP_WINFAST; ir_codes = RC_MAP_WINFAST;
ir->gpio_addr = MO_GP0_IO; ir->gpio_addr = MO_GP0_IO;
......
...@@ -243,6 +243,7 @@ extern const struct sram_channel const cx88_sram_channels[]; ...@@ -243,6 +243,7 @@ extern const struct sram_channel const cx88_sram_channels[];
#define CX88_BOARD_TWINHAN_VP1027_DVBS 85 #define CX88_BOARD_TWINHAN_VP1027_DVBS 85
#define CX88_BOARD_TEVII_S464 86 #define CX88_BOARD_TEVII_S464 86
#define CX88_BOARD_WINFAST_DTV2000H_PLUS 87 #define CX88_BOARD_WINFAST_DTV2000H_PLUS 87
#define CX88_BOARD_WINFAST_DTV1800H_XC4000 88
enum cx88_itype { enum cx88_itype {
CX88_VMUX_COMPOSITE1 = 1, CX88_VMUX_COMPOSITE1 = 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment