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.

PCM5121: Changing coefficient while in DAC running

Guru 16770 points
Part Number: PCM5121
Other Parts Discussed in Thread: PCM5122

Hi

As the customer use case, changing cut off frequency of LPF (Butterworth2) while in DAC running is considered.

There are some questions as follows.

I would appreciate if you could answer them. 

[1]

A CRAMA/B and coefficient buffer-A/B are the same thing.

Is it correct?

 

[2]

Does the page structure of CRAM A correspond to that of CRAM B?

 

(e.g. Page 44(CRAMA) <-> Page 62(CRAMB), Page 45(CRAMA) <-> Page 63(CRAMB), …)

 

[3]

Is following understanding correct?

 

In adaptive mode:

CRAM A : I2C is accessible only in standby mode and DSP is accessible only in run state.

CRAM B : I2C is accessible only in run state and DSP is accessible only in standby mode.

 

Not in adaptive mode:

Both CRAM A and B are accessible only in I2C in standby mode.  None of CRAM is accessible from I2C in run state.

 

[4]

If cutoff of LPF is changed by I2C while in run state, should we need to switch active CRAM from CRAM A to CRAM B using ACSW bit before I2C access?

Please tell us if there is recommended procedure.

BestRegards

  • Hi Usui-san,

    Sorry for the delay in getting back to you on this.  I needed to confirm some behavior in the lab before I felt I could give a correct answer.  

    1.  CRAM A and CRAM B do not have to be the same.  By default, PurePath Studio generates both A and B coefficients to be the same so swapping the coefficients by writing to Page 44 register 1 bit 0 does not have an effect.  You can chose to write different coefficients to each CRAM and then swap dynamically while the DAC is in operation (while in adaptive mode). 

    2.  The structure of CRAM A and B are same, as you have pointed out.  For example coefficient 10 has the same function as coefficient 266.  

    3+4.  Your understanding is not correct.  When in adaptive mode, you can switch the CRAM that the DSP is using dynamically.  For example: if you are in adaptive mode, ACRS (Active CRAM Selection indicator) will say which CRAM is being used by the DSP and is inaccessible over I2C.  If you write to ACSW (Switch Active CRAM request), the DSP will switch to the other CRAM, and the first CRAM will now be available.   

    The primary use case for this is:

    Enter Standby

    Enter Adaptive Mode

    Write Coefficients to CRAM A and/or B

    Exit Standby

    *at this point the DSP will be using CRAM A. CRAM B is available to the I2C bus.

    Modify CRAM B with the new coefficient values

    Write to ACSW

    *now the DSP is using CRAM B. CRAM A is now available to I2C bus.

    During this switch the output did not need to stop playing audio, though you might have audible glitches as the coefficients changed immediately.

    Thanks!

    Paul

  • Hi Frost-san

    Thank you for your reply.

    Regarding to question 1 and 2, I apologize my questions were obscure.

    1. Are the CRAM_A and Buffer A same meaning?

    2. Do you mean coefficient 266 is coefficient 10 on CRAMB?

    BestRegards
  • Hi Usui-san,

    1. The coefficients are mapped the same way for both CRAM A and B. See table 51 and 52 on the PCM5122 datasheet.
    2. Pure path studio numbers the coefficients from 0 to 511, when really they should be CRAMA:0-255, CRAMB:0-255. What I am trying to convey is that DSP will use the two CRAMs in the same way.

    Thanks!
    Paul
  • Hi Frost-san

    Thank you for your reply.

    Let me confirm following answer.

    "During this switch the output did not need to stop playing audio, though you might have audible glitches as the coefficients changed immediately."

    What kind of thing is "audible glitches"? Pop noise?
    Is it phenomenon to be happened when changing specific coefficient number?

    BestRegards
  • Hi Usui-san,

    I do not think the output will pop, I just mean to say that depending on how dramatic the coefficient change is you could hear some undesired output changes. For example, if you introduce a very different flow like switching a low pass filter to high pass filter.  If you are just modifying some filter cutoff values you should be fine. 

    Thanks!

    Paul