diff --git a/examples/app_xua_simple/src/app_xua_simple.xc b/examples/app_xua_simple/src/app_xua_simple.xc index 397c0d99..43deab2a 100644 --- a/examples/app_xua_simple/src/app_xua_simple.xc +++ b/examples/app_xua_simple/src/app_xua_simple.xc @@ -49,9 +49,6 @@ int main() /* Channel for communcating control messages from EP0 to the rest of the device (via the buffering cores */ chan c_aud_ctl; - /* TODO handle this */ - interface audManage_if i_audMan; - par { /* Low level USB device layer core */ @@ -70,7 +67,7 @@ int main() on tile[1]: XUA_Buffer(c_ep_out[1], c_ep_in[1], c_sof, c_aud_ctl, p_for_mclk_count, c_aud); /* IOHub core does most of the audio IO i.e. I2S (also serves as a hub for all audio) */ - on tile[0]: XUA_AudioHub(c_aud, i_audMan); + on tile[0]: XUA_AudioHub(c_aud, null); } return 0; diff --git a/lib_xua/api/xua_audiohub.h b/lib_xua/api/xua_audiohub.h index a9791115..0f1a9ef0 100644 --- a/lib_xua/api/xua_audiohub.h +++ b/lib_xua/api/xua_audiohub.h @@ -24,19 +24,19 @@ typedef interface audManage_if * This function drives I2S ports and handles samples to/from other digital * I/O threads. * - * \param c_in Audio sample channel connected to the mixer() thread or the + * \param c_aud Audio sample channel connected to the mixer() thread or the * decouple() thread * \param c_dig channel connected to the clockGen() thread for * receiving/transmitting samples * \param c_config An optional channel that will be passed on to the * CODEC configuration functions. */ -void XUA_AudioHub(chanend ?c_in +void XUA_AudioHub(chanend ?c_aud #if defined(SPDIF_TX) && (SPDIF_TX_TILE != AUDIO_IO_TILE) - chanend c_spdif_tx, + , chanend c_spdif_tx #endif #if(defined(SPDIF_RX) || defined(ADAT_RX)) - chanend c_dig, + , chanend c_dig #endif #if (XUD_TILE != 0) && (AUDIO_IO_TILE == 0) && (XUA_DFU_EN == 1) , server interface i_dfu ?dfuInterface @@ -44,7 +44,7 @@ void XUA_AudioHub(chanend ?c_in #if (NUM_PDM_MICS > 0) , chanend c_pdm_in #endif - , client audManage_if i_audMan + , client audManage_if ?i_audMan ); void SpdifTxWrapper(chanend c_spdif_tx); @@ -52,9 +52,11 @@ void SpdifTxWrapper(chanend c_spdif_tx); /* These functions must be implemented for the CODEC/ADC/DAC arrangement of a specific design */ /* Any required clocking and CODEC initialisation - run once at start up */ +/* TODO Provide default implementation of this */ void AudioHwInit(); /* Configure audio hardware (clocking, CODECs etc) for a specific mClk/Sample frquency - run on every sample frequency change */ +/* TODO Provide default implementation of this */ void AudioHwConfig(unsigned samFreq, unsigned mClk, unsigned dsdMode, unsigned sampRes_DAC, unsigned sampRes_ADC); diff --git a/lib_xua/src/usb_audio/audiohub/xua_audiohub.xc b/lib_xua/src/usb_audio/audiohub/xua_audiohub.xc index f3793475..1f1831e3 100755 --- a/lib_xua/src/usb_audio/audiohub/xua_audiohub.xc +++ b/lib_xua/src/usb_audio/audiohub/xua_audiohub.xc @@ -247,7 +247,7 @@ static inline void TransferAdatTxSamples(chanend c_adat_out, const unsigned samp #ifndef NO_USB #pragma unsafe arrays -static inline unsigned DoSampleTransfer(chanend c_out, const int readBuffNo, const unsigned underflowWord, client audManage_if i_audMan) +static inline unsigned DoSampleTransfer(chanend c_out, const int readBuffNo, const unsigned underflowWord, client audManage_if ?i_audMan) { outuint(c_out, underflowWord); @@ -305,7 +305,7 @@ static inline unsigned DoSampleTransfer(chanend c_out, const int readBuffNo, con #else /* NO_USB */ #pragma unsafe arrays -static inline unsigned DoSampleTransfer(chanend ?c_out, const int readBuffNo, const unsigned underflowWord, client audManage_if i_audMan) +static inline unsigned DoSampleTransfer(chanend ?c_out, const int readBuffNo, const unsigned underflowWord, client audManage_if ?i_audMan) { UserBufferManagement(samplesOut, samplesIn[readBuffNo], i_audMan); return 0; @@ -502,7 +502,9 @@ unsigned static deliver(chanend ?c_out, chanend ?c_spd_out, #endif unsigned audioToUsbRatioCounter = 0; +#if (NUM_PDM_MICS > 0) unsigned audioToMicsRatioCounter = 0; +#endif #if (AUD_TO_USB_RATIO > 1) union i2sInDs3 @@ -1120,7 +1122,7 @@ chanend c_dig_rx, #if (NUM_PDM_MICS > 0) , chanend c_pdm_in #endif -, client audManage_if i_audMan +, client audManage_if ?i_audMan ) { #if defined (SPDIF_TX) && (SPDIF_TX_TILE == AUDIO_IO_TILE)