Re: [PATCH 3/3] usb: gadget/uvc: Add fix for UVC compliance test suite's assertion 6.1.25 failure

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

 



Hi Bhupesh,

On Saturday 04 August 2012 00:31:38 Bhupesh SHARMA wrote:
> On Friday, August 03, 2012 1:42 PM Laurent Pinchart wrote:
> > On Thursday 26 July 2012 10:42:51 Bhupesh Sharma wrote:
> > > As per the UVC compliance test suite's assertion 6.1.25, the `iFunction`
> > > field of the Interface Association Descriptor (IAD) should the match the
> > > `iInterface` field of the standard Video Control (VC) Interface
> > > Descriptor for this Video Interface Collection (VIC).
> > > 
> > > This mandatory case is captured in section 3.11 of the
> > > USB Video Class Compliance specification revision 1.1
> > 
> > Which exact document are you referring to ? I see no section 3.11 the
> > UVC 1.1 specification. Section 3.6 states that
> > 
> > "If the VideoControl interface is part of a Video Interface Collection,
> > the iFunction field in the IAD and the iInterface field in the Standard VC
> > interface descriptor for this Video Interface Collection must be
> > equal."
> > 
> > I'll thus assume you meant section 3.6.
> 
> I am referring to June 1, 2005 version of UVC 1.1 specs and I can see a 3.11
> section on page 72 :). In-fact the UVC test specification document which
> explains this particular test case also list this section as the relevant
> one for this test case.
> 
> Are you sure you are using the latest UVC specs from www.usb.org ?

My bad, I've missed section 3.11 for some reason. You were right.

> > > This patch fixes this test assertion's failure and has been tested on
> > > Linux FC16, WinXP, WIN7 and WIN8 High speed and Super Speed hosts
> > > for successful enumeration.
> > > 
> > > Signed-off-by: Bhupesh Sharma <bhupesh.sharma@xxxxxx>
> > > 
> > > ---
> > > 
> > >  drivers/usb/gadget/f_uvc.c |    2 +-
> > >  1 files changed, 1 insertions(+), 1 deletions(-)
> > > 
> > > diff --git a/drivers/usb/gadget/f_uvc.c b/drivers/usb/gadget/f_uvc.c
> > > index 4ef386a..60ff726 100644
> > > --- a/drivers/usb/gadget/f_uvc.c
> > > +++ b/drivers/usb/gadget/f_uvc.c
> > > @@ -823,12 +823,12 @@ uvc_bind_config(struct usb_configuration *c,
> > > 
> > >  			goto error;
> > >  		
> > >  		uvc_en_us_strings[UVC_STRING_ASSOCIATION_IDX].id = ret;
> > >  		uvc_iad.iFunction = ret;
> > > 
> > > +		uvc_control_intf.iInterface = ret;
> > > 
> > >  		ret = usb_string_id(c->cdev);
> > >  		if (ret < 0)
> > >  		
> > >  			goto error;
> > >  		
> > >  		uvc_en_us_strings[UVC_STRING_CONTROL_IDX].id = ret;
> > > 
> > > -		uvc_control_intf.iInterface = ret;
> > 
> > You should completely remove the string descriptor allocation if you
> > don't use it anymore.
> > 
> > I've merged the association and control descriptors and applied the
> > patch to my tree. There's no need to resubmit.
> 
> If you don't mind, can you please provide the link to your git-tree. I want
> to test and make sure that we pass this USBCV's UVC test case with the
> merged approach.

Sure. Here you go:

http://git.linuxtv.org/pinchartl/uvcvideo.git/shortlog/refs/heads/uvc-gadget

-- 
Regards,

Laurent Pinchart
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux