Hi,
Currently, I am trying my best to modify the pwc
code to work with Intex Classic camera.
I am using pwc-10.0.11. The purpose is to add a
facility for another web camera -- Intex Classic (CMOS
chip based -- vendorID 093a, ProdID: 2468). I added
the following lines in the pwc-if.c code file:
/////////////////////////////////////////
static const struct usb_device_id pwc_device_table []
= {
...
{ USB_DEVICE(0x093a, 0x2468) }, /* Intex
Classic */
...
}
static int usb_pwc_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
...
else if (vendor_id == 0x093a) {
switch(product_id) {
case 0x2468:
PWC_INFO("Intex Classic webcam
detected.\n");
name = "Intex Classic";
type_id = 645; /* CMOS sensor */
break;
...
}
///////////////////////////////////////
Here, ... represents untouched (not modified) code.
Compilation goes properly. Now, when I connect the web
cam it detects but gives an error (/var/log/messages):
////
isoc_init() submit_urb 0 failed with error -90
////
I tried to debug it by printing the following
variables and the outputs are:
//////////////////
urb->transfer_buffer_length: 9600
urb->number_of_packets: 10
urb->iso_frame_desc[0].length: 2
///////////////////
The cur_altsetting of device has following details
(/proc/bus/usb/devices):
////////////
2-3 (hub-port)
ISO IN Addr:85 MxPS: 0, Intrvl: 1 ms
////////////
I looked into the urb.c code in linux-2.6.9 --
there are three places where -EMSGSIZE (i.e., -90)
error is given:
/////////////////////
1:
===
if (max <= 0) {
dbg ("%s: bogus endpoint %d-%s on usb-%s-%s (bad
maxpacket %d)", __FUNCTION__, usb_pipeendpoint (pipe),
is_out ? "OUT" : "IN", dev->bus->bus_name,
dev->devpath, max);
return -EMSGSIZE;
}
2:
===
for (n = 0; n < urb->number_of_packets; n++) {
len = urb->iso_frame_desc [n].length;
if (len < 0 || len > max)
return -EMSGSIZE;
urb->iso_frame_desc [n].status = -EXDEV;
urb->iso_frame_desc [n].actual_length = 0;
}
3:
===
if (urb->transfer_buffer_length < 0)
return -EMSGSIZE;
/////////////////////
By looking at the code it appears to me that error
occurs in case 2. But I am not able to understand how
to rectify it. Can any one help me at this stage.
Thank you,
--Amrit
Explore your hobbies and interests. Go to
http://in.promos.yahoo.com/groups
_______________________________________________
pwc mailing list
http://lists.saillard.org/mailman/listinfo/pwc
|