<div>
Mark, Jon,<br><br>The patches I made were not against the v4l-dvb tip that is referenced in Mark's email below.&nbsp; I did this on purpose because there is a small amount of refactoring (recoding to make it better) being performed by Steven Toth and others.<br><br>To get the version I used for the patch download (This is for the first initial patch [you can tell it is this one as the patch file mentions cx23885-sram in the path]):<br>http://linuxtv.org/hg/~stoth/cx23885-sram/archive/tip.tar.gz<br><br>For the second patch that emailed less then 12 hours ago download this version of drivers:<br>http://linuxtv.org/hg/~stoth/v4l-dvb/archive/tip.tar.gz<br>and then apply my patch (this patch mentions v4l-dvb). This version is a cleanup of the previous and uses the generic callback function.<br><br>Other then that you are heading in the correct direction...<br><br>Do either of you have the same issue I have that when the computer is first turned on the autodetect card feature doesn't work due to subvendor sub product ids of 0000? Or is just a faulty card that I have?<br>
<br>Regards,<br><br>Stephen.<br>
<blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">----- Original Message -----<br>
From: "Mark Carbonaro" <mark@carbonaro.org><br>
To: "Jonathan Hummel" <jhhummel@bigpond.com><br>
Subject: Re: [PATCH-TESTERS-REQUIRED] Leadtek Winfast PxDVR 3200 H - DVB Only support<br>
Date: Tue, 5 Aug 2008 23:47:46 +1000 (EST)<br>
<br>

<br>
Hi Mark,<br>
<br>
Forgive my ignorance/ newbie-ness, but what do I do with that patch code<br>
below? is there a tutorial or howto or something somewhere that will<br>
introduce me to this. I have done some programming, but nothing of this<br>
level.<br>
<br>
cheers<br>
<br>
Jon<br>
<br>
----- Original Message -----<br>
From: "Jonathan Hummel" <jhhummel@bigpond.com><br>
To: "Mark Carbonaro" <mark@carbonaro.org><br>
Cc: stev391@email.com, linux-dvb@linuxtv.org<br>
Sent: Tuesday, 5 August, 2008 10:21:11 PM (GMT+1000) Auto-Detected<br>
Subject: Re: [PATCH-TESTERS-REQUIRED] Leadtek Winfast PxDVR 3200 H <br>
- DVB Only support<br>
<br>
Hi Jon,<br>
<br>
Not a problem at all, I'm new to this myself, below is what went <br>
through and I may not be doing it the right way either.  So if <br>
anyone would like to point out what I am doing wrong I would really <br>
appreciate it.<br>
<br>
The file that I downloaded was called v4l-dvb-2bade2ed7ac8.tar.bz2 <br>
which I downloaded from <br>
http://linuxtv.org/hg/~stoth/v4l-dvb/archive/tip.tar.bz2, I also <br>
saved the patch to the same location as the download.<br>
<br>
The patch didn't apply for me, so I manually patched applied the <br>
patches and created a new diff that should hopefully work for you <br>
also (attached and inline below).  From what I could see the <br>
offsets in Stephens patch were a little off for this code snapshot <br>
but otherwise it is all good.<br>
<br>
I ran the following using the attached diff...<br>
<br>
tar -xjf v4l-dvb-2bade2ed7ac8.tar.bz2<br>
cd v4l-dvb-2bade2ed7ac8<br>
patch -p1 &lt; ../Leadtek.Winfast.PxDVR.3200.H.2.diff<br>
<br>
Once the patch was applied I was then able to build and install the <br>
modules as per the instructions in the INSTALL file.  I ran the <br>
following...<br>
<br>
make all<br>
sudo make install<br>
<br>
 From there I could load the modules and start testing.<br>
<br>
I hope this helps you get started.<br>
<br>
Regards,<br>
Mark<br>
<br>
<br>
<br>
<br>
<br>
<br>
diff -Naur <br>
v4l-dvb-2bade2ed7ac8/linux/Documentation/video4linux/CARDLIST.cx23885 <br>
v4l-dvb2/linux/Documentation/video4linux/CARDLIST.cx23885<br>
--- <br>
v4l-dvb-2bade2ed7ac8/linux/Documentation/video4linux/CARDLIST.cx23885        2008-08-05 11:18:19.000000000 <br>
+1000<br>
+++ <br>
v4l-dvb2/linux/Documentation/video4linux/CARDLIST.cx23885        2008-08-05 <br>
23:27:32.000000000 +1000<br>
@@ -10,3 +10,4 @@<br>
    9 -&gt; Hauppauge WinTV-HVR1400                             [0070:8010]<br>
   10 -&gt; DViCO FusionHDTV7 Dual Express                      [18ac:d618]<br>
   11 -&gt; DViCO FusionHDTV DVB-T Dual Express                 [18ac:db78]<br>
