diff mbox series

[1/2] usb: gadget: uvc: Updating bcdUVC field to 0x0110

Message ID 20210308102735.9251-1-pawell@gli-login.cadence.com
State New
Headers show
Series [1/2] usb: gadget: uvc: Updating bcdUVC field to 0x0110 | expand

Commit Message

Pawel Laszczak March 8, 2021, 10:27 a.m. UTC
From: Pawel Laszczak <pawell@cadence.com>

Command Verifier during UVC Descriptor Tests (Class Video Control
Interface Descriptor Test Video) compleins about:

Video Control Interface Header bcdUVC is 0x0100. USB Video Class
specification 1.0 has been replaced by 1.1 specification
(UVC: 6.2.26) Class Video Control Interface Descriptor bcdUVC is not 1.1

Signed-off-by: Pawel Laszczak <pawell@cadence.com>
---
 drivers/usb/gadget/function/uvc_configfs.c | 2 +-
 drivers/usb/gadget/legacy/webcam.c         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Peter Chen March 14, 2021, 1:58 a.m. UTC | #1
On 21-03-08 11:27:34, Pawel Laszczak wrote:
> From: Pawel Laszczak <pawell@cadence.com>

> 

> Command Verifier during UVC Descriptor Tests (Class Video Control

> Interface Descriptor Test Video) compleins about:


%s/compleins/complains

> 

> Video Control Interface Header bcdUVC is 0x0100. USB Video Class

> specification 1.0 has been replaced by 1.1 specification

> (UVC: 6.2.26) Class Video Control Interface Descriptor bcdUVC is not 1.1


What does this (UVC: 6.2.26) mean? There are only 4 chapters for this
spec, Am I something wrong?

> 

> Signed-off-by: Pawel Laszczak <pawell@cadence.com>

> ---

>  drivers/usb/gadget/function/uvc_configfs.c | 2 +-

>  drivers/usb/gadget/legacy/webcam.c         | 2 +-

>  2 files changed, 2 insertions(+), 2 deletions(-)

> 

> diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c

> index 00fb58e50a15..cd28dec837dd 100644

> --- a/drivers/usb/gadget/function/uvc_configfs.c

> +++ b/drivers/usb/gadget/function/uvc_configfs.c

