Re: Patch for Yuan PD300 mini

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just in case you were wondering, I have updated my hg source and
recreated the patches, which are once again attached. Also, this time
i didnt forget to add the Subject and Signed off parts to the top of
yuan2.patch.

Both patches successfully compile and work with my device.

Cheers

On 10/10/06, Ben Woods <woodsb02@xxxxxxxxx> wrote:
Ok,

I think I have created a successful patch now.

There are 2 versions... one which defines a new device in dt200u.c in the
static struct dvb_usb_device_properties wt220u_properties
struct... and one which just adds an additional cold id to the already
existing device.

Which is a better method?

Could the better patch please be tested and applied if ok?

Cheers

On 10/10/06, Michael Krufky <mkrufky@xxxxxxxxxxx> wrote:
> On 10/8/06, Gunther Mayer <gunther.mayer@xxxxxxx> wrote:
> > Ben Woods wrote:
> > > This patch fixes the cold boot id for the Yuan PD300 mini USB pen.
> > > It can be applied with the following command from within the v4l-dvb
> > > directory:
> > > patch -p1 < /path/to/yuan.patch
> > >
> > > When using this card, you need to have the dvb-usb-wt220u-02.fw
> > > firmware file in the correct directory (eg. /lib/firmware/`uname
> > > -r`/).
> > >
> > > Can this patch be tested by folk and then hopefully applied?
> > No. Your patch breaks cards with ID 0x222.
>
> Ben Woods wrote:
> > Ok - i see.
> >
> > Is there anyway we can include the correct cold boot id for my device
> > without breaking it for other devices? mkrufky - you were quite
> > helpful with this once before... any ideas?
>
> It's rather simple, actually.  Rather than replacing the current pid with yours, what you need to do
> is add an additional pid to dvb-usb-ids.h.  Then add the new id's to the driver's usb table, reference
> them in the device properties, and increase num_device_descs.
>
> For example, the changeset in the following link does just what you're trying to do now, but with a
> different device:
>
> http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ac9ffb90b8d0d28e3d9e5b5a045ee870a6269b5f
>
> In your case, you are creating a new entry, using 0x220 as the cold id, and 0x221 as the warm id.  Since
> that warm idea is already recognized by the driver, you only have to add the missing cold id.
>
> Your patch should look very similar to the one in the link above.
>
> Hope this helps,
>
> Mike
>


--
From: Benjamin Woods
woodsb02@xxxxxxxxx
Registered Linux User #372573
Registered Ubuntu User # 6395





--
From: Benjamin Woods
woodsb02@xxxxxxxxx
Registered Linux User #372573
Registered Ubuntu User # 6395
Subject: Fix cold boot id for Yuan PD300mini USB pen
Signed-off-by: Benjamin Woods <woodsb02@xxxxxxxxx>
diff -r eda4ace17bb2 linux/drivers/media/dvb/dvb-usb/dtt200u.c
--- a/linux/drivers/media/dvb/dvb-usb/dtt200u.c	Mon Oct 09 16:27:05 2006 -0300
+++ b/linux/drivers/media/dvb/dvb-usb/dtt200u.c	Tue Oct 10 12:35:00 2006 +0800
@@ -119,6 +119,7 @@ static struct usb_device_id dtt200u_usb_
 	{ USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_FC_COLD)  },
 	{ USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_FC_WARM)  },
 	{ USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_ZAP250_COLD)  },
+	{ USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_PD300_COLD)  },
 	{ 0 },
 };
 MODULE_DEVICE_TABLE(usb, dtt200u_usb_table);
@@ -203,10 +204,14 @@ static struct dvb_usb_device_properties 
 
 	.generic_bulk_ctrl_endpoint = 0x01,
 
-	.num_device_descs = 1,
+	.num_device_descs = 2,
 	.devices = {
 		{ .name = "WideView WT-220U PenType Receiver (Typhoon/Freecom)",
 		  .cold_ids = { &dtt200u_usb_table[2], &dtt200u_usb_table[8], NULL },
+		  .warm_ids = { &dtt200u_usb_table[3], NULL },
+		},
+		{ .name = "Yuan PD300mini PenType Receiver",
+		  .cold_ids = { &dtt200u_usb_table[9], NULL },
 		  .warm_ids = { &dtt200u_usb_table[3], NULL },
 		},
 		{ NULL },
diff -r eda4ace17bb2 linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h	Mon Oct 09 16:27:05 2006 -0300
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h	Tue Oct 10 12:35:00 2006 +0800
@@ -92,6 +92,7 @@
 #define USB_PID_WT220U_FC_WARM				0x0226
 #define USB_PID_WT220U_ZL0353_COLD			0x022a
 #define USB_PID_WT220U_ZL0353_WARM			0x022b
+#define USB_PID_WT220U_PD300_COLD			0x0220
 #define USB_PID_WINTV_NOVA_T_USB2_COLD			0x9300
 #define USB_PID_WINTV_NOVA_T_USB2_WARM			0x9301
 #define USB_PID_HAUPPAUGE_NOVA_T_500			0x9941
Subject: Fix cold boot id for Yuan PD300mini USB pen
Signed-off-by: Benjamin Woods <woodsb02@xxxxxxxxx>
diff -r eda4ace17bb2 linux/drivers/media/dvb/dvb-usb/dtt200u.c
--- a/linux/drivers/media/dvb/dvb-usb/dtt200u.c	Mon Oct 09 16:27:05 2006 -0300
+++ b/linux/drivers/media/dvb/dvb-usb/dtt200u.c	Tue Oct 10 12:34:38 2006 +0800
@@ -119,6 +119,7 @@ static struct usb_device_id dtt200u_usb_
 	{ USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_FC_COLD)  },
 	{ USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_FC_WARM)  },
 	{ USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_ZAP250_COLD)  },
+	{ USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_PD300_COLD)  },
 	{ 0 },
 };
 MODULE_DEVICE_TABLE(usb, dtt200u_usb_table);
@@ -206,7 +207,7 @@ static struct dvb_usb_device_properties 
 	.num_device_descs = 1,
 	.devices = {
 		{ .name = "WideView WT-220U PenType Receiver (Typhoon/Freecom)",
-		  .cold_ids = { &dtt200u_usb_table[2], &dtt200u_usb_table[8], NULL },
+		  .cold_ids = { &dtt200u_usb_table[2], &dtt200u_usb_table[8], &dtt200u_usb_table[9], NULL },
 		  .warm_ids = { &dtt200u_usb_table[3], NULL },
 		},
 		{ NULL },
diff -r eda4ace17bb2 linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h	Mon Oct 09 16:27:05 2006 -0300
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h	Tue Oct 10 12:34:38 2006 +0800
@@ -92,6 +92,7 @@
 #define USB_PID_WT220U_FC_WARM				0x0226
 #define USB_PID_WT220U_ZL0353_COLD			0x022a
 #define USB_PID_WT220U_ZL0353_WARM			0x022b
+#define USB_PID_WT220U_PD300_COLD			0x0220
 #define USB_PID_WINTV_NOVA_T_USB2_COLD			0x9300
 #define USB_PID_WINTV_NOVA_T_USB2_WARM			0x9301
 #define USB_PID_HAUPPAUGE_NOVA_T_500			0x9941
_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux