Conflicted merge in mixer

This commit is contained in:
Ross Owen
2013-12-12 11:50:32 +00:00
7 changed files with 27 additions and 27 deletions

View File

@@ -142,7 +142,7 @@ static inline void doI2SClocks(unsigned divide)
/* I2S delivery thread */
#pragma unsafe arrays
{unsigned, unsigned} deliver(chanend c_out, chanend ?c_spd_out, unsigned divide, unsigned curSamFreq, chanend ?c_dig_rx, chanend ?c_adc)
{unsigned, unsigned} static deliver(chanend c_out, chanend ?c_spd_out, unsigned divide, unsigned curSamFreq, chanend ?c_dig_rx, chanend ?c_adc)
{
unsigned sample;
unsigned underflow = 0;
@@ -734,7 +734,7 @@ static inline void doI2SClocks(unsigned divide)
/* This function is a dummy version of the deliver thread that does not
connect to the codec ports. It is used during DFU reset. */
{unsigned,unsigned} dummy_deliver(chanend c_out)
{unsigned,unsigned} static dummy_deliver(chanend c_out)
{
while (1)
{

View File

@@ -38,13 +38,13 @@ static int clockValid[NUM_CLOCKS]; /* Store current val
static int clockInt[NUM_CLOCKS]; /* Interupt flag for clocks */
static int clockId[NUM_CLOCKS];
int abs(int x)
static int abs(int x)
{
if (x < 0) return -x;
return x;
}
int channelContainsControlToken(chanend x)
static int channelContainsControlToken(chanend x)
{
unsigned char tmpc;
@@ -58,7 +58,7 @@ int channelContainsControlToken(chanend x)
}
void outInterrupt(chanend c_interruptControl, int value)
static void outInterrupt(chanend c_interruptControl, int value)
{
/* Non-blocking check for control token */
//if (channelContainsControlToken(c_interruptControl))

View File

@@ -54,7 +54,7 @@ unsigned int g_curSamFreq48000Family = DEFAULT_FREQ % 48000 == 0;
unsigned int g_curSamFreqMultiplier = DEFAULT_FREQ / 48000;
/* Store an int into a char array: Note this allows non-word aligned access unlike reinerpret cast */
void storeInt(unsigned char buffer[], int index, int val)
static void storeInt(unsigned char buffer[], int index, int val)
{
buffer[index+3] = val>>24;
buffer[index+2] = val>>16;
@@ -63,13 +63,13 @@ void storeInt(unsigned char buffer[], int index, int val)
}
/* Store an short into a char array: Note this allows non-word aligned access unlike reinerpret cast */
void storeShort(unsigned char buffer[], int index, short val)
static void storeShort(unsigned char buffer[], int index, short val)
{
buffer[index+1] = val>>8;
buffer[index] = val;
}
void storeFreq(unsigned char buffer[], int &i, int freq)
static void storeFreq(unsigned char buffer[], int &i, int freq)
{
storeInt(buffer, i, freq);
i+=4;
@@ -81,7 +81,7 @@ void storeFreq(unsigned char buffer[], int &i, int freq)
}
unsigned longMul(unsigned a, unsigned b, int prec)
static unsigned longMul(unsigned a, unsigned b, int prec)
{
unsigned x,y;
unsigned ret;
@@ -94,12 +94,12 @@ unsigned longMul(unsigned a, unsigned b, int prec)
return ret;
}
void setG_curSamFreqMultiplier(int x) {
static void setG_curSamFreqMultiplier(int x) {
asm(" stw %0, dp[g_curSamFreqMultiplier]" :: "r"(x));
}
/* Update master volume i.e. i.e update weights for all channels */
void updateMasterVol( int unitID, chanend ?c_mix_ctl)
static void updateMasterVol( int unitID, chanend ?c_mix_ctl)
{
int x;
#ifndef OUT_VOLUME_IN_MIXER
@@ -168,7 +168,7 @@ void updateMasterVol( int unitID, chanend ?c_mix_ctl)
}
}
void updateVol(int unitID, int channel, chanend ?c_mix_ctl)
static void updateVol(int unitID, int channel, chanend ?c_mix_ctl)
{
int x;
#ifndef OUT_VOLUME_IN_MIXER

View File

@@ -114,7 +114,7 @@ int doMix8(xc_ptr samples, xc_ptr mult);
/* DO NOT inline, causes 10.4.2 tools to add extra loads in loop */
/* At 18 x 12dB we could get 64 x bigger */
#pragma unsafe arrays
int doMix(xc_ptr samples, xc_ptr ptr, xc_ptr mult)
static int doMix(xc_ptr samples, xc_ptr ptr, xc_ptr mult)
{
int h=0;
int l=0;
@@ -150,7 +150,7 @@ int doMix(xc_ptr samples, xc_ptr ptr, xc_ptr mult)
#endif
#pragma unsafe arrays
void giveSamplesToHost(chanend c, xc_ptr samples, xc_ptr ptr, xc_ptr multIn)
static void giveSamplesToHost(chanend c, xc_ptr samples, xc_ptr ptr, xc_ptr multIn)
{
#if defined(IN_VOLUME_IN_MIXER) && defined(IN_VOLUME_AFTER_MIX)
int mult;
@@ -221,7 +221,7 @@ static void getSamplesFromHost(chanend c, xc_ptr samples, int base, unsigned und
}
#pragma unsafe arrays
void giveSamplesToDevice(chanend c, xc_ptr samples, xc_ptr ptr, xc_ptr multOut, unsigned underflow)
static void giveSamplesToDevice(chanend c, xc_ptr samples, xc_ptr ptr, xc_ptr multOut, unsigned underflow)
{
outuint(c, underflow);
@@ -255,7 +255,7 @@ void giveSamplesToDevice(chanend c, xc_ptr samples, xc_ptr ptr, xc_ptr multOut,
}
#pragma unsafe arrays
void getSamplesFromDevice(chanend c, xc_ptr samples, int base)
static void getSamplesFromDevice(chanend c, xc_ptr samples, int base)
{
#if defined(IN_VOLUME_IN_MIXER) && !defined(IN_VOLUME_AFTER_MIX)
int mult;
@@ -288,10 +288,10 @@ void getSamplesFromDevice(chanend c, xc_ptr samples, int base)
}
}
int mixer1_mix2_flag = (DEFAULT_FREQ > 96000);
static int mixer1_mix2_flag = (DEFAULT_FREQ > 96000);
#pragma unsafe arrays
void mixer1(chanend c_host, chanend c_mix_ctl, chanend c_mixer2)
static void mixer1(chanend c_host, chanend c_mix_ctl, chanend c_mixer2)
{
int mixed;
unsigned cmd;
@@ -520,11 +520,11 @@ void mixer1(chanend c_host, chanend c_mix_ctl, chanend c_mixer2)
}
}
int mixer2_mix2_flag = (DEFAULT_FREQ > 96000);
static int mixer2_mix2_flag = (DEFAULT_FREQ > 96000);
#if (MAX_MIX_COUNT > 0)
#pragma unsafe arrays
void mixer2(chanend c_mixer1, chanend c_audio)
static void mixer2(chanend c_mixer1, chanend c_audio)
{
int mixed;

View File

@@ -105,7 +105,7 @@ int slotSize = 3; /* 3 bytes per sample for Audio Class 1.0 */
#pragma select handler
#pragma unsafe arrays
void handle_audio_request(chanend c_mix_out)
void handle_audio_request(chanend c_mix_out)
{
int outSamps;
int space_left;
@@ -472,7 +472,7 @@ unsigned g_intFlag = 0;
extern unsigned char g_intData[8];
void check_for_interrupt(chanend ?c_clk_int) {
static void check_for_interrupt(chanend ?c_clk_int) {
unsigned tmp;
select