I have an issue with the audio when I plug and unplug the USB cable to a windows PC multiple times. Further debugging I figured out the issue was with 'XUD_GetData_Select' function which was supposed to be true when audio data is received from the host. But after re-plugging the cable a couple of time, the select function does not hit even when the audio is being played and continuous to be in the state untill the XMOS is reset.
mC: xs1-u6a-64-fb96-c5
Can someone please help me debug the issue further?
Code: Select all
case XUD_GetData_Select(c_aud_out, ep_aud_out, length, result):
{
GET_SHARED_GLOBAL(aud_from_host_buffer, g_aud_from_host_buffer);
write_via_xc_ptr(aud_from_host_buffer, length);
/* Sync with decouple thread */
SET_SHARED_GLOBAL0(g_aud_from_host_flag, 1);
}
Karthik