Mixed missing calls to PDM tasks

This commit is contained in:
xross
2018-02-27 15:29:29 +00:00
parent 90aa19d351
commit bff169463f
2 changed files with 19 additions and 9 deletions

View File

@@ -1323,11 +1323,6 @@ void XUA_AudioHub(chanend ?c_mix_out
SpdifTransmitPortConfig(p_spdif_tx, clk_mst_spd, p_mclk_in);
#endif
#if (NUM_PDM_MICS > 0) && (PDM_TILE == AUDIO_IO_TILE)
/* Configure clocks ports - sharing mclk port with I2S */
xua_pdm_mic_config(p_mclk_in);
#endif
/* Perform required CODEC/ADC/DAC initialisation */
AudioHwInit();
@@ -1491,7 +1486,7 @@ void XUA_AudioHub(chanend ?c_mix_out
outuint(c_spdif_out, mClk);
#endif
#if NUM_PDM_MICS > 0
#if (NUM_PDM_MICS > 0)
/* Send decimation factor to PDM task(s) */
c_pdm_in <: curSamFreq / AUD_TO_MICS_RATIO;
#endif

View File

@@ -429,6 +429,7 @@ void usb_audio_io(chanend ?c_aud_in, chanend ?c_adc,
, server interface i_dfu ?dfuInterface
#endif
#if (NUM_PDM_MICS > 0)
, streaming chanend c_ds_output[2]
, chanend c_pdm_pcm
#endif
)
@@ -443,6 +444,11 @@ void usb_audio_io(chanend ?c_aud_in, chanend ?c_adc,
#define c_dig_rx null
#endif
#if (NUM_PDM_MICS > 0) && (PDM_TILE == AUDIO_IO_TILE)
/* Configure clocks ports - sharing mclk port with I2S */
xua_pdm_mic_config(p_mclk_in);
#endif
par
{
#ifdef MIXER
@@ -476,6 +482,10 @@ void usb_audio_io(chanend ?c_aud_in, chanend ?c_adc,
);
}
#if (NUM_PDM_MICS > 0) && (PDM_TILE == AUDIO_IO_TILE)
xua_pdm_mic(c_ds_output);
#endif
#if (SPDIF_RX) || (ADAT_RX)
{
thread_speed();
@@ -615,6 +625,7 @@ int main()
, dfuInterface
#endif
#if (NUM_PDM_MICS > 0)
, c_ds_output
, c_pdm_pcm
#endif
);
@@ -689,17 +700,21 @@ int main()
#endif
#ifndef PDM_RECORD
#if (NUM_PDM_MICS > 0) && (PDM_TILE != AUDIO_IO_TILE)
#if (NUM_PDM_MICS > 0)
#if (PDM_TILE != AUDIO_IO_TILE)
/* PDM Mics running on a separate to AudioHub */
on stdcore[PDM_TILE]:
{
xua_pdm_mic_config(p_mclk_pdm);
xua_pdm_mic(c_ds_output);
}
#endif
#ifdef MIC_PROCESSING_USE_INTERFACE
on stdcore[PDM_TILE].core[0]: pdm_buffer(c_ds_output, c_pdm_pcm, i_mic_process);
on stdcore[PDM_TILE].core[0]: xua_pdm_buffer(c_ds_output, c_pdm_pcm, i_mic_process);
#else
on stdcore[PDM_TILE].core[0]: pdm_buffer(c_ds_output, c_pdm_pcm);
on stdcore[PDM_TILE].core[0]: xua_pdm_buffer(c_ds_output, c_pdm_pcm);
#endif /*MIC_PROCESSING_USE_INTERFACE*/
#endif /*NUM_PDM_MICS > 0*/
#endif /*PDM_RECORD*/