Hi,

my webcam works fine now. the cause of the problem i mentioned last time
seems to be the "alignment" issue.

due to kernel use 32bytes alignment for data structure but application
doesn't, the constant for ioctl ex: VIDIOCGPICT

has different value in kernel module and user application. so it always
returns -22 when runs in ioctl.

finally i added "-mstructure-size-boundary=32" in application's Makefile and
solved this problem.


thanks your help



best regards,

kashin lin

2007/11/19, Manjunatha AM <[EMAIL PROTECTED]>:
>
> Hi kashin,
>
> My webcam was using mode 2 and endpoint 3  and hence I, have cheanged as
> below in(Linux) drivers/usb/musb/plat_uds.c
>
> static struct fifo_cfg __initdata mode_2_cfg[] = {
>
> { .hw_ep_num = 1, .style = FIFO_TX, .maxpacket = 256, .mode =
> BUF_DOUBLE,},
>
> { .hw_ep_num = 1, .style = FIFO_RX, .maxpacket = 256, .mode = BUF_DOUBLE,
> },
>
> { .hw_ep_num = 2, .style = FIFO_TX, .maxpacket = 512, },
>
> { .hw_ep_num = 2, .style = FIFO_RX, .maxpacket = 512, },
>
> { .hw_ep_num = 3, .style = FIFO_RXTX, .maxpacket = 1024,},
>
> { .hw_ep_num = 4, .style = FIFO_RXTX, .maxpacket = 256, },
>
> };
> As overall FIFO Size is only 4KB, I have gave max size of 1024 to EP3 and
> rest is distributed to all others.
>
> Let me know the status.
>
> Thanks
> Manjunath.AM
>
>
>
> -----Original Message-----
> *From:* kashin Lin [mailto:[EMAIL PROTECTED]
> *Sent:* Saturday, November 17, 2007 12:18 AM
> *To:* [EMAIL PROTECTED]
> *Subject:* About "[Spca50x-devs] How to increase the packet size (USB)"
>
> Hi,
>
> i seen your posts on the mailinglist regarding using webcam on Davinci
> EVM.
> ( 
> http://linux.omap.com/pipermail/davinci-linux-open-source/2007-July/003602.html
> )
> and i think the problem i encounter is the same as yours. so i send this
> mail for more
> help.
>
> i use 2.6.23(montavista) kernel for my TI-DAVINCI based board,
> gspcav1-20070508 as my
> webcam driver and spcaview-20061208 as the application to test. i got
> -ENOSPC when submit
> urb, so it seems FIFO size isn't big enough.
>
> i wonder how you reslove it? how to increase the FIFO size?
> i am not familiar with the usb host controller driver. can you show me
> detail to achieve it?
>
>
> p.s. currently, i change ".maxpacket" in fifo mode 2 of ep1 & ep2 RX from
> 512 -> 1024.
>        and the ENOSPC error msg disappear but i got " Couldnt get
> videopict params with VIDIOCGPICT"
>        when i use spcaview...
>        so i think the way i change FIFO size is wrong... so i really need
> your help.
>
> Thanks in advance
>
>
> Best regard,
>
> kashin lin
>
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments contained in it. Contact your Administrator
> for further information.
>
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to