xpd: Cleaned up whitespace

This commit is contained in:
Ross Owen
2014-08-29 14:32:15 +01:00
parent 0c5861ffa5
commit 3a67e1ce52
5 changed files with 62 additions and 62 deletions

View File

@@ -326,8 +326,8 @@ void clockGen (streaming chanend c_spdif_rx, chanend ?c_adat_rx, out port p, cha
for(int i = 0; i< NUM_USB_CHAN_IN; i++) for(int i = 0; i< NUM_USB_CHAN_IN; i++)
{ {
int tmp; int tmp;
/* Read level data */ /* Read level data */
//g_inputLevelData[i] = samples_to_host_inputs[i]; //g_inputLevelData[i] = samples_to_host_inputs[i];
asm volatile("ldw %0, %1[%2]":"=r"(tmp):"r"((const int *)samples_to_host_inputs),"r"(i)); asm volatile("ldw %0, %1[%2]":"=r"(tmp):"r"((const int *)samples_to_host_inputs),"r"(i));
g_inputLevelData[i] = tmp; g_inputLevelData[i] = tmp;
@@ -338,7 +338,7 @@ void clockGen (streaming chanend c_spdif_rx, chanend ?c_adat_rx, out port p, cha
/* Guard against host polling slower than timer and missing peaks */ /* Guard against host polling slower than timer and missing peaks */
asm volatile("ldw %0, %1[%2]":"=r"(tmp):"r"((const int *)samples_to_host_inputs_buff),"r"(i)); asm volatile("ldw %0, %1[%2]":"=r"(tmp):"r"((const int *)samples_to_host_inputs_buff),"r"(i));
if (g_inputLevelData[i] > tmp) if (g_inputLevelData[i] > tmp)
//if(g_inputLevelData[i] > samples_to_host_inputs_buff[i]) //if(g_inputLevelData[i] > samples_to_host_inputs_buff[i])
{ {

View File

@@ -734,7 +734,7 @@ int AudioClassRequests_2(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp, c
{ {
unsigned volume = 0; unsigned volume = 0;
/* Expect OUT here with mute */ /* Expect OUT here with mute */
if((result = XUD_GetBuffer(ep0_out, buffer, datalength)) != XUD_RES_OKAY) if((result = XUD_GetBuffer(ep0_out, buffer, datalength)) != XUD_RES_OKAY)
{ {
return result; return result;
@@ -952,7 +952,7 @@ int AudioClassRequests_2(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp, c
case 1: /* Mixer Output levels */ case 1: /* Mixer Output levels */
length = MAX_MIX_COUNT * 2; /* 2 bytes per chan */ length = MAX_MIX_COUNT * 2; /* 2 bytes per chan */
for(int i = 0; i < MAX_MIX_COUNT; i++) for(int i = 0; i < MAX_MIX_COUNT; i++)
{ {
if (!isnull(c_mix_ctl)) if (!isnull(c_mix_ctl))

View File

@@ -892,28 +892,28 @@ StringDescTable_t g_strTable =
#error NUM_USB_CHAN_IN > 18 #error NUM_USB_CHAN_IN > 18
#endif #endif
#if defined(MIXER) && (MAX_MIX_COUNT > 0) #if defined(MIXER) && (MAX_MIX_COUNT > 0)
.mixOutStr_1 = "Mix 1", .mixOutStr_1 = "Mix 1",
#endif #endif
#if defined(MIXER) && (MAX_MIX_COUNT > 0) #if defined(MIXER) && (MAX_MIX_COUNT > 0)
.mixOutStr_2 = "Mix 2", .mixOutStr_2 = "Mix 2",
#endif #endif
#if defined(MIXER) && (MAX_MIX_COUNT > 0) #if defined(MIXER) && (MAX_MIX_COUNT > 0)
.mixOutStr_3 = "Mix 3", .mixOutStr_3 = "Mix 3",
#endif #endif
#if defined(MIXER) && (MAX_MIX_COUNT > 0) #if defined(MIXER) && (MAX_MIX_COUNT > 0)
.mixOutStr_4 = "Mix 4", .mixOutStr_4 = "Mix 4",
#endif #endif
#if defined(MIXER) && (MAX_MIX_COUNT > 0) #if defined(MIXER) && (MAX_MIX_COUNT > 0)
.mixOutStr_5 = "Mix 5", .mixOutStr_5 = "Mix 5",
#endif #endif
#if defined(MIXER) && (MAX_MIX_COUNT > 0) #if defined(MIXER) && (MAX_MIX_COUNT > 0)
.mixOutStr_6 = "Mix 6", .mixOutStr_6 = "Mix 6",
#endif #endif
#if defined(MIXER) && (MAX_MIX_COUNT > 0) #if defined(MIXER) && (MAX_MIX_COUNT > 0)
.mixOutStr_7 = "Mix 7", .mixOutStr_7 = "Mix 7",
#endif #endif
#if defined(MIXER) && (MAX_MIX_COUNT > 0) #if defined(MIXER) && (MAX_MIX_COUNT > 0)
.mixOutStr_8 = "Mix 8", .mixOutStr_8 = "Mix 8",
#endif #endif
#if defined(MIXER) && (MAX_MIX_COUNT > 8) #if defined(MIXER) && (MAX_MIX_COUNT > 8)
@@ -1476,7 +1476,7 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
}, },
#if defined (MIXER) && (MAX_MIX_COUNT > 0) #if defined (MIXER) && (MAX_MIX_COUNT > 0)
.Audio_Out_ExtensionUnit = .Audio_Out_ExtensionUnit =
{ {
.bLength = sizeof(USB_Descriptor_Audio_ExtensionUnit_t), .bLength = sizeof(USB_Descriptor_Audio_ExtensionUnit_t),
.bDescriptorType = UAC_CS_DESCTYPE_INTERFACE, .bDescriptorType = UAC_CS_DESCTYPE_INTERFACE,
@@ -1485,7 +1485,7 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
.wExtensionCode = 0x00, .wExtensionCode = 0x00,
.bNrInPins = 1, .bNrInPins = 1,
.baSourceID[0] = ID_IT_USB, .baSourceID[0] = ID_IT_USB,
.bNrChannels = NUM_USB_CHAN_OUT, .bNrChannels = NUM_USB_CHAN_OUT,
.bmChannelConfig = 0x00000000, .bmChannelConfig = 0x00000000,
.bmControls = 0x03, .bmControls = 0x03,
.iExtension = 0 .iExtension = 0
@@ -1610,7 +1610,7 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
}, },
#if defined (MIXER) && (MAX_MIX_COUNT > 0) #if defined (MIXER) && (MAX_MIX_COUNT > 0)
.Audio_In_ExtensionUnit = .Audio_In_ExtensionUnit =
{ {
.bLength = sizeof(USB_Descriptor_Audio_ExtensionUnit_t), .bLength = sizeof(USB_Descriptor_Audio_ExtensionUnit_t),
.bDescriptorType = UAC_CS_DESCTYPE_INTERFACE, .bDescriptorType = UAC_CS_DESCTYPE_INTERFACE,
@@ -1619,7 +1619,7 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
.wExtensionCode = 0x00, .wExtensionCode = 0x00,
.bNrInPins = 1, .bNrInPins = 1,
.baSourceID[0] = ID_IT_AUD, .baSourceID[0] = ID_IT_AUD,
.bNrChannels = NUM_USB_CHAN_IN, .bNrChannels = NUM_USB_CHAN_IN,
.bmChannelConfig = 0x00000000, .bmChannelConfig = 0x00000000,
.bmControls = 0x03, .bmControls = 0x03,
.iExtension = 0 .iExtension = 0
@@ -1725,7 +1725,7 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
#if defined(MIXER) && (MAX_MIX_COUNT > 0) #if defined(MIXER) && (MAX_MIX_COUNT > 0)
/* Extension Unit Descriptor (4.7.2.12) */ /* Extension Unit Descriptor (4.7.2.12) */
.Audio_Mix_ExtensionUnit = .Audio_Mix_ExtensionUnit =
{ {
.bLength = sizeof(USB_Descriptor_Audio_ExtensionUnit2_t), .bLength = sizeof(USB_Descriptor_Audio_ExtensionUnit2_t),
.bDescriptorType = UAC_CS_DESCTYPE_INTERFACE, .bDescriptorType = UAC_CS_DESCTYPE_INTERFACE,
@@ -1735,18 +1735,18 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
.bNrInPins = 2, .bNrInPins = 2,
.baSourceID[0] = ID_IT_USB, .baSourceID[0] = ID_IT_USB,
.baSourceID[1] = ID_IT_AUD, .baSourceID[1] = ID_IT_AUD,
.bNrChannels = MIX_INPUTS, .bNrChannels = MIX_INPUTS,
.bmChannelConfig = 0x00000000, .bmChannelConfig = 0x00000000,
.bmControls = 0x03, .bmControls = 0x03,
.iExtension = 0 .iExtension = 0
}, },
/* Mixer Unit Descriptors */ /* Mixer Unit Descriptors */
/* N = 144 (18 * 8) */ /* N = 144 (18 * 8) */
/* Mixer Unit Bitmap - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* Mixer Unit Bitmap - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff */
{ {
MIXER_LENGTH, /* 0 bLength : 13 + num inputs + bit map (inputs * outputs) */ MIXER_LENGTH, /* 0 bLength : 13 + num inputs + bit map (inputs * outputs) */
UAC_CS_DESCTYPE_INTERFACE, /* bDescriptorType */ UAC_CS_DESCTYPE_INTERFACE, /* bDescriptorType */
0x04, /* bDescriptorSubtype: MIXER_UNIT */ 0x04, /* bDescriptorSubtype: MIXER_UNIT */
ID_MIXER_1, /* Mixer unit id */ ID_MIXER_1, /* Mixer unit id */
@@ -1756,67 +1756,67 @@ USB_Config_Descriptor_Audio2_t cfgDesc_Audio2=
0x00, 0x00, 0x00, 0x00, /* Spacial location ???? */ 0x00, 0x00, 0x00, 0x00, /* Spacial location ???? */
offsetof(StringDescTable_t, mixOutStr_1)/sizeof(char *), /* iChannelNames */ offsetof(StringDescTable_t, mixOutStr_1)/sizeof(char *), /* iChannelNames */
#if MIX_BMCONTROLS_LEN > 0 /* Mixer programmable control bitmap */ #if MIX_BMCONTROLS_LEN > 0 /* Mixer programmable control bitmap */
0xff, 0xff,
#endif #endif
#if MIX_BMCONTROLS_LEN > 1 #if MIX_BMCONTROLS_LEN > 1
0xff, 0xff,
#endif #endif
#if MIX_BMCONTROLS_LEN > 2 #if MIX_BMCONTROLS_LEN > 2
0xff, 0xff,
#endif #endif
#if MIX_BMCONTROLS_LEN > 3 #if MIX_BMCONTROLS_LEN > 3
0xff, 0xff,
#endif #endif
#if MIX_BMCONTROLS_LEN > 4 #if MIX_BMCONTROLS_LEN > 4
0xff, 0xff,
#endif #endif
#if MIX_BMCONTROLS_LEN > 5 #if MIX_BMCONTROLS_LEN > 5
0xff, 0xff,
#endif #endif
#if MIX_BMCONTROLS_LEN > 6 #if MIX_BMCONTROLS_LEN > 6
0xff, 0xff,
#endif #endif
#if MIX_BMCONTROLS_LEN > 7 #if MIX_BMCONTROLS_LEN > 7
0xff, 0xff,
#endif #endif
#if MIX_BMCONTROLS_LEN > 8 #if MIX_BMCONTROLS_LEN > 8
0xff, 0xff,
#endif #endif
#if MIX_BMCONTROLS_LEN > 9 #if MIX_BMCONTROLS_LEN > 9
0xff, 0xff,
#endif #endif
#if MIX_BMCONTROLS_LEN > 10 #if MIX_BMCONTROLS_LEN > 10
0xff, 0xff,
#endif #endif
#if MIX_BMCONTROLS_LEN > 11 #if MIX_BMCONTROLS_LEN > 11
0xff, 0xff,
#endif #endif
#if MIX_BMCONTROLS_LEN > 12 #if MIX_BMCONTROLS_LEN > 12
0xff, 0xff,
#endif #endif
#if MIX_BMCONTROLS_LEN > 13 #if MIX_BMCONTROLS_LEN > 13
0xff, 0xff,
#endif #endif
#if MIX_BMCONTROLS_LEN > 14 #if MIX_BMCONTROLS_LEN > 14
0xff, 0xff,
#endif #endif
#if MIX_BMCONTROLS_LEN > 15 #if MIX_BMCONTROLS_LEN > 15
0xff, 0xff,
#endif #endif
#if MIX_BMCONTROLS_LEN > 16 #if MIX_BMCONTROLS_LEN > 16
0xff, 0xff,
#endif #endif
#if MIX_BMCONTROLS_LEN > 17 #if MIX_BMCONTROLS_LEN > 17
0xff, 0xff,
#endif #endif
#if MIX_BMCONTROLS_LEN > 18 #if MIX_BMCONTROLS_LEN > 18
#error unxpected BMCONTROLS_LEN #error unxpected BMCONTROLS_LEN
#endif #endif
0x00, /* bmControls */ 0x00, /* bmControls */
0 /* Mixer unit string descriptor index */ 0 /* Mixer unit string descriptor index */
}, },
#endif #endif
#if defined(SPDIF_RX) || defined(ADAT_RX) #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): */
.Audio_Int_Endpoint = .Audio_Int_Endpoint =

View File

@@ -340,7 +340,7 @@ void Endpoint0(chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl,
#ifdef IAP_EA_NATIVE_TRANS #ifdef IAP_EA_NATIVE_TRANS
case INTERFACE_NUMBER_IAP_EA_NATIVE_TRANS: case INTERFACE_NUMBER_IAP_EA_NATIVE_TRANS:
/* Check the alt is in range */ /* Check the alt is in range */
if (sp.wValue <= IAP_EA_NATIVE_TRANS_ALT_COUNT) if (sp.wValue <= IAP_EA_NATIVE_TRANS_ALT_COUNT)
{ {
/* Send selected Alt interface number onto EA Native EP manager */ /* Send selected Alt interface number onto EA Native EP manager */
outuint(c_EANativeTransport_ctrl, (unsigned)sp.wValue); outuint(c_EANativeTransport_ctrl, (unsigned)sp.wValue);

View File

@@ -578,7 +578,7 @@ static void mixer2(chanend c_mixer1, chanend c_audio)
int mixed; int mixed;
unsigned underflow = 0; unsigned underflow = 0;
while (1) while (1)
{ {
outuint(c_mixer1, 0); outuint(c_mixer1, 0);
#pragma xta endpoint "mixer2_req" #pragma xta endpoint "mixer2_req"
@@ -625,7 +625,7 @@ static void mixer2(chanend c_mixer1, chanend c_audio)
chkct(c_audio, XS1_CT_END); chkct(c_audio, XS1_CT_END);
outct(c_mixer1, XS1_CT_END); outct(c_mixer1, XS1_CT_END);
} }
else else
{ {
underflow = inuint(c_mixer1); underflow = inuint(c_mixer1);
giveSamplesToDevice(c_audio, samples, samples_to_device_map, multOut, underflow); giveSamplesToDevice(c_audio, samples, samples_to_device_map, multOut, underflow);