+ 12 -&gt; Leadtek Winfast PxDVR3200 H                         [107d:6681]<br>
diff -Naur <br>
v4l-dvb-2bade2ed7ac8/linux/drivers/media/video/cx23885/Kconfig <br>
v4l-dvb2/linux/drivers/media/video/cx23885/Kconfig<br>
--- <br>
v4l-dvb-2bade2ed7ac8/linux/drivers/media/video/cx23885/Kconfig        2008-08-05 <br>
11:18:19.000000000 +1000<br>
+++ v4l-dvb2/linux/drivers/media/video/cx23885/Kconfig        2008-08-05 <br>
23:37:51.000000000 +1000<br>
@@ -15,6 +15,7 @@<br>
          select DVB_S5H1409 if !DVB_FE_CUSTOMISE<br>
          select DVB_S5H1411 if !DVB_FE_CUSTOMISE<br>
          select DVB_LGDT330X if !DVB_FE_CUSTOMISE<br>
+        select DVB_ZL10353 if !DVB_FE_CUSTOMISE<br>
          select MEDIA_TUNER_XC2028 if !DVB_FE_CUSTOMIZE<br>
          select MEDIA_TUNER_TDA8290 if !DVB_FE_CUSTOMIZE<br>
          select MEDIA_TUNER_TDA18271 if !DVB_FE_CUSTOMIZE<br>
diff -Naur <br>
v4l-dvb-2bade2ed7ac8/linux/drivers/media/video/cx23885/cx23885-cards.c <br>
v4l-dvb2/linux/drivers/media/video/cx23885/cx23885-cards.c<br>
--- <br>
v4l-dvb-2bade2ed7ac8/linux/drivers/media/video/cx23885/cx23885-cards.c        2008-08-05 11:18:19.000000000 <br>
+1000<br>
+++ <br>
v4l-dvb2/linux/drivers/media/video/cx23885/cx23885-cards.c        2008-08-05 <br>
23:41:40.000000000 +1000<br>
@@ -155,6 +155,10 @@<br>
                  .portb                = CX23885_MPEG_DVB,<br>
                  .portc                = CX23885_MPEG_DVB,<br>
          },<br>
+        [CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H] = {<br>
+                .name        = "Leadtek Winfast PxDVR3200 H",<br>
+                .portc        = CX23885_MPEG_DVB,<br>
+        },<br>
  };<br>
  const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);<br>
<br>
@@ -230,6 +234,10 @@<br>
                  .subvendor = 0x18ac,<br>
                  .subdevice = 0xdb78,<br>
                  .card      = CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP,<br>
+        },{<br>
+                .subvendor = 0x107d,<br>
+                .subdevice = 0x6681,<br>
+                .card      = CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H,<br>
          },<br>
  };<br>
  const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);<br>
@@ -353,6 +361,10 @@<br>
                  if (command == 0)<br>
                          bitmask = 0x04;<br>
                  break;<br>
+        case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H:<br>
+                /* Tuner Reset Command */<br>
+                bitmask = 0x00070404;<br>
+                break;<br>
          case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP:<br>
          case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP:<br>
                  if (command == 0) {<br>
@@ -492,6 +504,15 @@<br>
                  mdelay(20);<br>
                  cx_set(GP0_IO, 0x000f000f);<br>
                  break;<br>
+        case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H:<br>
+                /* GPIO-2  xc3028 tuner reset */<br>
+                /* Put the parts into reset and back */<br>
+                cx_set(GP0_IO, 0x00040000);<br>
+                mdelay(20);<br>
+                cx_clear(GP0_IO, 0x00000004);<br>
+                mdelay(20);<br>
+                cx_set(GP0_IO, 0x00040004);<br>
+                break;<br>
          }<br>
  }<br>
<br>
@@ -579,6 +600,7 @@<br>
          case CX23885_BOARD_HAUPPAUGE_HVR1200:<br>
          case CX23885_BOARD_HAUPPAUGE_HVR1700:<br>
          case CX23885_BOARD_HAUPPAUGE_HVR1400:<br>
+        case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H:<br>
          default:<br>
                  ts2-&gt;gen_ctrl_val  = 0xc; /* Serial bus + punctured clock */<br>
                  ts2-&gt;ts_clk_en_val = 0x1; /* Enable TS_CLK */<br>
