Merge pull request #146 from ed-xmos/feature/fix_i2s_pushout_at_startup

Cherry pick decouple bug fix (v0.1.4) that solves the I2S timing issue
This commit is contained in:
oscarbailey-xmos
2020-09-21 09:36:56 +01:00
committed by GitHub
2 changed files with 6 additions and 4 deletions

View File

@@ -4,7 +4,8 @@ lib_xua Change Log
1.1.1
-----
* ADDED: DELETE-ME - Version bump placeholder for develop branch
* RESOLVED: Zero length input packets generated before enumeration causing I2S
timing pushout at startup
1.1.0
-----

View File

@@ -36,9 +36,10 @@ extern unsigned int g_curSamFreqMultiplier;
#define SET_SHARED_GLOBAL0(x,y) SET_SHARED_GLOBAL(x,y)
#endif
/* Global var for speed. Related to feedback. Used by input stream to determine IN packet size */
unsigned g_speed;
/* Initialise g_speed now so we get a sensible packet size until we start properly calculating feedback in the SoF case */
/* Without this, zero size input packets fill the input FIFO and it takes a long time to clear out when feedback starts */
/* This can cause a delay to the decouple ISR being serviced pushing our I2S timing. Initialising solves this */
unsigned g_speed = (AUDIO_CLASS == 2) ? (DEFAULT_FREQ/8000) << 16 : (DEFAULT_FREQ/1000) << 16;
unsigned g_freqChange = 0;
unsigned feedbackValid = 0;