Start simplifiction of appnote code

This commit is contained in:
xross
2018-02-21 10:57:05 +00:00
6 changed files with 33 additions and 28 deletions

View File

@@ -100,7 +100,7 @@ extern buffered out port:32 p_bclk;
unsigned dsdMode = DSD_MODE_OFF;
/* Master clock input */
extern unsafe port p_mclk_in;
extern in port p_mclk_in;
extern in port p_mclk_in2;
#if (XUA_SPDIF_TX_EN)

View File

@@ -492,7 +492,7 @@ __builtin_unreachable();
speedRem &= 0xffff;
/* This patches up the case where the FB is well off, leading to totalSampsToWrite to also be off */
/* This can be startup case, back mclk input etc */
/* This can be startup case, bad mclk input etc */
if (totalSampsToWrite < 0 || totalSampsToWrite * g_curSubSlot_In * g_numUsbChan_In > g_maxPacketSize)
{
totalSampsToWrite = 0;
@@ -834,6 +834,7 @@ void XUA_Buffer_Decouple(chanend c_mix_out
/* Reset OUT buffer state */
SET_SHARED_GLOBAL(g_aud_from_host_rdptr, aud_from_host_fifo_start);
SET_SHARED_GLOBAL(g_aud_from_host_wrptr, aud_from_host_fifo_start);
SET_SHARED_GLOBAL(aud_data_remaining_to_device, 0);
/* NOTE, this is potentially usefull for UAC1 */
unpackState = 0;

View File

@@ -7,7 +7,7 @@
extern unsafe port p_mclk_in;
extern in port p_mclk_in;
extern clock clk_audio_mclk;
extern clock clk_audio_bclk;