hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/include/linux/usb/audio-v2.h
....@@ -153,7 +153,7 @@
153153 __u8 bSourceID;
154154 /* bmaControls is actually u32,
155155 * but u8 is needed for the hybrid parser */
156
- __u8 bmaControls[0]; /* variable length */
156
+ __u8 bmaControls[]; /* variable length */
157157 } __attribute__((packed));
158158
159159 #define UAC2_DT_FEATURE_UNIT_SIZE(ch) (6 + ((ch) + 1) * 4)
....@@ -168,7 +168,19 @@
168168 __u8 bSourceID; \
169169 __le32 bmaControls[ch + 1]; \
170170 __u8 iFeature; \
171
-} __attribute__((packed))
171
+} __packed
172
+
173
+/* 4.7.2.10 Effect Unit Descriptor */
174
+
175
+struct uac2_effect_unit_descriptor {
176
+ __u8 bLength;
177
+ __u8 bDescriptorType;
178
+ __u8 bDescriptorSubtype;
179
+ __u8 bUnitID;
180
+ __le16 wEffectType;
181
+ __u8 bSourceID;
182
+ __u8 bmaControls[]; /* variable length */
183
+} __attribute__((packed));
172184
173185 /* 4.9.2 Class-Specific AS Interface Descriptor */
174186
....@@ -332,9 +344,6 @@
332344 #define UAC2_FU_UNDERFLOW 0x0e
333345 #define UAC2_FU_OVERFLOW 0x0f
334346 #define UAC2_FU_LATENCY 0x10
335
-
336
-#define UAC2_CONTROL_BIT_RO(CS) (0x01 << (((CS) - 1) << 1))
337
-#define UAC2_CONTROL_BIT_RW(CS) (0x03 << (((CS) - 1) << 1))
338347
339348 /* A.17.8.1 Parametric Equalizer Section Effect Unit Control Selectors */
340349 #define UAC2_PE_UNDEFINED 0x00