Removed Audio Int EP

This commit is contained in:
Ross Owen
2012-11-20 17:31:36 +00:00
parent b8af693143
commit 268018abd6
5 changed files with 30 additions and 34 deletions

View File

@@ -178,6 +178,12 @@ unsigned char devQualDesc_Null[] =
#define IAP_LENGTH (0) #define IAP_LENGTH (0)
#endif #endif
#if defined(SPDIF_RX) || defined(ADAT_RX)
#define AUD_INT_EP_LEN (7)
#else
#define AUD_INT_EP_LEN (0)
#endif
#ifdef AUDIO_PATH_XUS #ifdef AUDIO_PATH_XUS
#define LEN_XU_OUT (16 * OUTPUT_INTERFACES) #define LEN_XU_OUT (16 * OUTPUT_INTERFACES)
#define LEN_XU_IN (16 * INPUT_INTERFACES) #define LEN_XU_IN (16 * INPUT_INTERFACES)
@@ -288,7 +294,7 @@ unsigned char hidReportDescriptor[] = {
#define HID_LENGTH (25*HID_INTERFACES) #define HID_LENGTH (25*HID_INTERFACES)
/* Total length of config descriptor */ /* Total length of config descriptor */
#define CFG_TOTAL_LENGTH_A2 (7 + 26 + (INPUT_INTERFACES * 55) + (OUTPUT_INTERFACES * 62) + (MIDI_LENGTH) + (DFU_INTERFACES * 18) + TLEN_AC + (MIXER_LENGTH) + IAP_LENGTH + INPUT_ALT_LENGTH + OUTPUT_ALT_LENGTH + HID_LENGTH) #define CFG_TOTAL_LENGTH_A2 (7 + 19 + (AUD_INT_EP_LEN) + (INPUT_INTERFACES * 55) + (OUTPUT_INTERFACES * 62) + (MIDI_LENGTH) + (DFU_INTERFACES * 18) + TLEN_AC + (MIXER_LENGTH) + IAP_LENGTH + INPUT_ALT_LENGTH + OUTPUT_ALT_LENGTH + HID_LENGTH)
/* Configuration Descriptor for Audio 2.0 (HS) operation */ /* Configuration Descriptor for Audio 2.0 (HS) operation */
unsigned char cfgDesc_Audio2[] = unsigned char cfgDesc_Audio2[] =
@@ -323,7 +329,11 @@ unsigned char cfgDesc_Audio2[] =
INTERFACE, /* 1 bDescriptorType: INTERFACE */ INTERFACE, /* 1 bDescriptorType: INTERFACE */
0x00, /* 2 bInterfaceNumber */ 0x00, /* 2 bInterfaceNumber */
0x00, /* 3 bAlternateSetting: Must be 0 */ 0x00, /* 3 bAlternateSetting: Must be 0 */
#if defined(SPDIF_RX) || defined(ADAT_RX)
0x01, /* 4 bNumEndpoints (0 or 1 if optional interrupt endpoint is present */ 0x01, /* 4 bNumEndpoints (0 or 1 if optional interrupt endpoint is present */
#else
0x00,
#endif
AUDIO, /* 5 bInterfaceClass: AUDIO */ AUDIO, /* 5 bInterfaceClass: AUDIO */
AUDIOCONTROL, /* 6 bInterfaceSubClass: AUDIOCONTROL*/ AUDIOCONTROL, /* 6 bInterfaceSubClass: AUDIOCONTROL*/
IP_VERSION_02_00, /* 7 bInterfaceProtocol: IP_VERSION_02_00 */ IP_VERSION_02_00, /* 7 bInterfaceProtocol: IP_VERSION_02_00 */
@@ -758,7 +768,7 @@ unsigned char cfgDesc_Audio2[] =
0, /* Mixer unit string descriptor index */ 0, /* Mixer unit string descriptor index */
#endif #endif
#if 1 #if defined(SPDIF_RX) || defined (ADAT_RX)
/* Standard AS Interrupt Endpoint Descriptor (4.8.2.1): */ /* Standard AS Interrupt Endpoint Descriptor (4.8.2.1): */
0x07, /* 0 bLength: 7 */ 0x07, /* 0 bLength: 7 */
0x05, /* 1 bDescriptorType: ENDPOINT */ 0x05, /* 1 bDescriptorType: ENDPOINT */
@@ -1585,11 +1595,7 @@ unsigned char cfgDesc_Audio1[] =
CONFIGURATION, CONFIGURATION,
(CFG_TOTAL_LENGTH_A1 & 0xFF), /* wTotalLength */ (CFG_TOTAL_LENGTH_A1 & 0xFF), /* wTotalLength */
(CFG_TOTAL_LENGTH_A1 >> 8), /* wTotalLength */ (CFG_TOTAL_LENGTH_A1 >> 8), /* wTotalLength */
#ifdef MIDI NUM_INTERFACES_A1, /* numInterfaces - we dont support MIDI in audio 1.0 mode*/
NUM_INTERFACES_A1-2, /* numInterfaces - we dont support MIDI in audio 1.0 mode*/
#else
NUM_INTERFACES_A1,
#endif
0x01, /* ID of this configuration */ 0x01, /* ID of this configuration */
0x00, /* Unused */ 0x00, /* Unused */
#ifdef SELF_POWERED #ifdef SELF_POWERED

View File

@@ -214,7 +214,7 @@ int main()
/* Endpoint 0 */ /* Endpoint 0 */
on stdcore[0]:{ on stdcore[0]:{
thread_speed(); thread_speed();
Endpoint0( c_xud_out[0], c_xud_in[0], c_aud_ctl, null,null, c_usb_test); Endpoint0( c_xud_out[0], c_xud_in[0], c_aud_ctl, null, null, c_usb_test);
} }
on stdcore[0]: on stdcore[0]:
@@ -240,8 +240,10 @@ int main()
#ifdef IAP #ifdef IAP
c_xud_out[3], c_xud_in[5], c_xud_in[6], c_xud_out[3], c_xud_in[5], c_xud_in[6],
#endif #endif
#if defined(SPDIF_RX) || defined(ADAT_RX)
c_xud_in[EP_NUM_IN_AUD_INT], /* Int */ /* Audio Interrupt - only used for interrupts on external clock change */
c_xud_in[EP_NUM_IN_AUD_INT],
#endif
c_sof, c_aud_ctl, p_for_mclk_count c_sof, c_aud_ctl, p_for_mclk_count
#ifdef HID_CONTROLS #ifdef HID_CONTROLS
,c_xud_in[EP_NUM_IN_HID] ,c_xud_in[EP_NUM_IN_HID]

View File

@@ -838,7 +838,7 @@ void decouple(chanend c_mix_out,
read_via_xc_ptr(datalength, released_buffer); read_via_xc_ptr(datalength, released_buffer);
/* Ignore bad small packets */ /* Ignore bad small packets */
if ((datalength >= (g_numUsbChanOut * slotSize)) && (released_buffer == g_aud_from_host_wrptr)) if ((datalength >= (g_numUsbChanOut * slotSize)) && (released_buffer == aud_from_host_wrptr))
{ {
/* Move the write pointer of the fifo on - round up to nearest word */ /* Move the write pointer of the fifo on - round up to nearest word */

View File

@@ -29,7 +29,9 @@ void buffer(chanend c_aud_out,
chanend c_iap_to_host, chanend c_iap_to_host,
chanend c_iap_to_host_int, chanend c_iap_to_host_int,
#endif #endif
#if defined(SPDIF_RX) || defined(ADAT_RX)
chanend? c_int, chanend? c_int,
#endif
chanend c_sof, chanend c_sof,
chanend c_aud_ctl, chanend c_aud_ctl,
in port p_off_mclk in port p_off_mclk

View File

@@ -88,7 +88,10 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud
chanend c_iap_to_host, chanend c_iap_to_host,
chanend c_iap_to_host_int, chanend c_iap_to_host_int,
#endif #endif
chanend ?c_int, chanend c_sof, #if defined(SPDIF_RX) || defined(ADAT_RX)
chanend ?c_int,
#endif
chanend c_sof,
chanend c_aud_ctl, chanend c_aud_ctl,
in port p_off_mclk in port p_off_mclk
#ifdef HID_CONTROLS #ifdef HID_CONTROLS
@@ -287,25 +290,8 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud
case inuint_byref(c_int, tmp): case inuint_byref(c_int, tmp):
{ {
int sent_ok = 0; int sent_ok = 0;
/* Start XUD_SetData */ XUD_SetData_Inline(ep_int, c_int);
//XUD_SetData_Inline(ep_int, c_int);
#if 0
while (!sent_ok)
{
outct(c_int, 64);
asm("ldw %0, dp[g_intData]":"=r"(tmp));
outuint(c_int, tmp);
asm("ldw %0, dp[g_intData+4]":"=r"(tmp));
outct(c_int, 64);
outuint(c_int, tmp);
sent_ok = inuint(c_int);
/* End XUD_SetData */
}
#endif
asm("stw %0, dp[g_intFlag]" :: "r" (0) ); asm("stw %0, dp[g_intFlag]" :: "r" (0) );
//XUD_SetNotReady(ep_int);
break; break;
} }
#endif #endif