Bulk is sometimes useful for USB 1.1 were you have lower bandwidth
available. But yeah we shouldn't bother scanning the entire packet in
isoc mode as its not necessary at all.

This patch has now been pushed out to the repo.

2009/4/12 Boris Borisov <[email protected]>:
> The bulk transfer and search in big stream is very hard task for
> processor. It is realy necesery to have bulk transfer?
> See my new proposal for patch.
> Brian Johnson wrote:
>> This code is necessary for bulk transfers since when using bulk mode
>> the header is not sent in a seperate packet by itself but is found
>> inside a larger bulk packet. however sicne when using isoc which is
>> the default the header is always a single 64 byte packet it should be
>> ok to run that scan only if you currently have bulk mode enabled.
>>
>> 2009/4/12 Boris Borisov <[email protected]>:
>>
>>> Hello,
>>> The hunger function is detect start of frame, because is perform many
>>> comparation if received buffer is large than 64 bytes.
>>> See the patch
>>>
>>>
>>>
> snip
>
> >
>
> diff --git a/sn9c20x-usb.c b/sn9c20x-usb.c
> index 4e7f1c7..ecec38d 100644
> --- a/sn9c20x-usb.c
> +++ b/sn9c20x-usb.c
> @@ -501,12 +501,17 @@ int usb_sn9c20x_detect_frame(unsigned char *buf, 
> unsigned int buf_length)
>                else
>                        return -1;
>        }
> -       for (index = 0; index < buf_length - 63; index++) {
> -               if (memcmp(buf + index, frame_header, 6) == 0) {
> -                       UDIA_DEBUG("Found Header at %d\n", index);
> -                       return index;
> -               }
> -       }
> +
> +       if(bulk)
> +         {
> +           for (index = 0; index < buf_length - 63; index++) {
> +                   if (memcmp(buf + index, frame_header, 6) == 0) {
> +                           UDIA_DEBUG("Found Header at %d\n", index);
> +                           return index;
> +                   }
> +           }
> +         }
> +
>        return -1;
>  }
>
>
>

--~--~---------~--~----~------------~-------~--~----~
Lets make microdia webcams plug'n play, (currently plug'n pray)
To post to this group, send email to [email protected]
Visit us online https://groups.google.com/group/microdia
-~----------~----~----~----~------~----~------~--~---

Reply via email to