* [PATCH] Leadtek WinFast DTV-1800H and DTV-2000H
[not found] ` <200902011736.23401@centrum.cz>
@ 2009-02-01 16:37 ` Miroslav Šustek
2009-02-01 21:29 ` hermann pitton
0 siblings, 1 reply; 2+ messages in thread
From: Miroslav Šustek @ 2009-02-01 16:37 UTC (permalink / raw)
To: linux-media, mchehab
[-- Attachment #1: Type: text/plain, Size: 965 bytes --]
Hi, few months ago I sent the patch for Leadtek WinFast DTV-1800H card, but it wasn't merged to repository yet.
Maybe it's because of the merging of mailing lists. I'm sending it again.
These are the original messages:
http://linuxtv.org/pipermail/linux-dvb/2008-October/029859.html
http://linuxtv.org/pipermail/linux-dvb/2008-November/030362.html
Briefly, patch adds support for analog tv, radio, dvb-t and remote control.
About three people already confirmed the functionality.
----
The second patch I attached (leadtek_winfast_dtv2000h.patch) is from Mirek Slugeň and it adds support for some revisions of Leadtek WinFast DTV-2000H.
I don't have any of DTV-2000H cards, so I cannot confirm its correctness.
Here is the original message from Mirek Slugeň:
http://linuxtv.org/pipermail/linux-dvb/2008-November/030644.html
(The patch is dependent on 1800H patch.)
----
I hope this is the last time I'm bothering you with this thing. ;)
- Miroslav Šustek
[-- Attachment #2: leadtek_winfast_dtv1800h.patch --]
[-- Type: application/octet-stream, Size: 5607 bytes --]
Adds support for Leadtek WinFast DTV-1800H
From: Miroslav Sustek <sustmidown@centrum.cz>
Enables analog tv and radio, dvb-t and (gpio) remote control.
Signed-off-by: Miroslav Sustek <sustmidown@centrum.cz>
diff -r 1dce9d4e2179 linux/Documentation/video4linux/CARDLIST.cx88
--- a/linux/Documentation/video4linux/CARDLIST.cx88 Sun Feb 01 11:40:27 2009 -0200
+++ b/linux/Documentation/video4linux/CARDLIST.cx88 Sun Feb 01 15:25:32 2009 +0100
@@ -77,3 +77,4 @@
76 -> SATTRADE ST4200 DVB-S/S2 [b200:4200]
77 -> TBS 8910 DVB-S [8910:8888]
78 -> Prof 6200 DVB-S [b022:3022]
+ 79 -> Leadtek WinFast DTV1800 Hybrid [107d:6654]
diff -r 1dce9d4e2179 linux/drivers/media/video/cx88/cx88-cards.c
--- a/linux/drivers/media/video/cx88/cx88-cards.c Sun Feb 01 11:40:27 2009 -0200
+++ b/linux/drivers/media/video/cx88/cx88-cards.c Sun Feb 01 15:25:32 2009 +0100
@@ -1967,6 +1967,47 @@
} },
.mpeg = CX88_MPEG_DVB,
},
+ [CX88_BOARD_WINFAST_DTV1800H] = {
+ .name = "Leadtek WinFast DTV1800 Hybrid",
+ .tuner_type = TUNER_XC2028,
+ .radio_type = TUNER_XC2028,
+ .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,
+ },
};
/* ------------------------------------------------------------------ */
@@ -2376,6 +2417,10 @@
.subvendor = 0xb200,
.subdevice = 0x4200,
.card = CX88_BOARD_SATTRADE_ST4200,
+ }, {
+ .subvendor = 0x107d,
+ .subdevice = 0x6654,
+ .card = CX88_BOARD_WINFAST_DTV1800H,
},
};
@@ -2573,6 +2618,23 @@
return -EINVAL;
}
+static int cx88_xc3028_winfast1800h_callback(struct cx88_core *core,
+ int command, int arg)
+{
+ switch (command) {
+ case XC2028_TUNER_RESET:
+ /* GPIO 12 (xc3028 tuner reset) */
+ cx_set(MO_GP1_IO, 0x1010);
+ mdelay(50);
+ cx_clear(MO_GP1_IO, 0x10);
+ mdelay(50);
+ cx_set(MO_GP1_IO, 0x10);
+ mdelay(50);
+ return 0;
+ }
+ return -EINVAL;
+}
+
/* ------------------------------------------------------------------- */
/* some Divco specific stuff */
static int cx88_pv_8000gt_callback(struct cx88_core *core,
@@ -2645,6 +2707,8 @@
case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
return cx88_dvico_xc2028_callback(core, command, arg);
+ case CX88_BOARD_WINFAST_DTV1800H:
+ return cx88_xc3028_winfast1800h_callback(core, command, arg);
}
switch (command) {
@@ -2819,6 +2883,16 @@
cx_set(MO_GP0_IO, 0x00000080); /* 702 out of reset */
udelay(1000);
break;
+
+ case CX88_BOARD_WINFAST_DTV1800H:
+ /* GPIO 12 (xc3028 tuner reset) */
+ cx_set(MO_GP1_IO, 0x1010);
+ mdelay(50);
+ cx_clear(MO_GP1_IO, 0x10);
+ mdelay(50);
+ cx_set(MO_GP1_IO, 0x10);
+ mdelay(50);
+ break;
}
}
@@ -2839,6 +2913,7 @@
core->i2c_algo.udelay = 16;
break;
case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
+ case CX88_BOARD_WINFAST_DTV1800H:
ctl->demod = XC3028_FE_ZARLINK456;
break;
case CX88_BOARD_KWORLD_ATSC_120:
diff -r 1dce9d4e2179 linux/drivers/media/video/cx88/cx88-dvb.c
--- a/linux/drivers/media/video/cx88/cx88-dvb.c Sun Feb 01 11:40:27 2009 -0200
+++ b/linux/drivers/media/video/cx88/cx88-dvb.c Sun Feb 01 15:25:32 2009 +0100
@@ -1015,6 +1015,7 @@
}
break;
case CX88_BOARD_PINNACLE_HYBRID_PCTV:
+ case CX88_BOARD_WINFAST_DTV1800H:
fe0->dvb.frontend = dvb_attach(zl10353_attach,
&cx88_pinnacle_hybrid_pctv,
&core->i2c_adap);
diff -r 1dce9d4e2179 linux/drivers/media/video/cx88/cx88-input.c
--- a/linux/drivers/media/video/cx88/cx88-input.c Sun Feb 01 11:40:27 2009 -0200
+++ b/linux/drivers/media/video/cx88/cx88-input.c Sun Feb 01 15:25:32 2009 +0100
@@ -93,6 +93,7 @@
gpio=(gpio & 0x7fd) + (auxgpio & 0xef);
break;
case CX88_BOARD_WINFAST_DTV1000:
+ case CX88_BOARD_WINFAST_DTV1800H:
gpio = (gpio & 0x6ff) | ((cx_read(MO_GP1_IO) << 8) & 0x900);
auxgpio = gpio;
break;
@@ -244,6 +245,7 @@
ir->sampling = 1;
break;
case CX88_BOARD_WINFAST_DTV2000H:
+ case CX88_BOARD_WINFAST_DTV1800H:
ir_codes = ir_codes_winfast;
ir->gpio_addr = MO_GP0_IO;
ir->mask_keycode = 0x8f8;
diff -r 1dce9d4e2179 linux/drivers/media/video/cx88/cx88.h
--- a/linux/drivers/media/video/cx88/cx88.h Sun Feb 01 11:40:27 2009 -0200
+++ b/linux/drivers/media/video/cx88/cx88.h Sun Feb 01 15:25:32 2009 +0100
@@ -232,6 +232,7 @@
#define CX88_BOARD_SATTRADE_ST4200 76
#define CX88_BOARD_TBS_8910 77
#define CX88_BOARD_PROF_6200 78
+#define CX88_BOARD_WINFAST_DTV1800H 79
enum cx88_itype {
CX88_VMUX_COMPOSITE1 = 1,
[-- Attachment #3: leadtek_winfast_dtv2000h.patch --]
[-- Type: application/octet-stream, Size: 6838 bytes --]
diff -r 413f3d76ebe6 linux/drivers/media/video/cx88/cx88-cards.c
--- a/linux/drivers/media/video/cx88/cx88-cards.c Sun Feb 01 16:51:02 2009 +0100
+++ b/linux/drivers/media/video/cx88/cx88-cards.c Sun Feb 01 16:53:29 2009 +0100
@@ -1269,8 +1269,8 @@
.gpio0 = 0x074a,
},
},
- [CX88_BOARD_WINFAST_DTV2000H] = {
- .name = "WinFast DTV2000 H",
+ [CX88_BOARD_WINFAST_DTV2000H_I] = {
+ .name = "WinFast DTV2000 H (ver. I)",
.tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
@@ -1306,11 +1306,100 @@
.gpio3 = 0x02000000,
}},
.radio = {
- .type = CX88_RADIO,
- .gpio0 = 0x00015702,
- .gpio1 = 0x0000f207,
- .gpio2 = 0x00015702,
- .gpio3 = 0x02000000,
+ .type = CX88_RADIO,
+ .gpio0 = 0x00015702,
+ .gpio1 = 0x0000f207,
+ .gpio2 = 0x00015702,
+ .gpio3 = 0x02000000,
+ },
+ .mpeg = CX88_MPEG_DVB,
+ },
+ [CX88_BOARD_WINFAST_DTV2000H_J] = {
+ .name = "WinFast DTV2000 H (ver. J)",
+ .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
+ .radio_type = UNSET,
+ .tuner_addr = ADDR_UNSET,
+ .radio_addr = ADDR_UNSET,
+ .tda9887_conf = TDA9887_PRESENT,
+ .input = {{
+ .type = CX88_VMUX_TELEVISION,
+ .vmux = 0,
+ .gpio0 = 0x00013704,
+ .gpio1 = 0x00008207,
+ .gpio2 = 0x00013704,
+ .gpio3 = 0x02000000,
+ }, {
+ .type = CX88_VMUX_CABLE,
+ .vmux = 0,
+ .gpio0 = 0x0001b701,
+ .gpio1 = 0x00008207,
+ .gpio2 = 0x0001b701,
+ .gpio3 = 0x02000000,
+ }, {
+ .type = CX88_VMUX_COMPOSITE1,
+ .vmux = 1,
+ .gpio0 = 0x0001b701,
+ .gpio1 = 0x00008207,
+ .gpio2 = 0x0001b701,
+ .gpio3 = 0x02000000,
+ }, {
+ .type = CX88_VMUX_SVIDEO,
+ .vmux = 2,
+ .gpio0 = 0x0001b701,
+ .gpio1 = 0x00008207,
+ .gpio2 = 0x0001b701,
+ .gpio3 = 0x02000000,
+ } },
+ .radio = {
+ .type = CX88_RADIO,
+ .gpio0 = 0x0001b702,
+ .gpio1 = 0x00008207,
+ .gpio2 = 0x0001b702,
+ .gpio3 = 0x02000000,
+ },
+ .mpeg = CX88_MPEG_DVB,
+ },
+ [CX88_BOARD_WINFAST_DTV2000H_PLUS] = {
+ .name = "WinFast DTV2000 H PLUS",
+ .tuner_type = TUNER_XC2028,
+ .radio_type = TUNER_XC2028,
+ .tuner_addr = 0x61,
+ .radio_addr = 0x61,
+ .input = {{
+ .type = CX88_VMUX_TELEVISION,
+ .vmux = 0,
+ .gpio0 = 0x0403,
+ .gpio1 = 0xF0D7,
+ .gpio2 = 0x0101,
+ .gpio3 = 0x0000,
+ }, {
+ .type = CX88_VMUX_CABLE,
+ .vmux = 0,
+ .gpio0 = 0x0403,
+ .gpio1 = 0xF0D7,
+ .gpio2 = 0x0100,
+ .gpio3 = 0x0000,
+ }, {
+ .type = CX88_VMUX_COMPOSITE1,
+ .vmux = 1,
+ .gpio0 = 0x0407,
+ .gpio1 = 0xF0F7,
+ .gpio2 = 0x0101,
+ .gpio3 = 0x0000,
+ }, {
+ .type = CX88_VMUX_SVIDEO,
+ .vmux = 2,
+ .gpio0 = 0x0407,
+ .gpio1 = 0xF0F7,
+ .gpio2 = 0x0101,
+ .gpio3 = 0x0000,
+ } },
+ .radio = {
+ .type = CX88_RADIO,
+ .gpio0 = 0x0403,
+ .gpio1 = 0xF097,
+ .gpio2 = 0x0100,
+ .gpio3 = 0x0000,
},
.mpeg = CX88_MPEG_DVB,
},
@@ -2259,7 +2348,15 @@
},{
.subvendor = 0x107d,
.subdevice = 0x665e,
- .card = CX88_BOARD_WINFAST_DTV2000H,
+ .card = CX88_BOARD_WINFAST_DTV2000H_I,
+ }, {
+ .subvendor = 0x107d,
+ .subdevice = 0x6f2b,
+ .card = CX88_BOARD_WINFAST_DTV2000H_J,
+ }, {
+ .subvendor = 0x107d,
+ .subdevice = 0x6f42,
+ .card = CX88_BOARD_WINFAST_DTV2000H_PLUS,
},{
.subvendor = 0x18ac,
.subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
@@ -2708,6 +2805,7 @@
case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
return cx88_dvico_xc2028_callback(core, command, arg);
case CX88_BOARD_WINFAST_DTV1800H:
+ case CX88_BOARD_WINFAST_DTV2000H_PLUS:
return cx88_xc3028_winfast1800h_callback(core, command, arg);
}
@@ -2885,6 +2983,7 @@
break;
case CX88_BOARD_WINFAST_DTV1800H:
+ case CX88_BOARD_WINFAST_DTV2000H_PLUS:
/* GPIO 12 (xc3028 tuner reset) */
cx_set(MO_GP1_IO, 0x1010);
mdelay(50);
@@ -2914,6 +3013,7 @@
break;
case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
case CX88_BOARD_WINFAST_DTV1800H:
+ case CX88_BOARD_WINFAST_DTV2000H_PLUS:
ctl->demod = XC3028_FE_ZARLINK456;
break;
case CX88_BOARD_KWORLD_ATSC_120:
diff -r 413f3d76ebe6 linux/drivers/media/video/cx88/cx88-dvb.c
--- a/linux/drivers/media/video/cx88/cx88-dvb.c Sun Feb 01 16:51:02 2009 +0100
+++ b/linux/drivers/media/video/cx88/cx88-dvb.c Sun Feb 01 16:53:29 2009 +0100
@@ -695,7 +695,8 @@
goto frontend_detach;
}
break;
- case CX88_BOARD_WINFAST_DTV2000H:
+ case CX88_BOARD_WINFAST_DTV2000H_I:
+ case CX88_BOARD_WINFAST_DTV2000H_J:
case CX88_BOARD_HAUPPAUGE_HVR1100:
case CX88_BOARD_HAUPPAUGE_HVR1100LP:
case CX88_BOARD_HAUPPAUGE_HVR1300:
@@ -1016,6 +1017,7 @@
break;
case CX88_BOARD_PINNACLE_HYBRID_PCTV:
case CX88_BOARD_WINFAST_DTV1800H:
+ case CX88_BOARD_WINFAST_DTV2000H_PLUS:
fe0->dvb.frontend = dvb_attach(zl10353_attach,
&cx88_pinnacle_hybrid_pctv,
&core->i2c_adap);
diff -r 413f3d76ebe6 linux/drivers/media/video/cx88/cx88-input.c
--- a/linux/drivers/media/video/cx88/cx88-input.c Sun Feb 01 16:51:02 2009 +0100
+++ b/linux/drivers/media/video/cx88/cx88-input.c Sun Feb 01 16:53:29 2009 +0100
@@ -94,6 +94,9 @@
break;
case CX88_BOARD_WINFAST_DTV1000:
case CX88_BOARD_WINFAST_DTV1800H:
+ case CX88_BOARD_WINFAST_DTV2000H_I:
+ case CX88_BOARD_WINFAST_DTV2000H_J:
+ case CX88_BOARD_WINFAST_DTV2000H_PLUS:
gpio = (gpio & 0x6ff) | ((cx_read(MO_GP1_IO) << 8) & 0x900);
auxgpio = gpio;
break;
@@ -244,8 +247,10 @@
ir_type = IR_TYPE_RC5;
ir->sampling = 1;
break;
- case CX88_BOARD_WINFAST_DTV2000H:
case CX88_BOARD_WINFAST_DTV1800H:
+ case CX88_BOARD_WINFAST_DTV2000H_I:
+ case CX88_BOARD_WINFAST_DTV2000H_J:
+ case CX88_BOARD_WINFAST_DTV2000H_PLUS:
ir_codes = ir_codes_winfast;
ir->gpio_addr = MO_GP0_IO;
ir->mask_keycode = 0x8f8;
diff -r 413f3d76ebe6 linux/drivers/media/video/cx88/cx88.h
--- a/linux/drivers/media/video/cx88/cx88.h Sun Feb 01 16:51:02 2009 +0100
+++ b/linux/drivers/media/video/cx88/cx88.h Sun Feb 01 16:53:29 2009 +0100
@@ -204,7 +204,7 @@
#define CX88_BOARD_KWORLD_MCE200_DELUXE 48
#define CX88_BOARD_PIXELVIEW_PLAYTV_P7000 49
#define CX88_BOARD_NPGTECH_REALTV_TOP10FM 50
-#define CX88_BOARD_WINFAST_DTV2000H 51
+#define CX88_BOARD_WINFAST_DTV2000H_I 51
#define CX88_BOARD_GENIATECH_DVBS 52
#define CX88_BOARD_HAUPPAUGE_HVR3000 53
#define CX88_BOARD_NORWOOD_MICRO 54
@@ -233,6 +233,8 @@
#define CX88_BOARD_TBS_8910 77
#define CX88_BOARD_PROF_6200 78
#define CX88_BOARD_WINFAST_DTV1800H 79
+#define CX88_BOARD_WINFAST_DTV2000H_J 80
+#define CX88_BOARD_WINFAST_DTV2000H_PLUS 81
enum cx88_itype {
CX88_VMUX_COMPOSITE1 = 1,
^ permalink raw reply [flat|nested] 2+ messages in thread