diff --git a/module_usb_audio/devicedefines.h b/module_usb_audio/devicedefines.h index 59234be4..63d8aefe 100644 --- a/module_usb_audio/devicedefines.h +++ b/module_usb_audio/devicedefines.h @@ -926,6 +926,27 @@ #undef IAP_INT_EP #endif +/* IAP EA Native Transport */ +#if defined(IAP_EA_NATIVE_TRANS) && (IAP_EA_NATIVE_TRANS == 0) +#undef IAP_EA_NATIVE_TRANS +#endif + +#if defined(IAP_EA_NATIVE_TRANS) || defined(__DOXYGEN__) +/** + * @brief Number of supported EA Native Interface Alternative settings. + * + * Only 1 supported + */ +#ifndef IAP_EA_NATIVE_TRANS_ALT_COUNT + #define IAP_EA_NATIVE_TRANS_ALT_COUNT 1 +#endif + +#if (IAP_EA_NATIVE_TRANS_ALT_COUNT > 1) + /* Only 1 supported */ + #error +#endif +#endif + /* Endpoint addresses enums */ enum USBEndpointNumber_In { @@ -946,6 +967,9 @@ enum USBEndpointNumber_In ENDPOINT_NUMBER_IN_IAP_INT, #endif ENDPOINT_NUMBER_IN_IAP, +#ifdef IAP_EA_NATIVE_TRANS + ENDPOINT_NUMBER_IN_IAP_EA_NATIVE_TRANS, +#endif #endif ENDPOINT_COUNT_IN /* End marker */ }; @@ -959,6 +983,9 @@ enum USBEndpointNumber_Out #endif #ifdef IAP ENDPOINT_NUMBER_OUT_IAP, +#ifdef IAP_EA_NATIVE_TRANS + ENDPOINT_NUMBER_OUT_IAP_EA_NATIVE_TRANS, +#endif #endif ENDPOINT_COUNT_OUT /* End marker */ }; diff --git a/module_usb_audio/endpoint0/descriptors.h b/module_usb_audio/endpoint0/descriptors.h index dfd828a6..381bb3d7 100644 --- a/module_usb_audio/endpoint0/descriptors.h +++ b/module_usb_audio/endpoint0/descriptors.h @@ -12,6 +12,19 @@ #include "usbaudiocommon.h" #include "usb_std_descriptors.h" +#ifdef IAP_EA_NATIVE_TRANS +/* + * FIXME currently this will not build if IAP_EA_NATIVE_TRANS_PROTOCOL_NAME is not defined in iap_conf.h, + * would be nice if a default string was used instead, and a warning issued. + * + * Could get a default define by including the following line, but iap2.h cannot currently be included from C + */ +//#include "iap2.h" /* Defines iAP EA Native Transport protocol name */ +#ifdef __iap_conf_h_exists__ +#include "iap_conf.h" +#endif +#endif + #define APPEND_VENDOR_STR(x) VENDOR_STR" "#x #define APPEND_PRODUCT_STR_A2(x) PRODUCT_STR_A2 " "#x @@ -197,6 +210,7 @@ typedef struct STR_TABLE_ENTRY(mixOutStr_8); #endif STR_TABLE_ENTRY(iAPInterfaceStr); + STR_TABLE_ENTRY(iAP_EANativeTransport_InterfaceStr); } StringDescTable_t; StringDescTable_t g_strTable = @@ -903,9 +917,10 @@ StringDescTable_t g_strTable = #if defined(MIXER) && (MAX_MIX_COUNT > 8) #error #endif - .iAPInterfaceStr = "iAP Interface", - +#ifdef IAP_EA_NATIVE_TRANS + .iAP_EANativeTransport_InterfaceStr = IAP2_EA_NATIVE_TRANS_PROTOCOL_NAME, +#endif }; /* Interface numbers enum */ @@ -927,6 +942,9 @@ enum USBInterfaceNumber #endif #if defined(IAP) && (IAP != 0) INTERFACE_NUMBER_IAP, +#if defined(IAP_EA_NATIVE_TRANS) && (IAP_EA_NATIVE_TRANS != 0) + INTERFACE_NUMBER_IAP_EA_NATIVE_TRANS, +#endif #endif #if defined(HID_CONTROLS) && (HID_CONTROLS != 0) INTERFACE_NUMBER_HID, @@ -943,19 +961,21 @@ enum USBInterfaceNumber #endif /* Endpoint address defines */ -#define ENDPOINT_ADDRESS_IN_CONTROL (ENDPOINT_NUMBER_IN_CONTROL | 0x80) -#define ENDPOINT_ADDRESS_IN_FEEDBACK (ENDPOINT_NUMBER_IN_FEEDBACK | 0x80) -#define ENDPOINT_ADDRESS_IN_AUDIO (ENDPOINT_NUMBER_IN_AUDIO | 0x80) -#define ENDPOINT_ADDRESS_IN_INTERRUPT (ENDPOINT_NUMBER_IN_INTERRUPT | 0x80) -#define ENDPOINT_ADDRESS_IN_MIDI (ENDPOINT_NUMBER_IN_MIDI | 0x80) -#define ENDPOINT_ADDRESS_IN_HID (ENDPOINT_NUMBER_IN_HID | 0x80) -#define ENDPOINT_ADDRESS_IN_IAP_INT (ENDPOINT_NUMBER_IN_IAP_INT | 0x80) -#define ENDPOINT_ADDRESS_IN_IAP (ENDPOINT_NUMBER_IN_IAP | 0x80) +#define ENDPOINT_ADDRESS_IN_CONTROL (ENDPOINT_NUMBER_IN_CONTROL | 0x80) +#define ENDPOINT_ADDRESS_IN_FEEDBACK (ENDPOINT_NUMBER_IN_FEEDBACK | 0x80) +#define ENDPOINT_ADDRESS_IN_AUDIO (ENDPOINT_NUMBER_IN_AUDIO | 0x80) +#define ENDPOINT_ADDRESS_IN_INTERRUPT (ENDPOINT_NUMBER_IN_INTERRUPT | 0x80) +#define ENDPOINT_ADDRESS_IN_MIDI (ENDPOINT_NUMBER_IN_MIDI | 0x80) +#define ENDPOINT_ADDRESS_IN_HID (ENDPOINT_NUMBER_IN_HID | 0x80) +#define ENDPOINT_ADDRESS_IN_IAP_INT (ENDPOINT_NUMBER_IN_IAP_INT | 0x80) +#define ENDPOINT_ADDRESS_IN_IAP (ENDPOINT_NUMBER_IN_IAP | 0x80) +#define ENDPOINT_ADDRESS_IN_IAP_EA_NATIVE_TRANS (ENDPOINT_NUMBER_IN_IAP_EA_NATIVE_TRANS | 0x80) -#define ENDPOINT_ADDRESS_OUT_CONTROL (ENDPOINT_NUMBER_OUT_CONTROL) -#define ENDPOINT_ADDRESS_OUT_AUDIO (ENDPOINT_NUMBER_OUT_AUDIO) -#define ENDPOINT_ADDRESS_OUT_MIDI (ENDPOINT_NUMBER_OUT_MIDI) -#define ENDPOINT_ADDRESS_OUT_IAP (ENDPOINT_NUMBER_OUT_IAP) +#define ENDPOINT_ADDRESS_OUT_CONTROL (ENDPOINT_NUMBER_OUT_CONTROL) +#define ENDPOINT_ADDRESS_OUT_AUDIO (ENDPOINT_NUMBER_OUT_AUDIO) +#define ENDPOINT_ADDRESS_OUT_MIDI (ENDPOINT_NUMBER_OUT_MIDI) +#define ENDPOINT_ADDRESS_OUT_IAP (ENDPOINT_NUMBER_OUT_IAP) +#define ENDPOINT_ADDRESS_OUT_IAP_EA_NATIVE_TRANS (ENDPOINT_NUMBER_OUT_IAP_EA_NATIVE_TRANS) /***** Device Descriptors *****/ @@ -1265,6 +1285,12 @@ typedef struct #ifdef IAP_INT_EP USB_Descriptor_Endpoint_t iAP_Interrupt_Endpoint; #endif +#ifdef IAP_EA_NATIVE_TRANS + USB_Descriptor_Interface_t iAP_EANativeTransport_Interface_Alt0; + USB_Descriptor_Interface_t iAP_EANativeTransport_Interface_Alt1; + USB_Descriptor_Endpoint_t iAP_EANativeTransport_Out_Endpoint; + USB_Descriptor_Endpoint_t iAP_EANativeTransport_In_Endpoint; +#endif #endif #ifdef HID_CONTROLS @@ -2329,6 +2355,58 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2= 0x08, /* 6 bInterval : (2^(bInterval-1))/8 ms. Must be between 4 and 32ms (field size 1 bytes) */ }, #endif +#ifdef IAP_EA_NATIVE_TRANS + /* iAP EA Native Transport Interface descriptor */ + /* Zero bandwidth alternative 0 */ + .iAP_EANativeTransport_Interface_Alt0 = + { + .bLength = sizeof(USB_Descriptor_Interface_t), + .bDescriptorType = USB_DESCTYPE_INTERFACE, + .bInterfaceNumber = INTERFACE_NUMBER_IAP_EA_NATIVE_TRANS, + .bAlternateSetting = 0x00, + .bNumEndpoints = 0x00, + .bInterfaceClass = USB_CLASS_VENDOR_SPECIFIC, + .bInterfaceSubClass = 0xF0, /* MFI Accessory (Table 21-2) */ + .bInterfaceProtocol = 0x01, + .iInterface = offsetof(StringDescTable_t, iAP_EANativeTransport_InterfaceStr)/sizeof(char *), + }, + + /* Alternative 1 */ + .iAP_EANativeTransport_Interface_Alt1 = + { + .bLength = sizeof(USB_Descriptor_Interface_t), + .bDescriptorType = USB_DESCTYPE_INTERFACE, + .bInterfaceNumber = INTERFACE_NUMBER_IAP_EA_NATIVE_TRANS, + .bAlternateSetting = 0x01, + .bNumEndpoints = 0x02, + .bInterfaceClass = USB_CLASS_VENDOR_SPECIFIC, + .bInterfaceSubClass = 0xF0, /* MFI Accessory (Table 21-1) */ + .bInterfaceProtocol = 0x01, + .iInterface = offsetof(StringDescTable_t, iAP_EANativeTransport_InterfaceStr)/sizeof(char *), + }, + + /* iAP EA Native Transport Bulk OUT Endpoint Descriptor */ + .iAP_EANativeTransport_Out_Endpoint = + { + 0x07, /* 0 bLength : Size of this descriptor, in bytes. (field size 1 bytes) */ + 0x05, /* 1 bDescriptorType : ENDPOINT descriptor. (field size 1 bytes) */ + ENDPOINT_ADDRESS_OUT_IAP_EA_NATIVE_TRANS, /* 2 bEndpointAddress : OUT Endpoint 3. High bit isIn (field size 1 bytes) */ + 0x02, /* 3 bmAttributes : Bulk, not shared. (field size 1 bytes) */ + 0x0200, /* 4 wMaxPacketSize : Has to be 0x200 for compliance*/ + 0x00, /* 6 bInterval : Ignored for Bulk. Set to zero. (field size 1 bytes) */ + }, + + /* iAP EA Native Transport Bulk IN Endpoint Descriptor */ + .iAP_EANativeTransport_In_Endpoint = + { + 0x07, /* 0 bLength : Size of this descriptor, in bytes. (field size 1 bytes) */ + 0x05, /* 1 bDescriptorType : ENDPOINT descriptor. (field size 1 bytes) */ + ENDPOINT_ADDRESS_IN_IAP_EA_NATIVE_TRANS, /* 2 bEndpointAddress : OUT Endpoint 3. High bit isIn (field size 1 bytes) */ + 0x02, /* 3 bmAttributes : Bulk, not shared. (field size 1 bytes) */ + 0x0200, /* 4 wMaxPacketSize : Has to be 0x200 for compliance*/ + 0x00, /* 6 bInterval : Ignored for Bulk. Set to zero. (field size 1 bytes) */ + }, +#endif #endif /* IAP */ #ifdef HID_CONTROLS diff --git a/module_usb_audio/endpoint0/endpoint0.c b/module_usb_audio/endpoint0/endpoint0.c index 33bc6298..4221f23e 100755 --- a/module_usb_audio/endpoint0/endpoint0.c +++ b/module_usb_audio/endpoint0/endpoint0.c @@ -155,7 +155,7 @@ const unsigned g_dataFormat_In[INPUT_FORMAT_COUNT] = {STREAM_FORMAT_INPUT_1_DATA /* Endpoint 0 function. Handles all requests to the device */ void Endpoint0(chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl, - chanend c_mix_ctl, chanend c_clk_ctl) + chanend c_mix_ctl, chanend c_clk_ctl, chanend c_EANativeTransport_ctrl) { USB_SetupPacket_t sp; XUD_ep ep0_out = XUD_InitEp(c_ep0_out); @@ -264,102 +264,124 @@ void Endpoint0(chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl, /* Over-riding USB_StandardRequests implementation */ if(sp.bRequest == USB_SET_INTERFACE) { - /* Check for audio stream from host start/stop */ - if(sp.wIndex == 1) /* Output interface */ + switch (sp.wIndex) { - /* Check the alt is in range */ - if(sp.wValue <= OUTPUT_FORMAT_COUNT) - { - /* Alt 0 is stream stop */ - /* Only send change if we need to */ - if((sp.wValue > 0) && (g_curStreamAlt_Out != sp.wValue)) + /* Check for audio stream from host start/stop */ + case INTERFACE_NUMBER_AUDIO_OUTPUT: + /* Check the alt is in range */ + if(sp.wValue <= OUTPUT_FORMAT_COUNT) { - g_curStreamAlt_Out = sp.wValue; - - /* Send format of data onto buffering */ - outuint(c_audioControl, SET_STREAM_FORMAT_OUT); - outuint(c_audioControl, g_dataFormat_Out[sp.wValue-1]); /* Data format (PCM/DSD) */ - - if(g_curUsbSpeed == XUD_SPEED_HS) + /* Alt 0 is stream stop */ + /* Only send change if we need to */ + if((sp.wValue > 0) && (g_curStreamAlt_Out != sp.wValue)) { - outuint(c_audioControl, NUM_USB_CHAN_OUT); /* Channel count */ - outuint(c_audioControl, g_subSlot_Out_HS[sp.wValue-1]); /* Subslot */ - outuint(c_audioControl, g_sampRes_Out_HS[sp.wValue-1]); /* Resolution */ - } - else - { - outuint(c_audioControl, NUM_USB_CHAN_OUT_FS); /* Channel count */ - outuint(c_audioControl, g_subSlot_Out_FS[sp.wValue-1]); /* Subslot */ - outuint(c_audioControl, g_sampRes_Out_FS[sp.wValue-1]); /* Resolution */ - } + g_curStreamAlt_Out = sp.wValue; - /* Handshake */ - chkct(c_audioControl, XS1_CT_END); + /* Send format of data onto buffering */ + outuint(c_audioControl, SET_STREAM_FORMAT_OUT); + outuint(c_audioControl, g_dataFormat_Out[sp.wValue-1]); /* Data format (PCM/DSD) */ + + if(g_curUsbSpeed == XUD_SPEED_HS) + { + outuint(c_audioControl, NUM_USB_CHAN_OUT); /* Channel count */ + outuint(c_audioControl, g_subSlot_Out_HS[sp.wValue-1]); /* Subslot */ + outuint(c_audioControl, g_sampRes_Out_HS[sp.wValue-1]); /* Resolution */ + } + else + { + outuint(c_audioControl, NUM_USB_CHAN_OUT_FS); /* Channel count */ + outuint(c_audioControl, g_subSlot_Out_FS[sp.wValue-1]); /* Subslot */ + outuint(c_audioControl, g_sampRes_Out_FS[sp.wValue-1]); /* Resolution */ + } + + /* Handshake */ + chkct(c_audioControl, XS1_CT_END); + } } - } - } - else if(sp.wIndex == 2) /* Input interface */ - { - /* Check the alt is in range */ - if(sp.wValue <= INPUT_FORMAT_COUNT) - { - /* Alt 0 is stream stop */ - /* Only send change if we need to */ - if((sp.wValue > 0) && (g_curStreamAlt_In != sp.wValue)) + break; + + case INTERFACE_NUMBER_AUDIO_INPUT: + /* Check the alt is in range */ + if(sp.wValue <= INPUT_FORMAT_COUNT) { - g_curStreamAlt_In = sp.wValue; - - /* Send format of data onto buffering */ - outuint(c_audioControl, SET_STREAM_FORMAT_IN); - outuint(c_audioControl, g_dataFormat_In[sp.wValue-1]); /* Data format (PCM/DSD) */ - - if(g_curUsbSpeed == XUD_SPEED_HS) + /* Alt 0 is stream stop */ + /* Only send change if we need to */ + if((sp.wValue > 0) && (g_curStreamAlt_In != sp.wValue)) { - outuint(c_audioControl, NUM_USB_CHAN_IN); /* Channel count */ - outuint(c_audioControl, g_subSlot_In_HS[sp.wValue-1]); /* Subslot */ - outuint(c_audioControl, g_sampRes_In_HS[sp.wValue-1]); /* Resolution */ - } - else - { - outuint(c_audioControl, NUM_USB_CHAN_IN_FS); /* Channel count */ - outuint(c_audioControl, g_subSlot_In_FS[sp.wValue-1]); /* Subslot */ - outuint(c_audioControl, g_sampRes_In_FS[sp.wValue-1]); /* Resolution */ - } + g_curStreamAlt_In = sp.wValue; - /* Handshake */ - chkct(c_audioControl, XS1_CT_END); + /* Send format of data onto buffering */ + outuint(c_audioControl, SET_STREAM_FORMAT_IN); + outuint(c_audioControl, g_dataFormat_In[sp.wValue-1]); /* Data format (PCM/DSD) */ + + if(g_curUsbSpeed == XUD_SPEED_HS) + { + outuint(c_audioControl, NUM_USB_CHAN_IN); /* Channel count */ + outuint(c_audioControl, g_subSlot_In_HS[sp.wValue-1]); /* Subslot */ + outuint(c_audioControl, g_sampRes_In_HS[sp.wValue-1]); /* Resolution */ + } + else + { + outuint(c_audioControl, NUM_USB_CHAN_IN_FS); /* Channel count */ + outuint(c_audioControl, g_subSlot_In_FS[sp.wValue-1]); /* Subslot */ + outuint(c_audioControl, g_sampRes_In_FS[sp.wValue-1]); /* Resolution */ + } + + /* Wait for handshake */ + chkct(c_audioControl, XS1_CT_END); + } } - } - } -#if (NUM_USB_CHAN_OUT > 0) && (NUM_USB_CHAN_IN > 0) - /* Check for stream start stop on output and input audio interfaces */ - if(sp.wValue && !g_interfaceAlt[1] && !g_interfaceAlt[2]) - { - /* If start and input AND output not currently running */ - UserAudioStreamStart(); - } - else if(((sp.wIndex == 1) && (!sp.wValue)) && g_interfaceAlt[1] && (!g_interfaceAlt[2])) - { - /* if output stop and output running and input not running */ - UserAudioStreamStop(); - } - else if(((sp.wIndex == 2) && (!sp.wValue)) && g_interfaceAlt[2] && (!g_interfaceAlt[1])) - { - /* if input stop and input running and output not running */ - UserAudioStreamStop(); - } -#elif (NUM_USB_CHAN_OUT > 0) || (NUM_USB_CHAN_IN > 0) - if(sp.wValue && (!g_interfaceAlt[1])) - { - /* if start and not currently running */ - UserAudioStreamStart(); - } - else if (!sp.wValue && g_interfaceAlt[1]) - { - /* if stop and currently running */ - UserAudioStreamStop(); - } + break; +#ifdef IAP_EA_NATIVE_TRANS + case INTERFACE_NUMBER_IAP_EA_NATIVE_TRANS: + /* Check the alt is in range */ + if (sp.wValue <= IAP_EA_NATIVE_TRANS_ALT_COUNT) + { + /* Send selected Alt interface number onto EA Native EP manager */ + outuint(c_EANativeTransport_ctrl, (unsigned)sp.wValue); + + /* Wait for handshake */ + chkct(c_EANativeTransport_ctrl, XS1_CT_END); + } + break; #endif + default: + /* Unhandled interface */ + break; + } + + if ((sp.wIndex == INTERFACE_NUMBER_AUDIO_OUTPUT) || (sp.wIndex == INTERFACE_NUMBER_AUDIO_INPUT)) + { +#if (NUM_USB_CHAN_OUT > 0) && (NUM_USB_CHAN_IN > 0) + /* Check for stream start stop on output and input audio interfaces */ + if(sp.wValue && !g_interfaceAlt[1] && !g_interfaceAlt[2]) + { + /* If start and input AND output not currently running */ + UserAudioStreamStart(); + } + else if(((sp.wIndex == 1) && (!sp.wValue)) && g_interfaceAlt[1] && (!g_interfaceAlt[2])) + { + /* if output stop and output running and input not running */ + UserAudioStreamStop(); + } + else if(((sp.wIndex == 2) && (!sp.wValue)) && g_interfaceAlt[2] && (!g_interfaceAlt[1])) + { + /* if input stop and input running and output not running */ + UserAudioStreamStop(); + } +#elif (NUM_USB_CHAN_OUT > 0) || (NUM_USB_CHAN_IN > 0) + if(sp.wValue && (!g_interfaceAlt[1])) + { + /* if start and not currently running */ + UserAudioStreamStart(); + } + else if (!sp.wValue && g_interfaceAlt[1]) + { + /* if stop and currently running */ + UserAudioStreamStop(); + } +#endif + } } /* if(sp.bRequest == SET_INTERFACE) */ break; /* BMREQ_H2D_STANDARD_INT */ diff --git a/module_usb_audio/endpoint0/endpoint0.h b/module_usb_audio/endpoint0/endpoint0.h index be2171fa..778d0937 100644 --- a/module_usb_audio/endpoint0/endpoint0.h +++ b/module_usb_audio/endpoint0/endpoint0.h @@ -14,8 +14,11 @@ * \param c_clk_ctl Optional chanend to be connected to the clockgen thread if * present. * \param c_usb_test Optional chanend to be connected to XUD if test modes required. + * + * \param c_EANativeTransport_ctrl Optional chanend to be connected to EA Native + * endpoint manager if present */ void Endpoint0( chanend c_ep0_out, chanend c_ep0_in, chanend c_audioCtrl, - chanend ?c_mix_ctl,chanend ?c_clk_ctl); + chanend ?c_mix_ctl,chanend ?c_clk_ctl, chanend ?c_EANativeTransport_ctrl); #endif diff --git a/module_usb_audio/main.xc b/module_usb_audio/main.xc index e4501c16..19468478 100755 --- a/module_usb_audio/main.xc +++ b/module_usb_audio/main.xc @@ -197,7 +197,10 @@ XUD_EpType epTypeTableOut[ENDPOINT_COUNT_OUT] = { XUD_EPTYPE_CTL | XUD_STATUS_EN XUD_EPTYPE_BUL, /* MIDI */ #endif #ifdef IAP - XUD_EPTYPE_BUL /* iAP */ + XUD_EPTYPE_BUL, /* iAP */ +#ifdef IAP_EA_NATIVE_TRANS + XUD_EPTYPE_BUL, /* EA Native Transport */ +#endif #endif }; @@ -218,6 +221,9 @@ XUD_EpType epTypeTableIn[ENDPOINT_COUNT_IN] = { XUD_EPTYPE_CTL | XUD_STATUS_ENAB #ifdef IAP_INT_EP XUD_EPTYPE_BUL | XUD_STATUS_ENABLE, #endif +#ifdef IAP_EA_NATIVE_TRANS + XUD_EPTYPE_BUL | XUD_STATUS_ENABLE, +#endif #endif }; @@ -248,6 +254,9 @@ void usb_audio_core(chanend c_mix_out #endif #ifdef IAP , chanend c_iap +#ifdef IAP_EA_NATIVE_TRANS +, chanend c_ea_data +#endif #endif #ifdef MIXER , chanend c_mix_ctl @@ -267,6 +276,12 @@ void usb_audio_core(chanend c_mix_out #ifndef MIXER #define c_mix_ctl null +#endif + +#ifdef IAP_EA_NATIVE_TRANS + chan c_EANativeTransport_ctrl; +#else +#define c_EANativeTransport_ctrl null #endif par @@ -334,7 +349,7 @@ void usb_audio_core(chanend c_mix_out /* Endpoint 0 Core */ { thread_speed(); - Endpoint0( c_xud_out[0], c_xud_in[0], c_aud_ctl, c_mix_ctl, c_clk_ctl); + Endpoint0( c_xud_out[0], c_xud_in[0], c_aud_ctl, c_mix_ctl, null, c_EANativeTransport_ctrl); } /* Decoupling core */ @@ -346,6 +361,18 @@ void usb_audio_core(chanend c_mix_out #endif ); } + +#if defined(IAP_EA_NATIVE_TRANS) + /* EA Native Transport Endpoint manager */ + /* TODO This core can be merged with buffer() */ + { + thread_speed(); + iAP2_EANativeTransport_EPManager( + c_xud_out[ENDPOINT_NUMBER_OUT_IAP_EA_NATIVE_TRANS], + c_xud_in[ENDPOINT_NUMBER_IN_IAP_EA_NATIVE_TRANS], + c_EANativeTransport_ctrl, c_ea_data); + } +#endif //: } } @@ -418,6 +445,9 @@ int main() #endif #ifdef IAP chan c_iap; +#ifdef IAP_EA_NATIVE_TRANS + chan c_ea_data; +#endif #endif #ifdef SU1_ADC_ENABLE chan c_adc; @@ -455,6 +485,9 @@ int main() #endif #ifdef IAP , c_iap +#ifdef IAP_EA_NATIVE_TRANS + , c_ea_data +#endif #endif #ifdef MIXER , c_mix_ctl