xpd: Cleaned up whitespace

This commit is contained in:
Ross Owen
2016-04-26 11:32:19 +01:00
parent b4fd87b9e2
commit d0929ae067
4 changed files with 18 additions and 18 deletions

View File

@@ -279,7 +279,7 @@ static inline unsigned DoSampleTransfer(chanend c_out, const int readBuffNo, con
#else
inuint(c_out);
#endif
UserBufferManagement(samplesOut, samplesIn[readBuffNo]
#ifdef RUN_DSP_TASK
, i_dsp
@@ -294,7 +294,7 @@ static inline unsigned DoSampleTransfer(chanend c_out, const int readBuffNo, con
}
#endif
}
return 0;
}
@@ -487,8 +487,8 @@ unsigned static deliver(chanend c_out, chanend ?c_spd_out,
}
#endif
unsigned command = DoSampleTransfer(c_out, readBuffNo, underflowWord
#ifdef RUN_DSP_TASK
unsigned command = DoSampleTransfer(c_out, readBuffNo, underflowWord
#ifdef RUN_DSP_TASK
, i_dsp
#endif
);
@@ -822,10 +822,10 @@ unsigned static deliver(chanend c_out, chanend ?c_spd_out,
/* The below looks a bit odd but forces the compiler to inline twice */
unsigned command;
if(readBuffNo)
command = DoSampleTransfer(c_out, 1, underflowWord
command = DoSampleTransfer(c_out, 1, underflowWord
#ifdef RUN_DSP_TASK
, i_dsp
#endif
#endif
);
else
command = DoSampleTransfer(c_out, 0, underflowWord
@@ -1190,7 +1190,7 @@ chanend ?c_config, chanend ?c
#if (NUM_PDM_MICS > 0)
c_pdm_in,
#endif
null
null
#ifdef RUN_DSP_TASK
, i_dsp
#endif

View File

@@ -3,7 +3,7 @@
#include "devicedefines.h"
/* Default implentation for UserBufferManagement() */
void UserBufferManagement(unsigned sampsFromUsbToAudio[], unsigned sampsFromAudioToUsb[]
void UserBufferManagement(unsigned sampsFromUsbToAudio[], unsigned sampsFromAudioToUsb[]
#ifdef RUN_DSP_TASK
, unsigned i_dsp
#endif

View File

@@ -678,7 +678,7 @@ int main()
on stdcore[PDM_TILE]: pdm_mic(c_ds_output);
on stdcore[PDM_TILE].core[0]: pdm_buffer(c_ds_output, c_pdm_pcm, i_mic_process);
#endif
USER_MAIN_CORES
}

View File

@@ -36,7 +36,7 @@ void pdm_buffer(streaming chanend c_ds_output[2], chanend c_audio
#endif
)
{
unsigned buffer;
unsigned buffer;
int output[NUM_PDM_MICS];
unsigned samplerate;
@@ -45,13 +45,13 @@ void pdm_buffer(streaming chanend c_ds_output[2], chanend c_audio
#else
user_pdm_init();
#endif
mic_array_decimator_conf_common_t dcc;
const int * unsafe fir_coefs[7];
mic_array_frame_time_domain * unsafe current;
mic_array_decimator_config_t dc[2];
mic_array_frame_time_domain * unsafe current;
mic_array_decimator_config_t dc[2];
/* Get initial sample-rate and compute decimation factor */
/* Get initial sample-rate and compute decimation factor */
c_audio :> samplerate;
unsigned decimationfactor = 96000/samplerate;
@@ -114,7 +114,7 @@ void pdm_buffer(streaming chanend c_ds_output[2], chanend c_audio
select
{
case c_audio :> req:
/* Audio IO core requests samples */
if(req)
unsafe{
@@ -123,7 +123,7 @@ void pdm_buffer(streaming chanend c_ds_output[2], chanend c_audio
c_audio <: output[i];
}
/* Get a new frame of mic data */
/* Get a new frame of mic data */
mic_array_frame_time_domain * unsafe current = mic_array_get_next_time_domain_frame(c_ds_output, 2, buffer, mic_audio, dc);
/* Run user code */
@@ -137,12 +137,12 @@ void pdm_buffer(streaming chanend c_ds_output[2], chanend c_audio
unsafe{
/* Sample rate change */
c_audio :> samplerate;
/* Re-config the mic decimators for the new sample-rate */
decimationfactor = 96000/samplerate;
dcc.output_decimation_factor = decimationfactor;
dcc.coefs=fir_coefs[decimationfactor/2];
mic_array_decimator_configure(c_ds_output, 2, dc);
mic_array_init_time_domain_frame(c_ds_output, 2, buffer, mic_audio, dc);