This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3200 audio wifi demo bitrate and samplerate

Dear all, 

I see from this other forum thread   how it is possible to change the samplerate of the codec (although the information is quite confusing and I haven't tried it yet).

But how to change the bitrate? I should mention that the examples provide some defines that seems to change it, but no audio gets out of it, so there must be more.

The audio quality at 16bits/16kHz is very bad. By a brief look at the code I can't see whether it is 16bits for L and 16bits for R or if it's just 16bits for both L and R.

  • Hi,

    Can you please elaborate more on what issue you are facing.

    If you are trying to change the sampling rate of the audio, there is one another thread on E2E : e2e.ti.com/.../1636995


    Thanks and Regards,
    Praveen
  • Sorry, the link you provided is not available.

    Moreover I would like to know if anyone has an example of how different bit depths can be implemented. Currently the demo only supports 16 bit.

    Regards

  • Hi Leonardo,


    1. Add below code lines in AudioCodecConfig() after “if(bitClk == 512000)”

    else if(bitClk == 1536000 || bitClk == 1411200)
    {
    AudioCodecPageSelect(TI3254_PAGE_0);

    AudioCodecRegWrite(TI3254_CLK_MUX_REG, 0x03); // PLL Clock is CODEC_CLKIN
    AudioCodecRegWrite(TI3254_CLK_PLL_P_R_REG, 0x91); // PLL is powered up, P=1, R=1
    AudioCodecRegWrite(TI3254_CLK_PLL_J_REG, 0x38); // J=56
    AudioCodecRegWrite(TI3254_CLK_PLL_D_MSB_REG, 0x00); // D = 0

    AudioCodecRegWrite(TI3254_CLK_NDAC_REG, 0x82); // NDAC divider powered up, NDAC = 2
    AudioCodecRegWrite(TI3254_CLK_MDAC_REG, 0x87); // MDAC divider powered up, MDAC = 7
    AudioCodecRegWrite(TI3254_DAC_OSR_MSB_REG, 0x00); // DOSR = 0x0080 =
    AudioCodecRegWrite(TI3254_DAC_OSR_LSB_REG, 0x80); // DOSR = 0x0080 = 128

    AudioCodecRegWrite(TI3254_CLK_NADC_REG, 0x82); // NADC divider powered up, NADC = 2
    AudioCodecRegWrite(TI3254_CLK_MADC_REG, 0x87); // MADC divider powered up, MADC = 7
    AudioCodecRegWrite(TI3254_ADC_OSR_REG, 0x80); // AOSR = 128 ((Use with PRB_R1 to PRB_R6, ADC Filter Type A)
    }

    2. In AudioCaptureRendererConfigure() replace 512000 with 1411200 or 1536000
    3. In main.c pass 44100 or 48000 in place of 16000 as argument for AudioCodecConfig()
    4. In main.c pass 44100 or 48000 in place of 16000 as argument for AudioCaptureRendererConfigure()


    Regards,
    Aashish
  • Hi Aashish,

    apparently there is something wrong in this. AFter doing such setup sl_Start will hang in some SPI communication with the NWP. In fact, the debugger will stop in some functions like spi_Read_CPU (cc_pal.c) or SPIWordCountSet (spi.c).

    Maybe the operations you suggest also changes something in the SPI between the ARM and the NWP?

    Regards

  • Hi Leonardo,


    Above settings are not related to SPI. It should not change behavior of SPI. Please review the code may be issue reside some where else.


    Regards,
    Aashish