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); SpdifTransmitPortConfig(p_spdif_tx, clk_mst_spd, p_mclk_in);
#endif #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 */ /* Perform required CODEC/ADC/DAC initialisation */
AudioHwInit(); AudioHwInit();
@@ -1491,7 +1486,7 @@ void XUA_AudioHub(chanend ?c_mix_out
outuint(c_spdif_out, mClk); outuint(c_spdif_out, mClk);
#endif #endif
#if NUM_PDM_MICS > 0 #if (NUM_PDM_MICS > 0)
/* Send decimation factor to PDM task(s) */ /* Send decimation factor to PDM task(s) */
c_pdm_in <: curSamFreq / AUD_TO_MICS_RATIO; c_pdm_in <: curSamFreq / AUD_TO_MICS_RATIO;
#endif #endif

View File

@@ -429,6 +429,7 @@ void usb_audio_io(chanend ?c_aud_in, chanend ?c_adc,
, server interface i_dfu ?dfuInterface , server interface i_dfu ?dfuInterface
#endif #endif
#if (NUM_PDM_MICS > 0) #if (NUM_PDM_MICS > 0)
, streaming chanend c_ds_output[2]
, chanend c_pdm_pcm , chanend c_pdm_pcm
#endif #endif
) )
@@ -443,6 +444,11 @@ void usb_audio_io(chanend ?c_aud_in, chanend ?c_adc,
#define c_dig_rx null #define c_dig_rx null
#endif #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 par
{ {
#ifdef MIXER #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) #if (SPDIF_RX) || (ADAT_RX)
{ {
thread_speed(); thread_speed();
@@ -615,6 +625,7 @@ int main()
, dfuInterface , dfuInterface
#endif #endif
#if (NUM_PDM_MICS > 0) #if (NUM_PDM_MICS > 0)
, c_ds_output
, c_pdm_pcm , c_pdm_pcm
#endif #endif
); );
@@ -689,17 +700,21 @@ int main()
#endif #endif
#ifndef PDM_RECORD #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 */ /* PDM Mics running on a separate to AudioHub */
on stdcore[PDM_TILE]: on stdcore[PDM_TILE]:
{ {
xua_pdm_mic_config(p_mclk_pdm); xua_pdm_mic_config(p_mclk_pdm);
xua_pdm_mic(c_ds_output); xua_pdm_mic(c_ds_output);
} }
#endif
#ifdef MIC_PROCESSING_USE_INTERFACE #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 #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 /*MIC_PROCESSING_USE_INTERFACE*/
#endif /*NUM_PDM_MICS > 0*/ #endif /*NUM_PDM_MICS > 0*/
#endif /*PDM_RECORD*/ #endif /*PDM_RECORD*/