Added new incomplete AudioInputHost Host LowLevel demo.
Added missing Audio class control request definitions. Added support for the Audio class GET STATUS request so that it is correctly ACKed when sent by the host.
This commit is contained in:
		
							parent
							
								
									cc9b190919
								
							
						
					
					
						commit
						ea922c98d1
					
				
					 41 changed files with 9816 additions and 166 deletions
				
			
		| 
						 | 
				
			
			@ -204,7 +204,7 @@
 | 
			
		|||
		 *
 | 
			
		||||
		 *  \param[in] freq  Required audio sampling frequency in HZ
 | 
			
		||||
		 */
 | 
			
		||||
		#define AUDIO_SAMPLE_FREQ(freq)           {.Byte1 = (freq & 0x0000FF), .Byte2 = ((freq >> 8) & 0xFF), .Byte3 = ((freq >> 16) & 0xFF)}
 | 
			
		||||
		#define AUDIO_SAMPLE_FREQ(freq)           {.Byte1 = ((uint32_t)freq & 0x0000FF), .Byte2 = (((uint32_t)freq >> 8) & 0xFF), .Byte3 = (((uint32_t)freq >> 16) & 0xFF)}
 | 
			
		||||
 | 
			
		||||
		/** Mask for the attributes parameter of an Audio class-specific Endpoint descriptor, indicating that the endpoint
 | 
			
		||||
		 *  accepts only filled endpoint packets of audio samples.
 | 
			
		||||
| 
						 | 
				
			
			@ -215,7 +215,7 @@
 | 
			
		|||
		 *  will accept partially filled endpoint packets of audio samples.
 | 
			
		||||
		 */
 | 
			
		||||
		#define AUDIO_EP_ACCEPTS_SMALL_PACKETS    (0 << 7)
 | 
			
		||||
 | 
			
		||||
		
 | 
			
		||||
	/* Enums: */
 | 
			
		||||
		/** Enum for possible Class, Subclass and Protocol values of device and interface descriptors relating to the Audio
 | 
			
		||||
		 *  device class.
 | 
			
		||||
| 
						 | 
				
			
			@ -269,6 +269,22 @@
 | 
			
		|||
			AUDIO_DSUBTYPE_CSEndpoint_General         = 0x01, /**< Audio class specific endpoint general descriptor. */
 | 
			
		||||
		};
 | 
			
		||||
 | 
			
		||||
		/** Enum for the Audio class specific control requests that can be issued by the USB bus host. */
 | 
			
		||||
		enum Audio_ClassRequests_t
 | 
			
		||||
		{
 | 
			
		||||
			AUDIO_REQ_SetCurrent    = 0x01, /**< Audio class-specific request to set the current value of a parameter within the device. */
 | 
			
		||||
			AUDIO_REQ_SetMinimum    = 0x02, /**< Audio class-specific request to set the minimum value of a parameter within the device. */
 | 
			
		||||
			AUDIO_REQ_SetMaximum    = 0x03, /**< Audio class-specific request to set the maximum value of a parameter within the device. */
 | 
			
		||||
			AUDIO_REQ_SetResolution = 0x04, /**< Audio class-specific request to set the resolution value of a parameter within the device. */
 | 
			
		||||
			AUDIO_REQ_SetMemory     = 0x05, /**< Audio class-specific request to set the memory value of a parameter within the device. */
 | 
			
		||||
			AUDIO_REQ_GetCurrent    = 0x81, /**< Audio class-specific request to get the current value of a parameter within the device. */
 | 
			
		||||
			AUDIO_REQ_GetMinimum    = 0x82, /**< Audio class-specific request to get the minimum value of a parameter within the device. */
 | 
			
		||||
			AUDIO_REQ_GetMaximum    = 0x83, /**< Audio class-specific request to get the maximum value of a parameter within the device. */
 | 
			
		||||
			AUDIO_REQ_GetResolution = 0x84, /**< Audio class-specific request to get the resolution value of a parameter within the device. */
 | 
			
		||||
			AUDIO_REQ_GetMemory     = 0x85, /**< Audio class-specific request to get the memory value of a parameter within the device. */
 | 
			
		||||
			AUDIO_REQ_GetStatus     = 0xFF, /**< Audio class-specific request to get the device status. */
 | 
			
		||||
		};
 | 
			
		||||
 | 
			
		||||
	/* Type Defines: */
 | 
			
		||||
		/** \brief Audio class-specific Input Terminal Descriptor (LUFA naming conventions).
 | 
			
		||||
		 *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -57,6 +57,13 @@ void Audio_Device_ProcessControlRequest(USB_ClassInfo_Audio_Device_t* const Audi
 | 
			
		|||
			}
 | 
			
		||||
 | 
			
		||||
			break;
 | 
			
		||||
		case AUDIO_REQ_GetStatus:
 | 
			
		||||
			if ((USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE)) ||
 | 
			
		||||
			    (USB_ControlRequest.bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_ENDPOINT)))
 | 
			
		||||
			{
 | 
			
		||||
				Endpoint_ClearSETUP();
 | 
			
		||||
				Endpoint_ClearStatusStage();
 | 
			
		||||
			}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,14 +12,16 @@
 | 
			
		|||
  *   - Added USE_LUFA_CONFIG_HEADER compile time option to include a LUFAConfig.h header in the user director for LUFA configuration
 | 
			
		||||
  *     tokens as an alternative to tokens defined in the project makefile
 | 
			
		||||
  *   - Added new USB_Host_SetInterfaceAltSetting() convenience function for the selection of an interface's alternative setting
 | 
			
		||||
  *   - Added Audio class control request definitions
 | 
			
		||||
  *  - Library Applications:
 | 
			
		||||
  *   - Added RNDIS device mode to the Webserver project
 | 
			
		||||
  *   - Added new MediaControl project
 | 
			
		||||
  *   - Added new incomplete AndroidAccessoryHost Host LowLevel demo
 | 
			
		||||
  *   - Added RNDIS device mode to the Webserver project
 | 
			
		||||
  *   - Added new incomplete AudioInputHost Host LowLevel demo
 | 
			
		||||
  *
 | 
			
		||||
  *  <b>Changed:</b>
 | 
			
		||||
  *  - Core:
 | 
			
		||||
  *   - <i>None</i>
 | 
			
		||||
  *   - Added support for the Audio class GET STATUS request so that it is correctly ACKed when sent by the host
 | 
			
		||||
  *  - Library Applications:
 | 
			
		||||
  *   - <i>None</i>
 | 
			
		||||
  *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -29,11 +29,10 @@
 | 
			
		|||
  *  - Demos/Projects
 | 
			
		||||
  *      -# Device/Host USB bridge
 | 
			
		||||
  *      -# Alternative (USB-IF endorsed) USB-CDC Ethernet Class
 | 
			
		||||
  *      -# Finish Test and Measurement Class demo
 | 
			
		||||
  *      -# Finish BluetoothHost demo
 | 
			
		||||
  *      -# Finish SideShow demo
 | 
			
		||||
  *      -# Finish StandaloneProgrammer project
 | 
			
		||||
  *      -# Arduino Uno compatible USB-MIDI, USB-HID
 | 
			
		||||
  *      -# Finish incomplete demos and projects
 | 
			
		||||
  *      -# Add class driver support for Audio Host class
 | 
			
		||||
  *      -# Add class driver support for Test and Measurement class
 | 
			
		||||
  *      -# Fix up Audio class support - add support for mixers, etc., add support for GET/SET commands
 | 
			
		||||
  *  - Ports
 | 
			
		||||
  *      -# Atmel ARM7 series microcontrollers
 | 
			
		||||
  *      -# Other (commercial) C compilers
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue