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.

TLV320AIC3268: miniDSP I2C interface configuration

Part Number: TLV320AIC3268

Hi,

I am using AIC3268 miniDSP to create a stereo multiplexer component for mux select.

There are 3 stereo channel inputs and one stereo channel output in the mux.

The below is mux properties in the PurePath Studio GDE:

Component Interface 1            {Coef=0x1B}

DSPCoefBlockStartAddr         0x1B

DSPCoefBlockStartLeng         0x1

I2CBook                                     0x50

I2CPage                                     0x1

I2CRegister                               0x74

I have some questions about  I2C interface of mux:

(1)  In the "help" document of stereo multiplexer component, there are a Configurable Properties(Run Time):  MuxSelect

How could I modify this properties(select input channel : 1 or 2 or 3) in our kernel driver?

I have tried to read the MuxSelect property via I2C interface as below:

aic326x_codec_read[0x500174]: book 80, page 1, offset 0x74, value 0

aic326x_codec_read[0x500175]: book 80, page 1, offset 0x75, value 0

aic326x_codec_read[0x500176]: book 80, page 1, offset 0x76, value 3

3 shows the default input channel of the mux,  why it is in offset 0x76?  0x74 is MSB, 0x76 is LSB? The register size of miniDSP is not 4 Bytes(0x74 0x75 0x76 0x77)?

(2) How could I write the register of miniDSP via I2C interface ?

Are there any examples or document?

Thanks!

BR,

Steven

  • Hi, Steven,

    The process you followed to read the coefficient of the MUX block is correct, but there are a couple considerations to take into account.

    The MUX selection  is stored as a coefficient type of data, which has a length of 3-bytes stored in a 4-byte slot register, where the LSB is located on the third slot. That's why the value read for the MUX is stored in register 0x76.

    The dynamic change of the miniDSP coefficients is possible, this operation mode is called adaptive mode. When Adaptive mode is used, the miniDSP coefficient memory is divided in two banks, one will have access to the miniDSP while the other to the control interface. Basically, this mode allows the user to write an instruction through the control interface into a bank of the coefficient memory, while the miniDSP is accessing the other bank. Then, it is possible to swap between the coefficient memories so the miniDSP will have access to the new instruction. Please refer to this app note for detailed information about this.

    A basic list of steps to update the require coefficient would be as follows:

    1. Change the desired coefficient registers.
    2. Read DAC/ADC Adaptive Coefficient Configuration Register and make sure the adaptive mode is enabled (in PPS, this should be default).
    3. Execute the swap of the coefficient banks (write a 1 to bit 0).
    4. Wait until the bit 0 is cleared, this indicates the banks have been swapped.
    5. Change the desired coefficient to keep the same value on both banks.

    Regards,

    -Diego Meléndez López
    Audio Applications Engineer

  • Hi Diego,
    Very thanks for your support.
    Another question:
    All coefficient type of data have a length of 3-bytes?
    Where could I find this length defined?

    Thanks again!
    BR,
    Steven
  • Hi, Steven,

    The AIC3268 has a miniDSP with 24-bit C-RAM memory, which means the coefficients will have a 24-bit data size.

    Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer

  • Hi Diego,
    Thank very much!
    I could use amixer utilty to set DSP coefficient dynamically.
    Last question:
    I change the desired coefficient on both buffer as you mentioned.
    In step 4
    4. Wait until the bit 0 is cleared, this indicates the banks have been swapped.

    How long does the banks have been swapped?
    For protection, I would add time out while wait for ready. It should swap quickly, right?

    Thanks
  • Hi, Steven,

    After the swap command is executed, the coefficient bank will switch at the next start of a sampling period. For example, with a 48KHz sampling rate, the maximum time it would take to complete the swap will be about 20.8µs.

    Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer