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.

TLV320AIC3254: PurePath Studio problem changing volume over I2C

Part Number: TLV320AIC3254
Other Parts Discussed in Thread: CC3235MODSF, , CC3235SF

Hello,

We have a communications module design  using a CC3235MODSF MCU to control a TLV320AIC3254 codec, with software based on the CC3235 i2secho example.

We are using PurePath Studio to program the mini DSP to provide a vox capability. The vox capability works, but we are no longer able to adjust the audio volume / gain - it remains set at whatever volume we initialise it at.

We have tried using the volume control code from the i2secho example, and also tried adjusting the HPL / HPR driver gain. Finally we have tried to set the volume coefficient usingt he settings from the component interface overview in Pure Path Studio with the same end result:

//Set volume coefficient - registers as per Component Interface Overview
AudioCodec_regWrite(0x00,0x2C );
AudioCodec_regWrite(0x30,0x00 );
AudioCodec_regWrite(0x31,0x7F );
AudioCodec_regWrite(0x32,0xB2 );
AudioCodec_regWrite(0x33,0x60 );

Please can someone advise -  I suspect we are misisng something obvious.

Many Thanks

Chris

vox test no i2s in.pfw

  • Hi,

    I used your flow and is able to change the volume bar and sound at the output is coming out correct as well.

    On your volume coefficient, you should write the following format: MSB is in base Register 0 and so on.:

    //Set volume coefficient - registers as per Component Interface Overview
    AudioCodec_regWrite(0x00,0x2C );
    AudioCodec_regWrite(0x30,0x7F );
    AudioCodec_regWrite(0x31,0xB2 );
    AudioCodec_regWrite(0x32,0x60 );
    AudioCodec_regWrite(0x33,0x00 );

    Regards.

  • Hi,

    Thanks for your help - unfortunately this did not resolve our issue.

    If I run the process flow in PurePath Studio connected to an EVM-K board I can adjust the volume slider and the output volume varies as expected, however with our application running on a CC3235 launchpad with an Audboost BoosterPack the audio volume output just remains constant. Setting the volume I2C registers to a different volume coefficient as above does not change the output audio level?

    Many Thanks

    Chris

  • Hi,

    Can you check the I2C transaction when changing the volume slider, write and read? Are they matching? 

    Regards.

  • Hi,

    Sorry for the delay in responding. The write and read are not matching for this transaction, and I have been trying to work out why.

    I seem to get the same read back regardless of transaction, including for setting the page:

    I2C write value = 0x2C
    I2C read back value = 0x3B
    I2C write value = 0x7F
    I2C read back value = 0x3B
    I2C write value = 0xB2
    I2C read back value = 0x3B
    I2C write value = 0x60
    I2C read back value = 0x3B
    I2C write value = 0x0
    I2C read back value = 0x3B

    I am using the AudioCodec_regWrite method within AudioCodec.c in the i2sEcho example for the CC3235SF for the I2C transactions.

    If I generate the header file in PurePath Studio with the volume control set to maximum I get a high volume output from my application / device, and similarly if I generate the header file with the volume set lower I get a lower volume, so it looks like the volume is being set at initialisation when my application reads the header file and initialises the codec, but then I cannot change it?

    Many Thanks

    Chris

  • Hi,

    This looks like the I2C write transaction was not executed after initialization from the software, you can use a digital serial analyzer like Saleae to probe the I2C lines.

    I'd suggest check with the CC3235SF support team.

    Regards.

  • Hi,

    Thank you for the suggestions. I don't currently have a digital serial analyzer so will look at obtaining one, and I will check with the CC3235SF team.

    Many thanks

    Chris

  • Hi,

    I have ordered an I2C analyzer and am waiting for it to be delivered, and I have posted in the WiFi forum as suggested - I have identified that the i2secho example from the MCU SDK shows the same behaviour with the I2C transaction so is hopefully easy to resolve.

    Reading through application notes and in particular SLAA425D (Coefficient RAM Access Mechanisms) should I be switching buffers after writing the new volume and then writing the volume a second time after the buffer switch?

    Many thanks

    Chris

  • Hi,

    The buffer is for adaptive mode, are you referring to volume in the PPS flow?

    In that case, it's adaptive mode.

    Regards.

  • Hi.

    I have now tested with an I2C analyzer, and it looks to me that the I2C communication is ok and the write transaction is being executed correctly and the correct value is being read back from the registers. Despite this I get an error in the I2C readback - I have updated my thread in the WiFi forum accordingly.

    My understanding is that to adjust the output volume dynamically at runtime using the volume component in my PPS flow I need to write to both buffers, but from other threads on this forum I understand this is not the preferred way to set the volume dynamically?

    With my PPS flow should I still be able to change the output volume dynamically at runtime using the DAC Digital Volume Control registers (page 0 registers 0x41 and 0x42), or is there a better option?

    Many Thanks

    Chris

  • If you are using the volume in PPS, you can change them dynamically on runtime from PPS.

    This is not the same as the DAC digital volume register page 0 register 0x41, but the miniDSP_D registers shown in PPS component interface view below.

    Regards.