Post Go back to editing

AD1953 with Blackfin 561 , No audio data in one channel

I am working on a Project in which 2 channel audio is streamed from Blackfin 561 to AD1953 using SPORT0 and SPORT1. I can able to hear the audio output via left channel (VoutL+/-) but nothing heard in the Right channel (VoutR+/-) Let me know your suggestions, and what could be the reason for this issue.

  • Hello Karthik,

    I really do not have enough information to venture a guess. I support the DAC so if you can take some screenshots of the I2S data and clocks going into the DAC that would be helpful. Look at my post explaining how to format the data on the screen of the scope: https://ez.analog.com/thread/87319-how-to-take-meaningful-screenshots-of-i2s-audio-signals

    Let me know the frequencies of the clocks and the sample rate. Actually measure the clocks do not assume the Blackfin program is correctly generating the clocks. There could be a coding error there.

    It would be good to see your hardware schematic as well in case there are some clues there.

    Last, you should post a similar question over on the Blackfin space of this forum. They can help you with possible code issues but I think you will have to supply some of your code for setting up the ports and the data flow.

    Thanks,

    Dave T

  • Hello Dave,

    Thank you very much for the reply.

    Here i have been attached the screenshots of the wave-forms of SDATA,BCLK,MCLK with respect to LRCLK.

    And the Measured Clock Frequencies are :  MCLK - 24MHz
                                                                           BCLK - 2MHz
                                                                           LRCLK - 65KHz

                                                                           Sample Rate - 2MHz

    Thanks ,

    Karthik

  • Hello Karthik,

    Thanks for the screenshots. They were very good and very helpful!

    First, your sampling rate is 65kHz. But all your clock rates are not quite correct.

    Plus they all need to be correlated with each other and divided down from the master clock.

    Let's start with the Master Clock. If you have exactly 24MHz available in your system then the default sampling rate will be the Master Clock / 512.  So this means your sampling rate will be 46.875 KHz.

    If you want the sampling rate to be 48kHz then you need to change your master clock frequency to 48kHz X 512 = 24.576MHz. Your master clock MUST be this frequency and the LRCLK MUST be divided down from this master clock.

    So turning to the LRCLK:

    The LRCLK needs to be a 50/50 duty cycle for the I2S mode of this part. If you are in the DSP mode then it can be a pulse like you have it. So this is why you are only getting the left channel because the left channel data is when the LRCLK is low. So change the LRCLK to be 50/50 duty cycle and output the left channel data when it is low.

    Now to talk about the bit clock.

    The bit clock needs to clock in the 32 bits per channel that is in the I2S specification. The data needs to be delayed from the LRCLK edge by one BCLK period and the data needs to be left justified with 8 bits of zero after the 24 bit data. This is actually not important. If it were all "1"'s they would be ignored anyway.

    So with stereo data you need to clock in 64 bits totally during one LRCLK period. One sample period. So the Bit Clock needs to be 64 X LRCLK = 3.072MHz if the sample rate is 48KHz.

    So adjust the Blackfin Code to produce the frequencies I mentioned above.

    This should make a big difference.

    Dave T

  • Hello Dave,

    Thanks for the response. But i am still struggling to configure my blackfin code to produce the frequencies which you had mentioned above. 

    In my code , 

    // SPORT0_Configuration

    void Init_Sport0_Test(void)
    {

    int samp;
    samp = 31250 * 32 * 2;
    *pSPORT0_TCLKDIV = ((SCLK/(2*samp)) - 1); // SCLK = 83333333
    *pSPORT0_TFSDIV = ((SCLK/(2*samp)) - 1);
    *pSPORT0_TCR1 = ITCLK | TFSR | ITFS ;
    *pSPORT0_TCR2 = SLEN_32 ; 
    }

    //

    if i changed my sample value , my left channel audio is lost too, i couldn't able to hear it. Do you have any sample code for produce the required frequencies which you mentioned before ?

    Thanks, 

    Karthik