diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2012-03-14 22:12:40 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2012-03-14 22:12:40 +0000 |
commit | 77adb2ba529973b99383fd4571f67eede3afcda4 (patch) | |
tree | 792fa510f9643f2e82ea81bc890c83c630ce9d1b | |
parent | c0f763db0474e6441ed313c208eaf9b34a2ca6b1 (diff) | |
download | lufa-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.
-rw-r--r-- | Demos/Device/ClassDriver/AudioInput/AudioInput.c | 1 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/AudioOutput/AudioOutput.c | 1 | ||||
-rw-r--r-- | LUFA/DoxygenPages/ChangeLog.txt | 1 | ||||
-rw-r--r-- | LUFA/DoxygenPages/MigrationInformation.txt | 4 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/AudioClassDevice.c | 6 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Device/AudioClassDevice.h | 3 | ||||
-rw-r--r-- | Maintenance/makefile | 2 |
7 files changed, 16 insertions, 2 deletions
diff --git a/Demos/Device/ClassDriver/AudioInput/AudioInput.c b/Demos/Device/ClassDriver/AudioInput/AudioInput.c index 9aa866755..382446a80 100644 --- a/Demos/Device/ClassDriver/AudioInput/AudioInput.c +++ b/Demos/Device/ClassDriver/AudioInput/AudioInput.c @@ -44,6 +44,7 @@ USB_ClassInfo_Audio_Device_t Microphone_Audio_Interface = { .Config = { + .ControlInterfaceNumber = 0, .StreamingInterfaceNumber = 1, .DataINEndpointNumber = AUDIO_STREAM_EPNUM, diff --git a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c index 6a87211e5..78d81f57a 100644 --- a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c +++ b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c @@ -44,6 +44,7 @@ USB_ClassInfo_Audio_Device_t Speaker_Audio_Interface = { .Config = { + .ControlInterfaceNumber = 0, .StreamingInterfaceNumber = 1, .DataOUTEndpointNumber = AUDIO_STREAM_EPNUM, diff --git a/LUFA/DoxygenPages/ChangeLog.txt b/LUFA/DoxygenPages/ChangeLog.txt index c769c07e9..b24e94a3f 100644 --- a/LUFA/DoxygenPages/ChangeLog.txt +++ b/LUFA/DoxygenPages/ChangeLog.txt @@ -17,6 +17,7 @@ * <b>Changed:</b> * - Core: * - Android Accessory Host property strings changed from a struct of pointer to an array to prevent unaligned access on greater than 8-bit architectures + * - 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 * - Library Applications: * - Raised the guard bits in the AVRISP-MKII clone project when in PDI and TPI to 32, to prevent communication errors on low quality connections to a target * diff --git a/LUFA/DoxygenPages/MigrationInformation.txt b/LUFA/DoxygenPages/MigrationInformation.txt index 0210a37d8..e005af7eb 100644 --- a/LUFA/DoxygenPages/MigrationInformation.txt +++ b/LUFA/DoxygenPages/MigrationInformation.txt @@ -11,6 +11,10 @@ * areas relevant to making older projects compatible with the API changes of each new release. * * \section Sec_MigrationXXXXXX Migrating from 120219 to XXXXXX + * <b>Device Mode</b> + * - The device mode Audio Class driver now requires an additional configuration parameter, the Audio Control interface index. Existing applications should + * be adjusted to specify the additional configuration parameter. + * * <b>Host Mode</b> * - The Android Accessory Host class driver property strings are now a array of \c char* rather than a struct of named pointers. Existing applications * should use C99 Designated Initializers with the property string indexes located in \ref AOA_Strings_t instead. 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. */ diff --git a/Maintenance/makefile b/Maintenance/makefile index ae40fd757..137b802a7 100644 --- a/Maintenance/makefile +++ b/Maintenance/makefile @@ -6,7 +6,7 @@ # www.lufa-lib.org
#
-# Maintenance scripts not required by general LUFA users, used for development.
+# Maintenance scripts not required by general LUFA users, used for project development purposes.
LUFA_ROOT = ../
|