From 0fb84ad6b776469650507abdffc98b5498d7cac7 Mon Sep 17 00:00:00 2001 From: Tormod Volden Date: Fri, 1 Apr 2022 20:34:58 +0200 Subject: [PATCH 3/4] Hide all audio descriptors --- src/usb_desc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/usb_desc.c b/src/usb_desc.c index 46cb43d..a0c05af 100644 --- a/src/usb_desc.c +++ b/src/usb_desc.c @@ -64,7 +64,7 @@ const uint8_t Speaker_ConfigDescriptor[] = /* Configuration 1 */ 0x09, /* bLength */ USB_CONFIGURATION_DESCRIPTOR_TYPE, /* bDescriptorType */ - 0x6D, /* wTotalLength 110 bytes*/ + 0x2D, /* wTotalLength 45 bytes*/ 0x00, 0x02, /* bNumInterfaces */ 0x01, /* bConfigurationValue */ @@ -85,6 +85,7 @@ const uint8_t Speaker_ConfigDescriptor[] = 0x00, /* iInterface */ /* 09 byte*/ +#if 0 /* USB Speaker Class-specific AC Interface Descriptor */ SPEAKER_SIZ_INTERFACE_DESC_SIZE, /* bLength */ AUDIO_INTERFACE_DESCRIPTOR_TYPE, /* bDescriptorType */ @@ -135,6 +136,7 @@ const uint8_t Speaker_ConfigDescriptor[] = 0x02, /* bSourceID */ 0x00, /* iTerminal */ /* 09 byte*/ +#endif /* USB Speaker Standard AS Interface Descriptor - Audio Streaming Zero Bandwith */ /* Interface 1, Alternate Setting 0 */ @@ -162,6 +164,7 @@ const uint8_t Speaker_ConfigDescriptor[] = 0x00, /* iInterface */ /* 09 byte*/ +#if 0 /* USB Speaker Audio Streaming Interface Descriptor */ AUDIO_STREAMING_INTERFACE_DESC_SIZE, /* bLength */ AUDIO_INTERFACE_DESCRIPTOR_TYPE, /* bDescriptorType */ @@ -185,6 +188,7 @@ const uint8_t Speaker_ConfigDescriptor[] = 0x55, 0x00, /* 11 byte*/ +#endif /* Endpoint 1 - Standard Descriptor */ AUDIO_STANDARD_ENDPOINT_DESC_SIZE, /* bLength */ @@ -198,6 +202,7 @@ const uint8_t Speaker_ConfigDescriptor[] = 0x00, /* bSynchAddress */ /* 09 byte*/ +#if 0 /* Endpoint - Audio Streaming Descriptor*/ AUDIO_STREAMING_ENDPOINT_DESC_SIZE, /* bLength */ AUDIO_ENDPOINT_DESCRIPTOR_TYPE, /* bDescriptorType */ @@ -207,6 +212,7 @@ const uint8_t Speaker_ConfigDescriptor[] = 0x00, /* wLockDelay */ 0x00, /* 07 byte*/ +#endif }; /* USB String Descriptor (optional) */ -- 2.25.1