diff mbox series

[1/2] usb: audio-v2: Add uac2_effect_unit_descriptor definition

Message ID 20200213112059.18745-2-tiwai@suse.de (mailing list archive)
State New, archived
Headers show
Series ALSA: usb-audio: UAC2 effect unit parsing | expand

Commit Message

Takashi Iwai Feb. 13, 2020, 11:20 a.m. UTC
The UAC2 Effect Unit Descriptor has a slightly different definition
from other similar ones like Processing Unit or Extension Unit.
Define it here so that it can be used in USB-audio driver in a later
patch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/linux/usb/audio-v2.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Takashi Iwai Feb. 17, 2020, 2:18 p.m. UTC | #1
On Thu, 13 Feb 2020 12:20:58 +0100,
Takashi Iwai wrote:
> 
> The UAC2 Effect Unit Descriptor has a slightly different definition
> from other similar ones like Processing Unit or Extension Unit.
> Define it here so that it can be used in USB-audio driver in a later
> patch.
> 
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
>  include/linux/usb/audio-v2.h | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/include/linux/usb/audio-v2.h b/include/linux/usb/audio-v2.h
> index ba4b3e3327ff..cb9900b34b67 100644
> --- a/include/linux/usb/audio-v2.h
> +++ b/include/linux/usb/audio-v2.h
> @@ -156,6 +156,18 @@ struct uac2_feature_unit_descriptor {
>  	__u8 bmaControls[0]; /* variable length */
>  } __attribute__((packed));
>  
> +/* 4.7.2.10 Effect Unit Descriptor */
> +
> +struct uac2_effect_unit_descriptor {
> +	__u8 bLength;
> +	__u8 bDescriptorType;
> +	__u8 bDescriptorSubtype;
> +	__u8 bUnitID;
> +	__le16 wEffectType;
> +	__u8 bSourceID;
> +	__u8 bmaControls[]; /* variable length */
> +} __attribute__((packed));
> +
>  /* 4.9.2 Class-Specific AS Interface Descriptor */
>  
>  struct uac2_as_header_descriptor {

Greg, I suppose you are OK with this addition?


thanks,

Takashi
Greg Kroah-Hartman Feb. 17, 2020, 2:22 p.m. UTC | #2
On Mon, Feb 17, 2020 at 03:18:34PM +0100, Takashi Iwai wrote:
> On Thu, 13 Feb 2020 12:20:58 +0100,
> Takashi Iwai wrote:
> > 
> > The UAC2 Effect Unit Descriptor has a slightly different definition
> > from other similar ones like Processing Unit or Extension Unit.
> > Define it here so that it can be used in USB-audio driver in a later
> > patch.
> > 
> > Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > ---
> >  include/linux/usb/audio-v2.h | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> > 
> > diff --git a/include/linux/usb/audio-v2.h b/include/linux/usb/audio-v2.h
> > index ba4b3e3327ff..cb9900b34b67 100644
> > --- a/include/linux/usb/audio-v2.h
> > +++ b/include/linux/usb/audio-v2.h
> > @@ -156,6 +156,18 @@ struct uac2_feature_unit_descriptor {
> >  	__u8 bmaControls[0]; /* variable length */
> >  } __attribute__((packed));
> >  
> > +/* 4.7.2.10 Effect Unit Descriptor */
> > +
> > +struct uac2_effect_unit_descriptor {
> > +	__u8 bLength;
> > +	__u8 bDescriptorType;
> > +	__u8 bDescriptorSubtype;
> > +	__u8 bUnitID;
> > +	__le16 wEffectType;
> > +	__u8 bSourceID;
> > +	__u8 bmaControls[]; /* variable length */
> > +} __attribute__((packed));
> > +
> >  /* 4.9.2 Class-Specific AS Interface Descriptor */
> >  
> >  struct uac2_as_header_descriptor {
> 
> Greg, I suppose you are OK with this addition?
> 
> 

Yes, that's fine with me:

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Takashi Iwai Feb. 17, 2020, 2:25 p.m. UTC | #3
On Mon, 17 Feb 2020 15:22:38 +0100,
Greg Kroah-Hartman wrote:
> 
> On Mon, Feb 17, 2020 at 03:18:34PM +0100, Takashi Iwai wrote:
> > On Thu, 13 Feb 2020 12:20:58 +0100,
> > Takashi Iwai wrote:
> > > 
> > > The UAC2 Effect Unit Descriptor has a slightly different definition
> > > from other similar ones like Processing Unit or Extension Unit.
> > > Define it here so that it can be used in USB-audio driver in a later
> > > patch.
> > > 
> > > Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > > ---
> > >  include/linux/usb/audio-v2.h | 12 ++++++++++++
> > >  1 file changed, 12 insertions(+)
> > > 
> > > diff --git a/include/linux/usb/audio-v2.h b/include/linux/usb/audio-v2.h
> > > index ba4b3e3327ff..cb9900b34b67 100644
> > > --- a/include/linux/usb/audio-v2.h
> > > +++ b/include/linux/usb/audio-v2.h
> > > @@ -156,6 +156,18 @@ struct uac2_feature_unit_descriptor {
> > >  	__u8 bmaControls[0]; /* variable length */
> > >  } __attribute__((packed));
> > >  
> > > +/* 4.7.2.10 Effect Unit Descriptor */
> > > +
> > > +struct uac2_effect_unit_descriptor {
> > > +	__u8 bLength;
> > > +	__u8 bDescriptorType;
> > > +	__u8 bDescriptorSubtype;
> > > +	__u8 bUnitID;
> > > +	__le16 wEffectType;
> > > +	__u8 bSourceID;
> > > +	__u8 bmaControls[]; /* variable length */
> > > +} __attribute__((packed));
> > > +
> > >  /* 4.9.2 Class-Specific AS Interface Descriptor */
> > >  
> > >  struct uac2_as_header_descriptor {
> > 
> > Greg, I suppose you are OK with this addition?
> > 
> > 
> 
> Yes, that's fine with me:
> 
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Thanks, I'll queue the patches to sound git tree.


Takashi
diff mbox series

Patch

diff --git a/include/linux/usb/audio-v2.h b/include/linux/usb/audio-v2.h
index ba4b3e3327ff..cb9900b34b67 100644
--- a/include/linux/usb/audio-v2.h
+++ b/include/linux/usb/audio-v2.h
@@ -156,6 +156,18 @@  struct uac2_feature_unit_descriptor {
 	__u8 bmaControls[0]; /* variable length */
 } __attribute__((packed));
 
+/* 4.7.2.10 Effect Unit Descriptor */
+
+struct uac2_effect_unit_descriptor {
+	__u8 bLength;
+	__u8 bDescriptorType;
+	__u8 bDescriptorSubtype;
+	__u8 bUnitID;
+	__le16 wEffectType;
+	__u8 bSourceID;
+	__u8 bmaControls[]; /* variable length */
+} __attribute__((packed));
+
 /* 4.9.2 Class-Specific AS Interface Descriptor */
 
 struct uac2_as_header_descriptor {