* [PATCH 1/4] usb: audio-v2: add ability to define feature unit descriptor
@ 2021-07-10 12:53 Pavel Hofman
2021-07-10 15:18 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Pavel Hofman @ 2021-07-10 12:53 UTC (permalink / raw)
To: linux-usb; +Cc: Ruslan Bilovol, Jerome Brunet, Felipe Balbi
Similar to UAC1 spec, UAC2 feature unit descriptor
has variable size.
Current audio-v2 feature unit descriptor structure
is used for parsing descriptors, but can't be used
to define your own descriptor.
Add a new macro similar to what audio v1 already has.
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
---
include/linux/usb/audio-v2.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/include/linux/usb/audio-v2.h b/include/linux/usb/audio-v2.h
index ead8c9a47c6a..8fc2abd7aecb 100644
--- a/include/linux/usb/audio-v2.h
+++ b/include/linux/usb/audio-v2.h
@@ -156,6 +156,20 @@ struct uac2_feature_unit_descriptor {
__u8 bmaControls[]; /* variable length */
} __attribute__((packed));
+#define UAC2_DT_FEATURE_UNIT_SIZE(ch) (6 + ((ch) + 1) * 4)
+
+/* As above, but more useful for defining your own descriptors: */
+#define DECLARE_UAC2_FEATURE_UNIT_DESCRIPTOR(ch) \
+struct uac2_feature_unit_descriptor_##ch { \
+ __u8 bLength; \
+ __u8 bDescriptorType; \
+ __u8 bDescriptorSubtype; \
+ __u8 bUnitID; \
+ __u8 bSourceID; \
+ __le32 bmaControls[ch + 1]; \
+ __u8 iFeature; \
+} __packed
+
/* 4.7.2.10 Effect Unit Descriptor */
struct uac2_effect_unit_descriptor {
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/4] usb: audio-v2: add ability to define feature unit descriptor
2021-07-10 12:53 [PATCH 1/4] usb: audio-v2: add ability to define feature unit descriptor Pavel Hofman
@ 2021-07-10 15:18 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2021-07-10 15:18 UTC (permalink / raw)
To: Pavel Hofman; +Cc: linux-usb, Ruslan Bilovol, Jerome Brunet, Felipe Balbi
On Sat, Jul 10, 2021 at 02:53:20PM +0200, Pavel Hofman wrote:
>
> Similar to UAC1 spec, UAC2 feature unit descriptor
> has variable size.
>
> Current audio-v2 feature unit descriptor structure
> is used for parsing descriptors, but can't be used
> to define your own descriptor.
>
> Add a new macro similar to what audio v1 already has.
>
> Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
> ---
> include/linux/usb/audio-v2.h | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
Who wrote this Ruslan or you? If Ruslan, you need to put a "From:" line
as the first line of the changelog text, and you also need to sign off
on this, as the patch is coming through you.
Same for the other 4 patches.
Also, they were not "linked" together at all, can you use 'git
send-email' to send them so that they are correctly associated with each
other so our tools will work easier on them?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-10 15:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-10 12:53 [PATCH 1/4] usb: audio-v2: add ability to define feature unit descriptor Pavel Hofman
2021-07-10 15:18 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).