* [PATCH, RFC] gspca pac7302: add USB PID range based on heuristics
@ 2010-01-31 10:19 Németh Márton
2010-01-31 12:21 ` Hans de Goede
0 siblings, 1 reply; 5+ messages in thread
From: Németh Márton @ 2010-01-31 10:19 UTC (permalink / raw)
To: Jean-Francois Moine, Theodore Kilgore, Thomas Kaiser,
Hans de Goede
Cc: V4L Mailing List
Hi,
as I was reading the PixArt PAC7301/PAC7302 datasheet
( http://www.pixart.com.tw/upload/PAC7301_7302%20%20Spec%20V1_20091228174030.pdf )
I recognised a little description on the schematics. This is about how to
set up the USB Product ID from range 0x2620..0x262f via hardware wires.
I had the idea that the list of supported devices could be extended with the full
range because the System on a Chip internals will not change just because it is
configured to a different USB Product ID.
I don't know much about the maintenance implications that's why I'm very
much listening to the comments of this idea.
So, what do you think?
Regards,
Márton Németh
---
From: Márton Németh <nm127@freemail.hu>
On the schematics in PixArt PAC7301/PAC7302 datasheet
(http://www.pixart.com.tw/upload/PAC7301_7302%20%20Spec%20V1_20091228174030.pdf)
pages 19, 20, 21 and 22 there is a note titled "PID IO_TRAP" which describes
the possible product ID range 0x2620..0x262f. In this range there are some
known webcams, however, there are some PIDs with unknown or future devices.
Because PixArt PAC7301/PAC7302 is a System on a Chip (SoC) device is is
probable that this driver will work correctly independent of the used PID.
Signed-off-by: Márton Németh <nm127@freemail.hu>
---
diff -r dfa82cf98a85 linux/drivers/media/video/gspca/pac7302.c
--- a/linux/drivers/media/video/gspca/pac7302.c Sat Jan 30 20:03:02 2010 +0100
+++ b/linux/drivers/media/video/gspca/pac7302.c Sun Jan 31 11:08:21 2010 +0100
@@ -96,6 +96,7 @@
u8 flags;
#define FL_HFLIP 0x01 /* mirrored by default */
#define FL_VFLIP 0x02 /* vertical flipped by default */
+#define FL_EXPERIMENTAL 0x80 /* USB IDs based on heuristic without any known product */
u8 sof_read;
u8 autogain_ignore_frames;
@@ -1220,17 +1221,33 @@
};
/* -- module initialisation -- */
+/* Note on FL_EXPERIMENTAL:
+ * On the schematics in PixArt PAC7301/PAC7302 datasheet
+ * (http://www.pixart.com.tw/upload/PAC7301_7302%20%20Spec%20V1_20091228174030.pdf)
+ * pages 19, 20, 21 and 22 there is a note titled "PID IO_TRAP" which describes
+ * the possible product ID range 0x2620..0x262f. In this range there are some
+ * known webcams, however, there are some PIDs with unknown or future devices.
+ * Because PixArt PAC7301/PAC7302 is a System on a Chip (SoC) device is is
+ * probable that this driver will work correctly independent of the used PID.
+ */
static const struct usb_device_id device_table[] __devinitconst = {
{USB_DEVICE(0x06f8, 0x3009)},
{USB_DEVICE(0x093a, 0x2620)},
{USB_DEVICE(0x093a, 0x2621)},
{USB_DEVICE(0x093a, 0x2622), .driver_info = FL_VFLIP},
+ {USB_DEVICE(0x093a, 0x2623), .driver_info = FL_EXPERIMENTAL },
{USB_DEVICE(0x093a, 0x2624), .driver_info = FL_VFLIP},
+ {USB_DEVICE(0x093a, 0x2625), .driver_info = FL_EXPERIMENTAL },
{USB_DEVICE(0x093a, 0x2626)},
+ {USB_DEVICE(0x093a, 0x2627), .driver_info = FL_EXPERIMENTAL },
{USB_DEVICE(0x093a, 0x2628)},
{USB_DEVICE(0x093a, 0x2629), .driver_info = FL_VFLIP},
{USB_DEVICE(0x093a, 0x262a)},
+ {USB_DEVICE(0x093a, 0x262b), .driver_info = FL_EXPERIMENTAL },
{USB_DEVICE(0x093a, 0x262c)},
+ {USB_DEVICE(0x093a, 0x262d), .driver_info = FL_EXPERIMENTAL },
+ {USB_DEVICE(0x093a, 0x262e), .driver_info = FL_EXPERIMENTAL },
+ {USB_DEVICE(0x093a, 0x262f), .driver_info = FL_EXPERIMENTAL },
{}
};
MODULE_DEVICE_TABLE(usb, device_table);
@@ -1239,6 +1256,17 @@
static int __devinit sd_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
+ if ((u8)id->driver_info & FL_EXPERIMENTAL) {
+ PDEBUG(D_ERR | D_PROBE, "WARNING: USB device ID %04x:%04x is "
+ "not known, but based on some heuristics this driver "
+ "tries to handle it.",
+ id->idVendor, id->idProduct);
+ PDEBUG(D_ERR | D_PROBE, "WARNING: Plase send an email to "
+ "linux-media@vger.kernel.org with 'lsusb -v' output, "
+ "the vendor and name of the product and whether the "
+ "device is working or not.");
+ }
+
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
THIS_MODULE);
}
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH, RFC] gspca pac7302: add USB PID range based on heuristics
2010-01-31 10:19 [PATCH, RFC] gspca pac7302: add USB PID range based on heuristics Németh Márton
@ 2010-01-31 12:21 ` Hans de Goede
2010-02-24 7:09 ` [PATCH] " Németh Márton
0 siblings, 1 reply; 5+ messages in thread
From: Hans de Goede @ 2010-01-31 12:21 UTC (permalink / raw)
To: Németh Márton
Cc: Jean-Francois Moine, Theodore Kilgore, Thomas Kaiser,
V4L Mailing List
Hi,
On 01/31/2010 11:19 AM, Németh Márton wrote:
> Hi,
>
> as I was reading the PixArt PAC7301/PAC7302 datasheet
> ( http://www.pixart.com.tw/upload/PAC7301_7302%20%20Spec%20V1_20091228174030.pdf )
> I recognised a little description on the schematics. This is about how to
> set up the USB Product ID from range 0x2620..0x262f via hardware wires.
>
> I had the idea that the list of supported devices could be extended with the full
> range because the System on a Chip internals will not change just because it is
> configured to a different USB Product ID.
>
> I don't know much about the maintenance implications that's why I'm very
> much listening to the comments of this idea.
>
> So, what do you think?
>
Seems like a good idea to me.
Regards,
Hans
> Regards,
>
> Márton Németh
>
> ---
> From: Márton Németh<nm127@freemail.hu>
>
> On the schematics in PixArt PAC7301/PAC7302 datasheet
> (http://www.pixart.com.tw/upload/PAC7301_7302%20%20Spec%20V1_20091228174030.pdf)
> pages 19, 20, 21 and 22 there is a note titled "PID IO_TRAP" which describes
> the possible product ID range 0x2620..0x262f. In this range there are some
> known webcams, however, there are some PIDs with unknown or future devices.
> Because PixArt PAC7301/PAC7302 is a System on a Chip (SoC) device is is
> probable that this driver will work correctly independent of the used PID.
>
> Signed-off-by: Márton Németh<nm127@freemail.hu>
> ---
> diff -r dfa82cf98a85 linux/drivers/media/video/gspca/pac7302.c
> --- a/linux/drivers/media/video/gspca/pac7302.c Sat Jan 30 20:03:02 2010 +0100
> +++ b/linux/drivers/media/video/gspca/pac7302.c Sun Jan 31 11:08:21 2010 +0100
> @@ -96,6 +96,7 @@
> u8 flags;
> #define FL_HFLIP 0x01 /* mirrored by default */
> #define FL_VFLIP 0x02 /* vertical flipped by default */
> +#define FL_EXPERIMENTAL 0x80 /* USB IDs based on heuristic without any known product */
>
> u8 sof_read;
> u8 autogain_ignore_frames;
> @@ -1220,17 +1221,33 @@
> };
>
> /* -- module initialisation -- */
> +/* Note on FL_EXPERIMENTAL:
> + * On the schematics in PixArt PAC7301/PAC7302 datasheet
> + * (http://www.pixart.com.tw/upload/PAC7301_7302%20%20Spec%20V1_20091228174030.pdf)
> + * pages 19, 20, 21 and 22 there is a note titled "PID IO_TRAP" which describes
> + * the possible product ID range 0x2620..0x262f. In this range there are some
> + * known webcams, however, there are some PIDs with unknown or future devices.
> + * Because PixArt PAC7301/PAC7302 is a System on a Chip (SoC) device is is
> + * probable that this driver will work correctly independent of the used PID.
> + */
> static const struct usb_device_id device_table[] __devinitconst = {
> {USB_DEVICE(0x06f8, 0x3009)},
> {USB_DEVICE(0x093a, 0x2620)},
> {USB_DEVICE(0x093a, 0x2621)},
> {USB_DEVICE(0x093a, 0x2622), .driver_info = FL_VFLIP},
> + {USB_DEVICE(0x093a, 0x2623), .driver_info = FL_EXPERIMENTAL },
> {USB_DEVICE(0x093a, 0x2624), .driver_info = FL_VFLIP},
> + {USB_DEVICE(0x093a, 0x2625), .driver_info = FL_EXPERIMENTAL },
> {USB_DEVICE(0x093a, 0x2626)},
> + {USB_DEVICE(0x093a, 0x2627), .driver_info = FL_EXPERIMENTAL },
> {USB_DEVICE(0x093a, 0x2628)},
> {USB_DEVICE(0x093a, 0x2629), .driver_info = FL_VFLIP},
> {USB_DEVICE(0x093a, 0x262a)},
> + {USB_DEVICE(0x093a, 0x262b), .driver_info = FL_EXPERIMENTAL },
> {USB_DEVICE(0x093a, 0x262c)},
> + {USB_DEVICE(0x093a, 0x262d), .driver_info = FL_EXPERIMENTAL },
> + {USB_DEVICE(0x093a, 0x262e), .driver_info = FL_EXPERIMENTAL },
> + {USB_DEVICE(0x093a, 0x262f), .driver_info = FL_EXPERIMENTAL },
> {}
> };
> MODULE_DEVICE_TABLE(usb, device_table);
> @@ -1239,6 +1256,17 @@
> static int __devinit sd_probe(struct usb_interface *intf,
> const struct usb_device_id *id)
> {
> + if ((u8)id->driver_info& FL_EXPERIMENTAL) {
> + PDEBUG(D_ERR | D_PROBE, "WARNING: USB device ID %04x:%04x is "
> + "not known, but based on some heuristics this driver "
> + "tries to handle it.",
> + id->idVendor, id->idProduct);
> + PDEBUG(D_ERR | D_PROBE, "WARNING: Plase send an email to "
> + "linux-media@vger.kernel.org with 'lsusb -v' output, "
> + "the vendor and name of the product and whether the "
> + "device is working or not.");
> + }
> +
> return gspca_dev_probe(intf, id,&sd_desc, sizeof(struct sd),
> THIS_MODULE);
> }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH] gspca pac7302: add USB PID range based on heuristics
2010-01-31 12:21 ` Hans de Goede
@ 2010-02-24 7:09 ` Németh Márton
2010-02-24 7:28 ` Jean-Francois Moine
0 siblings, 1 reply; 5+ messages in thread
From: Németh Márton @ 2010-02-24 7:09 UTC (permalink / raw)
To: Hans de Goede
Cc: Jean-Francois Moine, Theodore Kilgore, Thomas Kaiser,
V4L Mailing List
From: Márton Németh <nm127@freemail.hu>
On the schematics in PixArt PAC7301/PAC7302 datasheet
(http://www.pixart.com.tw/upload/PAC7301_7302%20%20Spec%20V1_20091228174030.pdf)
pages 19, 20, 21 and 22 there is a note titled "PID IO_TRAP" which describes
the possible product ID range 0x2620..0x262f. In this range there are some
known webcams, however, there are some PIDs with unknown or future devices.
Because PixArt PAC7301/PAC7302 is a System on a Chip (SoC) device is is
probable that this driver will work correctly independent of the used PID.
Signed-off-by: Márton Németh <nm127@freemail.hu>
---
diff -r dfa82cf98a85 linux/drivers/media/video/gspca/pac7302.c
--- a/linux/drivers/media/video/gspca/pac7302.c Sat Jan 30 20:03:02 2010 +0100
+++ b/linux/drivers/media/video/gspca/pac7302.c Sun Jan 31 11:08:21 2010 +0100
@@ -96,6 +96,7 @@
u8 flags;
#define FL_HFLIP 0x01 /* mirrored by default */
#define FL_VFLIP 0x02 /* vertical flipped by default */
+#define FL_EXPERIMENTAL 0x80 /* USB IDs based on heuristic without any known product */
u8 sof_read;
u8 autogain_ignore_frames;
@@ -1220,17 +1221,33 @@
};
/* -- module initialisation -- */
+/* Note on FL_EXPERIMENTAL:
+ * On the schematics in PixArt PAC7301/PAC7302 datasheet
+ * (http://www.pixart.com.tw/upload/PAC7301_7302%20%20Spec%20V1_20091228174030.pdf)
+ * pages 19, 20, 21 and 22 there is a note titled "PID IO_TRAP" which describes
+ * the possible product ID range 0x2620..0x262f. In this range there are some
+ * known webcams, however, there are some PIDs with unknown or future devices.
+ * Because PixArt PAC7301/PAC7302 is a System on a Chip (SoC) device is is
+ * probable that this driver will work correctly independent of the used PID.
+ */
static const struct usb_device_id device_table[] __devinitconst = {
{USB_DEVICE(0x06f8, 0x3009)},
{USB_DEVICE(0x093a, 0x2620)},
{USB_DEVICE(0x093a, 0x2621)},
{USB_DEVICE(0x093a, 0x2622), .driver_info = FL_VFLIP},
+ {USB_DEVICE(0x093a, 0x2623), .driver_info = FL_EXPERIMENTAL },
{USB_DEVICE(0x093a, 0x2624), .driver_info = FL_VFLIP},
+ {USB_DEVICE(0x093a, 0x2625), .driver_info = FL_EXPERIMENTAL },
{USB_DEVICE(0x093a, 0x2626)},
+ {USB_DEVICE(0x093a, 0x2627), .driver_info = FL_EXPERIMENTAL },
{USB_DEVICE(0x093a, 0x2628)},
{USB_DEVICE(0x093a, 0x2629), .driver_info = FL_VFLIP},
{USB_DEVICE(0x093a, 0x262a)},
+ {USB_DEVICE(0x093a, 0x262b), .driver_info = FL_EXPERIMENTAL },
{USB_DEVICE(0x093a, 0x262c)},
+ {USB_DEVICE(0x093a, 0x262d), .driver_info = FL_EXPERIMENTAL },
+ {USB_DEVICE(0x093a, 0x262e), .driver_info = FL_EXPERIMENTAL },
+ {USB_DEVICE(0x093a, 0x262f), .driver_info = FL_EXPERIMENTAL },
{}
};
MODULE_DEVICE_TABLE(usb, device_table);
@@ -1239,6 +1256,17 @@
static int __devinit sd_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
+ if ((u8)id->driver_info & FL_EXPERIMENTAL) {
+ PDEBUG(D_ERR | D_PROBE, "WARNING: USB device ID %04x:%04x is "
+ "not known, but based on some heuristics this driver "
+ "tries to handle it.",
+ id->idVendor, id->idProduct);
+ PDEBUG(D_ERR | D_PROBE, "WARNING: Plase send an email to "
+ "linux-media@vger.kernel.org with 'lsusb -v' output, "
+ "the vendor and name of the product and whether the "
+ "device is working or not.");
+ }
+
return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
THIS_MODULE);
}
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] gspca pac7302: add USB PID range based on heuristics
2010-02-24 7:09 ` [PATCH] " Németh Márton
@ 2010-02-24 7:28 ` Jean-Francois Moine
2010-02-24 8:14 ` Németh Márton
0 siblings, 1 reply; 5+ messages in thread
From: Jean-Francois Moine @ 2010-02-24 7:28 UTC (permalink / raw)
To: Németh Márton
Cc: Hans de Goede, Theodore Kilgore, Thomas Kaiser, V4L Mailing List
On Wed, 24 Feb 2010 08:09:41 +0100
Németh Márton <nm127@freemail.hu> wrote:
> On the schematics in PixArt PAC7301/PAC7302 datasheet
> (http://www.pixart.com.tw/upload/PAC7301_7302%20%20Spec%20V1_20091228174030.pdf)
> pages 19, 20, 21 and 22 there is a note titled "PID IO_TRAP" which
> describes the possible product ID range 0x2620..0x262f. In this range
> there are some known webcams, however, there are some PIDs with
> unknown or future devices. Because PixArt PAC7301/PAC7302 is a System
> on a Chip (SoC) device is is probable that this driver will work
> correctly independent of the used PID.
Hello,
I got such information from ms-win drivers. I appeared that most of the
unknown/new webcams were never manufactured. Now, I wait for user
requests before adding such webcams.
Cheers.
--
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gspca pac7302: add USB PID range based on heuristics
2010-02-24 7:28 ` Jean-Francois Moine
@ 2010-02-24 8:14 ` Németh Márton
0 siblings, 0 replies; 5+ messages in thread
From: Németh Márton @ 2010-02-24 8:14 UTC (permalink / raw)
To: Jean-Francois Moine
Cc: Hans de Goede, Theodore Kilgore, Thomas Kaiser, V4L Mailing List
Hi,
Jean-Francois Moine wrote:
> On Wed, 24 Feb 2010 08:09:41 +0100
> Németh Márton <nm127@freemail.hu> wrote:
>
>> On the schematics in PixArt PAC7301/PAC7302 datasheet
>> (http://www.pixart.com.tw/upload/PAC7301_7302%20%20Spec%20V1_20091228174030.pdf)
>> pages 19, 20, 21 and 22 there is a note titled "PID IO_TRAP" which
>> describes the possible product ID range 0x2620..0x262f. In this range
>> there are some known webcams, however, there are some PIDs with
>> unknown or future devices. Because PixArt PAC7301/PAC7302 is a System
>> on a Chip (SoC) device is is probable that this driver will work
>> correctly independent of the used PID.
>
> Hello,
>
> I got such information from ms-win drivers. I appeared that most of the
> unknown/new webcams were never manufactured. Now, I wait for user
> requests before adding such webcams.
What about Genius iSlim 310? Based on the Windows driver this device is
a potential candidate for pac7302 driver, see
http://linuxtv.org/wiki/index.php/PixArt_PAC7301/PAC7302#Identification
I don't have access to Genius iSlim 310 so I cannot tell it for sure.
Regards,
Márton Németh
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-02-24 8:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-31 10:19 [PATCH, RFC] gspca pac7302: add USB PID range based on heuristics Németh Márton
2010-01-31 12:21 ` Hans de Goede
2010-02-24 7:09 ` [PATCH] " Németh Márton
2010-02-24 7:28 ` Jean-Francois Moine
2010-02-24 8:14 ` Németh Márton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox