/* De-initialize the SDMA environment. In this function will: */
void sdma_deinit(void)
/* De-initialize the SDMA environment. In this function will: */
void sdma_deinit(void)
{
    int32_t idx;
    for (idx = 0; idx < SDMA_NUM_CHANNELS; idx++) {
        sdma_channel_stop(idx);
        HW_SDMAARM_SDMA_CHNPRIn_WR(idx,SDMA_CHANNEL_PRIORITY_FREE);
    }
    for (idx = 0; idx < SDMA_NUM_REQUESTS; idx++) {
    HW_SDMAARM_CHNENBLn_WR(idx,0);
    }
    HW_SDMAARM_HOSTOVR_WR(0);
    HW_SDMAARM_DSPOVR_WR(0);
    HW_SDMAARM_EVTOVR_WR(0);
    sdma_envp = NULL;
    sdma_initialized = FALSE;
}