Add reconfig of pfd on SR change
This commit is contained in:
@@ -480,7 +480,15 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
|
|||||||
{
|
{
|
||||||
masterClockFreq = MCLK_441;
|
masterClockFreq = MCLK_441;
|
||||||
}
|
}
|
||||||
|
#if USE_SW_PLL
|
||||||
|
sw_pll_pfd_init(&sw_pll_pfd,
|
||||||
|
sof_rate_hz / controller_rate_hz, /* How often the PFD is invoked */
|
||||||
|
masterClockFreq / sof_rate_hz, /* pll ratio integer */
|
||||||
|
0, /* Assume precise timing of sampling */
|
||||||
|
2000);
|
||||||
restart_sigma_delta(c_sw_pll, masterClockFreq);
|
restart_sigma_delta(c_sw_pll, masterClockFreq);
|
||||||
|
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/* Ideally we want to wait for handshake (and pass back up) here. But we cannot keep this
|
/* Ideally we want to wait for handshake (and pass back up) here. But we cannot keep this
|
||||||
@@ -593,17 +601,13 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int error = 0;
|
int error = 0;
|
||||||
if(first_loop)
|
if(!first_loop)
|
||||||
{
|
|
||||||
printstr("fl\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
error = sw_pll_pfd.mclk_diff;
|
error = sw_pll_pfd.mclk_diff;
|
||||||
printintln(error);
|
|
||||||
}
|
}
|
||||||
sw_pll_pfd.mclk_pt_last = mclk_pt;
|
sw_pll_pfd.mclk_pt_last = mclk_pt;
|
||||||
|
|
||||||
|
|
||||||
outuint(c_sw_pll, error);
|
outuint(c_sw_pll, error);
|
||||||
// outct(c_sw_pll, XS1_CT_END);
|
// outct(c_sw_pll, XS1_CT_END);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user