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.
This commit is contained in:
		
							parent
							
								
									c0f763db04
								
							
						
					
					
						commit
						77adb2ba52
					
				
					 7 changed files with 16 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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.
 | 
			
		||||
														*/
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue