forked from PAWPAW-Mirror/lib_xua
deliver thread no longer waits for AUDIO_PLL_LOCK_DELAY - this was causing pop issues on rate change as DAC has mclk but no bclk/lrclk. This seems to cause issues. This delay now added to audio SF change in EP0 for safety. Related to BUG #14769
This commit is contained in:
@@ -948,11 +948,16 @@ void audio(chanend c_mix_out, chanend ?c_dig_rx, chanend ?c_config, chanend ?c)
|
|||||||
/* No delay for DFU modes */
|
/* No delay for DFU modes */
|
||||||
if ((curSamFreq != AUDIO_REBOOT_FROM_DFU) && (curSamFreq != AUDIO_STOP_FOR_DFU) && retVal1)
|
if ((curSamFreq != AUDIO_REBOOT_FROM_DFU) && (curSamFreq != AUDIO_STOP_FOR_DFU) && retVal1)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
|
/* User should ensure MCLK is stable in AudioHwConfig */
|
||||||
|
if(retVal1 == SET_SAMPLE_FREQ)
|
||||||
|
{
|
||||||
timer t;
|
timer t;
|
||||||
unsigned time;
|
unsigned time;
|
||||||
t :> time;
|
t :> time;
|
||||||
t when timerafter(time+AUDIO_PLL_LOCK_DELAY) :> void;
|
t when timerafter(time+AUDIO_PLL_LOCK_DELAY) :> void;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
/* Handshake back */
|
/* Handshake back */
|
||||||
outct(c_mix_out, XS1_CT_END);
|
outct(c_mix_out, XS1_CT_END);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -308,17 +308,17 @@ int AudioClassRequests_2(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp, c
|
|||||||
outuint(c_audioControl, SET_SAMPLE_FREQ);
|
outuint(c_audioControl, SET_SAMPLE_FREQ);
|
||||||
outuint(c_audioControl, g_curSamFreq);
|
outuint(c_audioControl, g_curSamFreq);
|
||||||
|
|
||||||
/* Wait for handshake back - i.e. pll locked and clocks okay */
|
/* Wait for handshake back - i.e. PLL locked and clocks okay */
|
||||||
chkct(c_audioControl, XS1_CT_END);
|
chkct(c_audioControl, XS1_CT_END);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allow time for our feedback to stabalise*/
|
/* Allow time for our feedback to stabilise*/
|
||||||
{
|
{
|
||||||
timer t;
|
timer t;
|
||||||
unsigned time;
|
unsigned time;
|
||||||
t :> time;
|
t :> time;
|
||||||
t when timerafter(time+5000000):> void;
|
t when timerafter(time+5000000+40000000):> void;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1049,7 +1049,7 @@ int AudioEndpointRequests_1(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp
|
|||||||
timer t;
|
timer t;
|
||||||
unsigned time;
|
unsigned time;
|
||||||
t :> time;
|
t :> time;
|
||||||
t when timerafter(time+50000000):> void;
|
t when timerafter(time+50000000+40000000):> void;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user