aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2012-03-14 22:12:40 +0000
committerDean Camera <dean@fourwalledcubicle.com>2012-03-14 22:12:40 +0000
commit77adb2ba529973b99383fd4571f67eede3afcda4 (patch)
tree792fa510f9643f2e82ea81bc890c83c630ce9d1b /LUFA/Drivers/USB
parentc0f763db0474e6441ed313c208eaf9b34a2ca6b1 (diff)
downloadlufa-77adb2ba529973b99383fd4571f67eede3afcda4.tar.gz
lufa-77adb2ba529973b99383fd4571f67eede3afcda4.tar.bz2
lufa-77adb2ba529973b99383fd4571f67eede3afcda4.zip
Audio Device Class driver changed to also require the index of the Audio Control interface within the device, for SET/GET/CUR/MIN/MAX/RES property adjustments.
Diffstat (limited to 'LUFA/Drivers/USB')
-rw-r--r--LUFA/Drivers/USB/Class/Device/AudioClassDevice.c6
-rw-r--r--LUFA/Drivers/USB/Class/Device/AudioClassDevice.h3
2 files changed, 8 insertions, 1 deletions
diff --git a/LUFA/Drivers/USB/Class/Device/AudioClassDevice.c b/LUFA/Drivers/USB/Class/Device/AudioClassDevice.c
index 1e91a6134..4f3cfd62d 100644
--- a/LUFA/Drivers/USB/Class/Device/AudioClassDevice.c
+++ b/LUFA/Drivers/USB/Class/Device/AudioClassDevice.c
@@ -44,7 +44,11 @@ void Audio_Device_ProcessControlRequest(USB_ClassInfo_Audio_Device_t* const Audi
if ((USB_ControlRequest.bmRequestType & CONTROL_REQTYPE_RECIPIENT) == REQREC_INTERFACE)
{
- if ((USB_ControlRequest.wIndex & 0xFF) != AudioInterfaceInfo->Config.StreamingInterfaceNumber)
+ uint8_t InterfaceIndex = (USB_ControlRequest.wIndex & 0xFF);
+
+ if ((InterfaceIndex != AudioInterfaceInfo->Config.ControlInterfaceNumber) &&
+ (InterfaceIndex != AudioInterfaceInfo->Config.StreamingInterfaceNumber))
+
return;
}
else if ((USB_ControlRequest.bmRequestType & CONTROL_REQTYPE_RECIPIENT) == REQREC_ENDPOINT)
diff --git a/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h b/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h
index dad177e04..239126607 100644
--- a/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h
+++ b/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h
@@ -79,6 +79,9 @@
{
struct
{
+ uint8_t ControlInterfaceNumber; /**< Index of the Audio Control interface within the device this
+ * structure controls.
+ */
uint8_t StreamingInterfaceNumber; /**< Index of the Audio Streaming interface within the device this
* structure controls.
*/