Post Go back to editing

adc_dac_playback example not working properly

Both my co-worker and I are having the same problem running the adc_dac_playback example on our own SC589 EZ-Kit eval boards, running CCES 2.10.0. It appears as if the adc callback is never called.

I'm applying a sine wave from an audio interface to IP1 and IP2. The outputs OP1 and OP2 are connected to two speakers.

In the processBuffers() function pGetADC is always NULL so the buffers are never copied to the DAC and no audio is ever output.

I've verified that the signal I'm applying at the input is coming out of the op-amp (U38) and that the Bit and LR clocks from the ADC and the DAC are being passed through the 8-bit bus switch (U5).

When I comment out the "PLAYBACK" #define a sine wav is played out of the speakers as is expected, so the DAC part of this example program seems to be working without issue. 

What could be going wrong? Where should I start?

Parents
  • I have the same issue. Checking the adcCount (which is incremented on every callback from the ADC), I can see that it is always zero, meaning that the ADC callback is never triggered. However all the setup for the adc seems to be succesful, or at least not return errors, for example the Adau1979Init() function returns zero (no error value); I can explicitly see it calls adi_adau1979_RegisterCallback with the AdcCallback function and this register returns success. adi_adau1979_Enable() also returns success. But no callbacks are triggered for the adc and the buffer is always NULL.

    The DAC callback is triggered regularly and the DacCount increments as expected. In playback mode the program finishes with the "All done" printed, meaning no errors encountered. But no audio getting in from the adau1979 ADC. In loopback mode, the 3khz tone is generated and played out correctly through the DAC, I can measure that audio is there and of the right frequency on the analog output, but again no adc callbacks are triggered, so the program finishes with an error when it tries to find the 3khz tone on the input (since input buffers from adc are empty).

    I have the  ADSP-SC589 EZ-KIT Lite, CCES 2.10.0, and the ADSP-SC5XX Board Support Package Rev 2.0.2. I am running the  "ADC DAC Audio PLayback (SC589 SHARC)" example from the board support package without modification.

    Any thoughts on what might be wrong or where to start debugging would be appreciated.

Reply
  • I have the same issue. Checking the adcCount (which is incremented on every callback from the ADC), I can see that it is always zero, meaning that the ADC callback is never triggered. However all the setup for the adc seems to be succesful, or at least not return errors, for example the Adau1979Init() function returns zero (no error value); I can explicitly see it calls adi_adau1979_RegisterCallback with the AdcCallback function and this register returns success. adi_adau1979_Enable() also returns success. But no callbacks are triggered for the adc and the buffer is always NULL.

    The DAC callback is triggered regularly and the DacCount increments as expected. In playback mode the program finishes with the "All done" printed, meaning no errors encountered. But no audio getting in from the adau1979 ADC. In loopback mode, the 3khz tone is generated and played out correctly through the DAC, I can measure that audio is there and of the right frequency on the analog output, but again no adc callbacks are triggered, so the program finishes with an error when it tries to find the 3khz tone on the input (since input buffers from adc are empty).

    I have the  ADSP-SC589 EZ-KIT Lite, CCES 2.10.0, and the ADSP-SC5XX Board Support Package Rev 2.0.2. I am running the  "ADC DAC Audio PLayback (SC589 SHARC)" example from the board support package without modification.

    Any thoughts on what might be wrong or where to start debugging would be appreciated.

Children
  • Hi,

    Apologies for the inconvenience caused.

    Yes. We can also observe the same behavior. It is because of the changes in sru_config.c with the latest CCES version. Can you please add the below lines in the adc_dac_playback.c after the call to adi_initComponents() function and let us know how you are getting on.

    /* PADS0 DAI0 Port Input Enable Control Register */
    *pREG_PADS0_DAI0_IE = (unsigned int) 0x001FFFFE;

    /* PADS0 DAI1 Port Input Enable Control Register */
    *pREG_PADS0_DAI1_IE = (unsigned int) 0x001FFFFE;

    Regards,
    Santhakumari.K

  • Thank you. 

    I tied making your suggested change  in the adc_dac_playback.c and it did fix the issue. I can now see that the ADC calback is triggered regularly, AdcCount incrments as expected, and audio samples are received into the ping pong buffers. I am inputing tones of different frequencies into the 4 ADC channels and subsequently see tones of the same frequencies output via the DAC (this is in PLAYBACK mode).

    So all seems to be working as far as I can tell. 

    thank you very much for the assistance.

    regards

    Kurt