Merge branch 'master' into DEV_IMP_FB

This commit is contained in:
Ross Owen
2015-08-25 11:32:25 +01:00
42 changed files with 3938 additions and 3365 deletions

View File

@@ -317,6 +317,10 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in,
sofCount = 0;
clocks = 0;
remnant = 0;
int min, mid, max;
GetADCCounts(sampleFreq, min, mid, max);
g_speed = mid<<16;
}
/* Ideally we want to wait for handshake (and pass back up) here. But we cannot keep this
@@ -384,7 +388,7 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in,
* lastClock being incorrect */
/* Get MCLK count */
asm (" getts %0, res[%1]" : "=r" (u_tmp) : "r" (p_off_mclk));
asm volatile(" getts %0, res[%1]" : "=r" (u_tmp) : "r" (p_off_mclk));
GET_SHARED_GLOBAL(freqChange, g_freqChange);
if(freqChange == SET_SAMPLE_FREQ)
@@ -428,7 +432,7 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in,
#endif
{
int usb_speed;
asm("stw %0, dp[g_speed]"::"r"(clocks)); // g_speed = clocks
asm volatile("stw %0, dp[g_speed]"::"r"(clocks)); // g_speed = clocks
GET_SHARED_GLOBAL(usb_speed, g_curUsbSpeed);