forked from PAWPAW-Mirror/lib_xua
PDM resources no longer accessed globally
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/* Configures PDM ports/clocks */
|
/* Configures PDM ports/clocks */
|
||||||
void xua_pdm_mic_config(in port p_mclk_pdm);
|
void xua_pdm_mic_config(in port p_pdm_mclk, in port p_pdm_clk, buffered in port:32 p_pdm_mics, clock clk_pdm);
|
||||||
|
|
||||||
#ifdef MIC_PROCESSING_USE_INTERFACE
|
#ifdef MIC_PROCESSING_USE_INTERFACE
|
||||||
/* Interface based user processing */
|
/* Interface based user processing */
|
||||||
@@ -30,7 +30,7 @@ void XUA_PdmBuffer(streaming chanend c_ds_output[2], chanend c_audio
|
|||||||
void user_pdm_process(server mic_process_if i_mic_data);
|
void user_pdm_process(server mic_process_if i_mic_data);
|
||||||
|
|
||||||
/* PDM interface and decimation cores */
|
/* PDM interface and decimation cores */
|
||||||
void xua_pdm_mic(streaming chanend c_ds_output[2]);
|
void xua_pdm_mic(streaming chanend c_ds_output[2], buffered in port:32 p_pdm_mics);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ void user_pdm_init();
|
|||||||
void XUA_PdmBuffer(streaming chanend c_ds_output[2], chanend c_audio);
|
void XUA_PdmBuffer(streaming chanend c_ds_output[2], chanend c_audio);
|
||||||
|
|
||||||
/* PDM interface and decimation cores */
|
/* PDM interface and decimation cores */
|
||||||
void xua_pdm_mic(streaming chanend c_ds_output[2]);
|
void xua_pdm_mic(streaming chanend c_ds_output[2], buffered in port:32 p_pdm_mics);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -478,7 +478,7 @@ void usb_audio_io(chanend ?c_aud_in, chanend ?c_adc,
|
|||||||
|
|
||||||
#if (XUA_NUM_PDM_MICS > 0) && (PDM_TILE == AUDIO_IO_TILE)
|
#if (XUA_NUM_PDM_MICS > 0) && (PDM_TILE == AUDIO_IO_TILE)
|
||||||
/* Configure clocks ports - sharing mclk port with I2S */
|
/* Configure clocks ports - sharing mclk port with I2S */
|
||||||
xua_pdm_mic_config(p_mclk_in);
|
xua_pdm_mic_config(p_mclk_in, p_pdm_mclk, p_pdm_clk, p_pdm_mics, clk_pdm);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (XUA_SPDIF_TX_EN) && (SPDIF_TX_TILE == AUDIO_IO_TILE)
|
#if (XUA_SPDIF_TX_EN) && (SPDIF_TX_TILE == AUDIO_IO_TILE)
|
||||||
@@ -530,7 +530,7 @@ void usb_audio_io(chanend ?c_aud_in, chanend ?c_adc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if (XUA_NUM_PDM_MICS > 0) && (PDM_TILE == AUDIO_IO_TILE)
|
#if (XUA_NUM_PDM_MICS > 0) && (PDM_TILE == AUDIO_IO_TILE)
|
||||||
xua_pdm_mic(c_ds_output);
|
xua_pdm_mic(c_ds_output, p_pdm_mics);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (SPDIF_RX) || (ADAT_RX)
|
#if (SPDIF_RX) || (ADAT_RX)
|
||||||
@@ -754,8 +754,8 @@ int main()
|
|||||||
/* PDM Mics running on a separate to AudioHub */
|
/* PDM Mics running on a separate to AudioHub */
|
||||||
on stdcore[PDM_TILE]:
|
on stdcore[PDM_TILE]:
|
||||||
{
|
{
|
||||||
xua_pdm_mic_config(p_pdm_mclk);
|
xua_pdm_mic_config(p_pdm_mclk, p_pdm_clk, p_pdm_mics, clk_pdm);
|
||||||
xua_pdm_mic(c_ds_output);
|
xua_pdm_mic(c_ds_output, p_pdm_mics);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user