> @@ -231,7 +231,7 @@ static struct config_item *uvcg_control_header_make(struct config_group *group,

>  	h->desc.bLength			= UVC_DT_HEADER_SIZE(1);

>  	h->desc.bDescriptorType		= USB_DT_CS_INTERFACE;

>  	h->desc.bDescriptorSubType	= UVC_VC_HEADER;

> -	h->desc.bcdUVC			= cpu_to_le16(0x0100);

> +	h->desc.bcdUVC			= cpu_to_le16(0x0110);

>  	h->desc.dwClockFrequency	= cpu_to_le32(48000000);

>  

>  	config_item_init_type_name(&h->item, name, &uvcg_control_header_type);

> diff --git a/drivers/usb/gadget/legacy/webcam.c b/drivers/usb/gadget/legacy/webcam.c

> index a9f8eb8e1c76..3a61de4bb2b1 100644

> --- a/drivers/usb/gadget/legacy/webcam.c

> +++ b/drivers/usb/gadget/legacy/webcam.c

> @@ -90,7 +90,7 @@ static const struct UVC_HEADER_DESCRIPTOR(1) uvc_control_header = {

>  	.bLength		= UVC_DT_HEADER_SIZE(1),

>  	.bDescriptorType	= USB_DT_CS_INTERFACE,

>  	.bDescriptorSubType	= UVC_VC_HEADER,

> -	.bcdUVC			= cpu_to_le16(0x0100),

> +	.bcdUVC			= cpu_to_le16(0x0110),

>  	.wTotalLength		= 0, /* dynamic */

>  	.dwClockFrequency	= cpu_to_le32(48000000),

>  	.bInCollection		= 0, /* dynamic */

> -- 

> 2.25.1

> 


-- 

Thanks,
Peter Chen
Laurent Pinchart March 14, 2021, 2:18 a.m. UTC | #2
Hello Pawel,

Thank you for the patch.

On Sun, Mar 14, 2021 at 09:58:46AM +0800, Peter Chen wrote:
> On 21-03-08 11:27:34, Pawel Laszczak wrote:

> > From: Pawel Laszczak <pawell@cadence.com>

> > 

> > Command Verifier during UVC Descriptor Tests (Class Video Control

> > Interface Descriptor Test Video) compleins about:

> 

> %s/compleins/complains

> 

> > Video Control Interface Header bcdUVC is 0x0100. USB Video Class

> > specification 1.0 has been replaced by 1.1 specification

> > (UVC: 6.2.26) Class Video Control Interface Descriptor bcdUVC is not 1.1

> 

> What does this (UVC: 6.2.26) mean? There are only 4 chapters for this

> spec, Am I something wrong?


I assume this is a reference to a test case in the test suite.

> > Signed-off-by: Pawel Laszczak <pawell@cadence.com>

> > ---

> >  drivers/usb/gadget/function/uvc_configfs.c | 2 +-

> >  drivers/usb/gadget/legacy/webcam.c         | 2 +-

> >  2 files changed, 2 insertions(+), 2 deletions(-)

> > 

> > diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c

> > index 00fb58e50a15..cd28dec837dd 100644

> > --- a/drivers/usb/gadget/function/uvc_configfs.c

> > +++ b/drivers/usb/gadget/function/uvc_configfs.c

> > @@ -231,7 +231,7 @@ static struct config_item *uvcg_control_header_make(struct config_group *group,

> >  	h->desc.bLength			= UVC_DT_HEADER_SIZE(1);

> >  	h->desc.bDescriptorType		= USB_DT_CS_INTERFACE;

> >  	h->desc.bDescriptorSubType	= UVC_VC_HEADER;

> > -	h->desc.bcdUVC			= cpu_to_le16(0x0100);

> > +	h->desc.bcdUVC			= cpu_to_le16(0x0110);

> >  	h->desc.dwClockFrequency	= cpu_to_le32(48000000);

> >  

> >  	config_item_init_type_name(&h->item, name, &uvcg_control_header_type);

> > diff --git a/drivers/usb/gadget/legacy/webcam.c b/drivers/usb/gadget/legacy/webcam.c

> > index a9f8eb8e1c76..3a61de4bb2b1 100644

> > --- a/drivers/usb/gadget/legacy/webcam.c

> > +++ b/drivers/usb/gadget/legacy/webcam.c

> > @@ -90,7 +90,7 @@ static const struct UVC_HEADER_DESCRIPTOR(1) uvc_control_header = {

> >  	.bLength		= UVC_DT_HEADER_SIZE(1),

> >  	.bDescriptorType	= USB_DT_CS_INTERFACE,

> >  	.bDescriptorSubType	= UVC_VC_HEADER,

> > -	.bcdUVC			= cpu_to_le16(0x0100),

> > +	.bcdUVC			= cpu_to_le16(0x0110),

> >  	.wTotalLength		= 0, /* dynamic */

> >  	.dwClockFrequency	= cpu_to_le32(48000000),

> >  	.bInCollection		= 0, /* dynamic */


The change looks good to me. With the typo in the commit message fixed,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>


-- 
Regards,

Laurent Pinchart
Pawel Laszczak March 15, 2021, 5:10 a.m. UTC | #3
Hi Laurent
>

>Hello Pawel,

>

>Thank you for the patch.

>

>On Sun, Mar 14, 2021 at 09:58:46AM +0800, Peter Chen wrote:

>> On 21-03-08 11:27:34, Pawel Laszczak wrote:

>> > From: Pawel Laszczak <pawell@cadence.com>

>> >

>> > Command Verifier during UVC Descriptor Tests (Class Video Control

>> > Interface Descriptor Test Video) compleins about:

>>

>> %s/compleins/complains

>>

>> > Video Control Interface Header bcdUVC is 0x0100. USB Video Class

>> > specification 1.0 has been replaced by 1.1 specification

>> > (UVC: 6.2.26) Class Video Control Interface Descriptor bcdUVC is not 1.1

>>

>> What does this (UVC: 6.2.26) mean? There are only 4 chapters for this

>> spec, Am I something wrong?

>

>I assume this is a reference to a test case in the test suite.


It's a reference to UVC Compliance Test Spec.pdf. 
This document is part of Command Verifier tester.

I will resend the patch without typo. 

Thanks

>

>> > Signed-off-by: Pawel Laszczak <pawell@cadence.com>

>> > ---

>> >  drivers/usb/gadget/function/uvc_configfs.c | 2 +-

>> >  drivers/usb/gadget/legacy/webcam.c         | 2 +-

>> >  2 files changed, 2 insertions(+), 2 deletions(-)

>> >

>> > diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c

>> > index 00fb58e50a15..cd28dec837dd 100644

>> > --- a/drivers/usb/gadget/function/uvc_configfs.c

>> > +++ b/drivers/usb/gadget/function/uvc_configfs.c

>> > @@ -231,7 +231,7 @@ static struct config_item *uvcg_control_header_make(struct config_group *group,

>> >  	h->desc.bLength			= UVC_DT_HEADER_SIZE(1);

>> >  	h->desc.bDescriptorType		= USB_DT_CS_INTERFACE;

>> >  	h->desc.bDescriptorSubType	= UVC_VC_HEADER;

>> > -	h->desc.bcdUVC			= cpu_to_le16(0x0100);

>> > +	h->desc.bcdUVC			= cpu_to_le16(0x0110);

>> >  	h->desc.dwClockFrequency	= cpu_to_le32(48000000);

>> >

>> >  	config_item_init_type_name(&h->item, name, &uvcg_control_header_type);

>> > diff --git a/drivers/usb/gadget/legacy/webcam.c b/drivers/usb/gadget/legacy/webcam.c

>> > index a9f8eb8e1c76..3a61de4bb2b1 100644

>> > --- a/drivers/usb/gadget/legacy/webcam.c

>> > +++ b/drivers/usb/gadget/legacy/webcam.c

>> > @@ -90,7 +90,7 @@ static const struct UVC_HEADER_DESCRIPTOR(1) uvc_control_header = {

>> >  	.bLength		= UVC_DT_HEADER_SIZE(1),

>> >  	.bDescriptorType	= USB_DT_CS_INTERFACE,

>> >  	.bDescriptorSubType	= UVC_VC_HEADER,

>> > -	.bcdUVC			= cpu_to_le16(0x0100),

>> > +	.bcdUVC			= cpu_to_le16(0x0110),

>> >  	.wTotalLength		= 0, /* dynamic */

>> >  	.dwClockFrequency	= cpu_to_le32(48000000),

>> >  	.bInCollection		= 0, /* dynamic */

>

>The change looks good to me. With the typo in the commit message fixed,

>

>Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>

--

Regards
Pawel Laszczak
diff mbox series

Patch

diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c
index 00fb58e50a15..cd28dec837dd 100644
--- a/drivers/usb/gadget/function/uvc_configfs.c
+++ b/drivers/usb/gadget/function/uvc_configfs.c
@@ -231,7 +231,7 @@  static struct config_item *uvcg_control_header_make(struct config_group *group,
 	h->desc.bLength			= UVC_DT_HEADER_SIZE(1);
 	h->desc.bDescriptorType		= USB_DT_CS_INTERFACE;
 	h->desc.bDescriptorSubType	= UVC_VC_HEADER;
-	h->desc.bcdUVC			= cpu_to_le16(0x0100);
+	h->desc.bcdUVC			= cpu_to_le16(0x0110);
 	h->desc.dwClockFrequency	= cpu_to_le32(48000000);
 
 	config_item_init_type_name(&h->item, name, &uvcg_control_header_type);
diff --git a/drivers/usb/gadget/legacy/webcam.c b/drivers/usb/gadget/legacy/webcam.c
index a9f8eb8e1c76..3a61de4bb2b1 100644
--- a/drivers/usb/gadget/legacy/webcam.c
+++ b/drivers/usb/gadget/legacy/webcam.c
@@ -90,7 +90,7 @@  static const struct UVC_HEADER_DESCRIPTOR(1) uvc_control_header = {
 	.bLength		= UVC_DT_HEADER_SIZE(1),
 	.bDescriptorType	= USB_DT_CS_INTERFACE,
 	.bDescriptorSubType	= UVC_VC_HEADER,
-	.bcdUVC			= cpu_to_le16(0x0100),
+	.bcdUVC			= cpu_to_le16(0x0110),
 	.wTotalLength		= 0, /* dynamic */
 	.dwClockFrequency	= cpu_to_le32(48000000),
 	.bInCollection		= 0, /* dynamic */