Audio Device Class driver changed to also require the index of the Audio Control...
authorDean Camera <dean@fourwalledcubicle.com>
Wed, 14 Mar 2012 22:12:40 +0000 (22:12 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Wed, 14 Mar 2012 22:12:40 +0000 (22:12 +0000)
Demos/Device/ClassDriver/AudioInput/AudioInput.c
Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
LUFA/DoxygenPages/ChangeLog.txt
LUFA/DoxygenPages/MigrationInformation.txt
LUFA/Drivers/USB/Class/Device/AudioClassDevice.c
LUFA/Drivers/USB/Class/Device/AudioClassDevice.h
Maintenance/makefile

index 9aa8667..382446a 100644 (file)
@@ -44,6 +44,7 @@ USB_ClassInfo_Audio_Device_t Microphone_Audio_Interface =
        {
                .Config =
                        {
        {
                .Config =
                        {
+                               .ControlInterfaceNumber   = 0,
                                .StreamingInterfaceNumber = 1,
 
                                .DataINEndpointNumber     = AUDIO_STREAM_EPNUM,
                                .StreamingInterfaceNumber = 1,
 
                                .DataINEndpointNumber     = AUDIO_STREAM_EPNUM,
index 6a87211..78d81f5 100644 (file)
@@ -44,6 +44,7 @@ USB_ClassInfo_Audio_Device_t Speaker_Audio_Interface =
        {
                .Config =
                        {
        {
                .Config =
                        {
+                               .ControlInterfaceNumber   = 0,
                                .StreamingInterfaceNumber = 1,
 
                                .DataOUTEndpointNumber    = AUDIO_STREAM_EPNUM,
                                .StreamingInterfaceNumber = 1,
 
                                .DataOUTEndpointNumber    = AUDIO_STREAM_EPNUM,
index c769c07..b24e94a 100644 (file)
@@ -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
   *  <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
   *
   *  - 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
   *
index 0210a37..e005af7 100644 (file)
  *  areas relevant to making older projects compatible with the API changes of each new release.
  *
  *  \section Sec_MigrationXXXXXX Migrating from 120219 to XXXXXX
  *  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.
  *  <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.
index 1e91a61..4f3cfd6 100644 (file)
@@ -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.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)
                  return;
        }
        else if ((USB_ControlRequest.bmRequestType & CONTROL_REQTYPE_RECIPIENT) == REQREC_ENDPOINT)
index dad177e..2391266 100644 (file)
@@ -79,6 +79,9 @@
                        {
                                struct
                                {
                        {
                                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.
                                                                                                                */
                                        uint8_t  StreamingInterfaceNumber; /**< Index of the Audio Streaming interface within the device this
                                                                                                                *   structure controls.
                                                                                                                */
index ae40fd7..137b802 100644 (file)
@@ -6,7 +6,7 @@
 #           www.lufa-lib.org\r
 #\r
 \r
 #           www.lufa-lib.org\r
 #\r
 \r
-# Maintenance scripts not required by general LUFA users, used for development.\r
+# Maintenance scripts not required by general LUFA users, used for project development purposes.\r
 \r
 LUFA_ROOT = ../\r
 \r
 \r
 LUFA_ROOT = ../\r
 \r