From 890e1df1bec891d9203724541e81f8fbe5183388 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Mon, 19 Feb 2024 01:57:06 +0000
Subject: [PATCH] default settings GPIO PA4 PA6 PA3 PB5
---
kernel/include/linux/usb/audio-v2.h | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/kernel/include/linux/usb/audio-v2.h b/kernel/include/linux/usb/audio-v2.h
index 8340c22..8fc2abd 100644
--- a/kernel/include/linux/usb/audio-v2.h
+++ b/kernel/include/linux/usb/audio-v2.h
@@ -153,7 +153,7 @@
__u8 bSourceID;
/* bmaControls is actually u32,
* but u8 is needed for the hybrid parser */
- __u8 bmaControls[0]; /* variable length */
+ __u8 bmaControls[]; /* variable length */
} __attribute__((packed));
#define UAC2_DT_FEATURE_UNIT_SIZE(ch) (6 + ((ch) + 1) * 4)
@@ -168,7 +168,19 @@
__u8 bSourceID; \
__le32 bmaControls[ch + 1]; \
__u8 iFeature; \
-} __attribute__((packed))
+} __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 */
@@ -332,9 +344,6 @@
#define UAC2_FU_UNDERFLOW 0x0e
#define UAC2_FU_OVERFLOW 0x0f
#define UAC2_FU_LATENCY 0x10
-
-#define UAC2_CONTROL_BIT_RO(CS) (0x01 << (((CS) - 1) << 1))
-#define UAC2_CONTROL_BIT_RW(CS) (0x03 << (((CS) - 1) << 1))
/* A.17.8.1 Parametric Equalizer Section Effect Unit Control Selectors */
#define UAC2_PE_UNDEFINED 0x00
--
Gitblit v1.6.2