From 37ae35570ab6073b7cc6e9f2263a1cd65b0df8bd Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Thu, 1 Mar 2012 13:27:25 +0000 Subject: [PATCH] Fixed up channel string issue since memory otmisations means channel indices not static --- .../endpoint0/descriptors_2.h | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/module_usb_aud_shared/endpoint0/descriptors_2.h b/module_usb_aud_shared/endpoint0/descriptors_2.h index 32d03f00..5dc15a9a 100644 --- a/module_usb_aud_shared/endpoint0/descriptors_2.h +++ b/module_usb_aud_shared/endpoint0/descriptors_2.h @@ -1236,6 +1236,33 @@ unsigned char cfgDesc_Audio2[] = #define APPEND_VENDOR_STR(x) VENDOR_STR#x /* String table */ +#ifdef SPDIF_RX +#define SPDIF_RX_NUM_STRS 1 +#else +#define SPDIF_TX_NUM_STRS 0 +#endif + +#ifdef ADAT_RX +#define ADAT_RX_NUM_STRS 1 +#else +#define ADAT_RX_NUM_STRS 0 +#endif + +#ifdef MIDI +#define MIDI_NUM_STRS 2 +#else +#define MIDI_NUM_STRS 0 +#endif + +#ifdef DFU +#define DFU_NUM_STRS 1 +#else +#define DFU_NUM_STRS 0 +#endif + + +#define STR_INDEX_OUT_CHAN (10 + SPDIF_RX_NUM_STRS + ADAT_RX_NUM_STRS + MIDI_NUM_STRS + DFU_NUM_STRS) +#define STR_INDEX_IN_CHAN (STR_INDEX_OUT_CHAN + NUM_USB_CHAN_OUT) static unsigned char strDescs_Audio2[][40] = {