From 255c336f97ceb733222a0ec7a2324e1ccf211e2e Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Thu, 13 Feb 2014 18:26:35 +0000 Subject: [PATCH] Fixed up IAP_INTERFACE_STRING_INDEX when MIXER not enabled but MAX_MIX_COUNT !=0 --- module_usb_audio/devicedefines.h | 8 ++++++-- module_usb_audio/endpoint0/descriptors.h | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/module_usb_audio/devicedefines.h b/module_usb_audio/devicedefines.h index f4248cf5..66e0dd63 100644 --- a/module_usb_audio/devicedefines.h +++ b/module_usb_audio/devicedefines.h @@ -488,8 +488,12 @@ #define MIX_INPUTS 18 #endif -#ifndef MAX_MIX_COUNT -#define MAX_MIX_COUNT 8 +#ifdef MIXER + #ifndef MAX_MIX_COUNT + #define MAX_MIX_COUNT 8 + #endif +#else + #define MAX_MIX_COUNT 0 #endif diff --git a/module_usb_audio/endpoint0/descriptors.h b/module_usb_audio/endpoint0/descriptors.h index a12937b9..76518a44 100644 --- a/module_usb_audio/endpoint0/descriptors.h +++ b/module_usb_audio/endpoint0/descriptors.h @@ -268,7 +268,11 @@ enum { #endif #endif #ifdef IAP + #ifdef MIXER IAP_INTERFACE_STRING_INDEX = INPUT_INTERFACE_LAST_STRING_INDEX + MAX_MIX_COUNT + 1, + #else + IAP_INTERFACE_STRING_INDEX = INPUT_INTERFACE_LAST_STRING_INDEX, + #endif #endif };