@@ -592,6 +614,7 @@<br>
          case CX23885_BOARD_HAUPPAUGE_HVR1800:<br>
          case CX23885_BOARD_HAUPPAUGE_HVR1800lp:<br>
          case CX23885_BOARD_HAUPPAUGE_HVR1700:<br>
+        case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H:<br>
                  request_module("cx25840");<br>
                  break;<br>
          }<br>
diff -Naur <br>
v4l-dvb-2bade2ed7ac8/linux/drivers/media/video/cx23885/cx23885-dvb.c <br>
v4l-dvb2/linux/drivers/media/video/cx23885/cx23885-dvb.c<br>
--- <br>
v4l-dvb-2bade2ed7ac8/linux/drivers/media/video/cx23885/cx23885-dvb.c        2008-08-05 11:18:19.000000000 <br>
+1000<br>
+++ <br>
v4l-dvb2/linux/drivers/media/video/cx23885/cx23885-dvb.c        2008-08-05 <br>
23:37:03.000000000 +1000<br>
@@ -37,6 +37,7 @@<br>
  #include "tda8290.h"<br>
  #include "tda18271.h"<br>
  #include "lgdt330x.h"<br>
+#include "zl10353.h"<br>
  #include "xc5000.h"<br>
  #include "tda10048.h"<br>
  #include "tuner-xc2028.h"<br>
@@ -502,6 +503,32 @@<br>
                  }<br>
                  break;<br>
          }<br>
+        case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H:<br>
+                i2c_bus = &amp;dev-&gt;i2c_bus[0];<br>
+<br>
+                port-&gt;dvb.frontend = dvb_attach(zl10353_attach,<br>
+                                                &amp;dvico_fusionhdtv_xc3028,<br>
+                                                &amp;i2c_bus-&gt;i2c_adap);<br>
+                if (port-&gt;dvb.frontend != NULL) {<br>
+                        struct dvb_frontend      *fe;<br>
+                        struct xc2028_config      cfg = {<br>
+                                .i2c_adap  = &amp;dev-&gt;i2c_bus[1].i2c_adap,<br>
+                                .i2c_addr  = 0x61,<br>
+                                .video_dev = port,<br>
+                                .callback  = cx23885_tuner_callback,<br>
+                        };<br>
+                        static struct xc2028_ctrl ctl = {<br>
+                                .fname       = "xc3028-v27.fw",<br>
+                                .max_len     = 64,<br>
+                                .demod       = XC3028_FE_ZARLINK456,<br>
+                        };<br>
+<br>
+                        fe = dvb_attach(xc2028_attach, port-&gt;dvb.frontend,<br>
+                                        &amp;cfg);<br>
+                        if (fe != NULL &amp;&amp; fe-&gt;ops.tuner_ops.set_config != NULL)<br>
+                                fe-&gt;ops.tuner_ops.set_config(fe, &amp;ctl);<br>
+                }<br>
+                break;<br>
          default:<br>
                  printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n",<br>
                         dev-&gt;name);<br>
diff -Naur <br>
v4l-dvb-2bade2ed7ac8/linux/drivers/media/video/cx23885/cx23885.h <br>
v4l-dvb2/linux/drivers/media/video/cx23885/cx23885.h<br>
--- <br>
v4l-dvb-2bade2ed7ac8/linux/drivers/media/video/cx23885/cx23885.h        2008-08-05 <br>
11:18:19.000000000 +1000<br>
+++ v4l-dvb2/linux/drivers/media/video/cx23885/cx23885.h        2008-08-05 <br>
23:37:33.000000000 +1000<br>
@@ -66,6 +66,7 @@<br>
  #define CX23885_BOARD_HAUPPAUGE_HVR1400        9<br>
  #define CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP 10<br>
  #define CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP 11<br>
+#define CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H 12<br>
<br>
  /* Currently unsupported by the driver: PAL/H, NTSC/Kr, SECAM B/G/H/LC */<br>
  #define CX23885_NORMS (\<br>
&lt;&lt; Leadtek.Winfast.PxDVR.3200.H.2.diff &gt;&gt;<br>
</mark@carbonaro.org></jhhummel@bigpond.com></jhhummel@bigpond.com></mark@carbonaro.org></blockquote>
</div>
<BR>

-- 
<div> Be Yourself @ mail.com!<br>
Choose From 200+ Email Addresses<br>
Get a <b>Free</b> Account at <a href="http://www.mail.com/Product.aspx" target="_blank">www.mail.com</a>!</div>