Handle case at startup where decouple ISR gets stuck for several hundred cycles at startup, pushing out I2S timing

This commit is contained in:
Ed
2020-09-01 09:55:53 +01:00
parent 711efc8be9
commit 0b32bee3aa

View File

@@ -523,6 +523,9 @@ __builtin_unreachable();
GET_SHARED_GLOBAL(rdPtr, g_aud_to_host_rdptr);
asm volatile("ldw %0, %1[0]":"=r"(datalength):"r"(rdPtr));
/* Handle startup case where zero length packets exist */
if(!datalength) break;
/* Round up datalength */
datalength = ((datalength+3) & ~0x3) + 4;