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.

PCM5122: How to use 16x interpolation

Part Number: PCM5122
Other Parts Discussed in Thread: PUREPATHSTUDIO

Hello,

Because we saw interpolation points on 15Khz with 8 bit interpolation we wanted to increase to 16x interpolation, but we get bad results when we enable it (register 34, bit 4).

Even at 1KHz the results are not as expected

Above tests are done with the PCM5122EVM, defaults loaded with PurePath Console 1.16 (44.1KHz, clock autoconfig).

Are we missing some extra settings that must be done?

Regards,

Jo

  • Hi Jo, 

    You need to do the following steps in order. 

    8.3.4.3.1 Filter Programming Changes The following sequence must be followed to change the ROM program:

    1. Enter Stand-by mode. (Set Page 0, Register 2, D(4))

    2. Change program number. (Set Page 0, Register 43, D(4:0))

    3. Exit Stand-by mode. (Reset Page 0, Register 2, D(4))

    In case you still have problem, please let me know.

    Regards,

    Arash

  • Hi Arash,

    Thanks for your respond!
    I followed that sequence from the beginning, but I tried again to make sure. The issue is not solved.

    Regards,

    Jo 

  • Hi jo,

    Can you try the other interpolations and tell me what you see.  Next,  can you change your clk and sampling rate  and redo it for x8 and x16 interpolations and report back on your finding.

    Also please send me the full register dump of your original x16 fail..

    Thanks.

    Regards,

    Arash

  • Hi Arash,

    I have to make something clear first, I'm not talking about the ROM interpolation filters selectable by register 43 as you mention above. I'm mean the 8x or 16x interpolation selection in register 34 (not 43). In the datasheet this setting is sometimes referred to as interpolation and sometimes referred to as oversampling. This makes it confusing with the ROM interpolation filters.

    According to the following table in the datasheet you can enable 16x interpolation only with 44.1KHz and 48KHz.

    According to the clock schematic a different clock setting for the oversampling ratio clock is selected.

    Here my register dumps:

    PCM5122_8xOversamplingOK.CFG -> default PCM5122EVM working settings loaded by PurePath Console.

    PCM5122_16xOversamplingNOK -> only changed the 16x interpolation settings in register 34, this is causing distortion.

    PCM5122_8xOversamplingOK.CFGPCM5122_16xOversamplingNOK.CFG

    Regards,

    Jo

  • Hi Jo,

    Thanks for clarifying that you changed register 34 not 43 .  I was hoping to get the register dump (read) to see if there is any flag/register showing an issue when  compared with the register dump of normal/good operation. Nevertheless, I compared both register writes  you sent and the only difference as you mentioned is in that register. Maybe the register "read" comparison would show a non fatal  flag and gives us the clue.

    I found the following sample codes for different cases  and I suggest you start from one of these small subset of registers and work your way up ( modify as needed)  and once you get it to work you can use it or modify the  register write you sent me. On my end i can try  to find the EVM for it and try it myself but that would be sometime next week. 

    SLACC622_ sample code.zip

    Regards,

    Arash

  • Hi Arash,

    The register config files I posted were register dumps read with PurePath Console:

    I did some more testing and I started from the "Audio-BCK-Slave" example you send to me. This is a 3 wire slave configuration with BCK as PLL source. With 8x oversampling everything works but when I enable 16x oversampling I have the same issue.

    Then I decided to figure out how the clock config works completely and adapted the example for the PCM5122EVM:

    - FS = 44.1KHz

    - I2S slave

    - SCK as PLL source (11.2896 MHz)

    -  To be able to do different adjustments I used manual clock config

    I checked for a workflow how to configure all clocks starting from some basic non changeable parameters like FS but could not find it, all rules are in different places in the datasheet. So I decided to use the Recommended Clock Divider Settings in table 131

    The biggest challenge is that the datasheet is using different names for the same data in the Clock Distribution Tree (fig 63) and the Recommended Clock Divider Settings (Table 131).

    For example:

    Description Clock Distribution Tree Recommended Clock Divider Settings
    DAC Clock DACCK MOD F
    DSP Clock Divider DDSP NMAC
    DAC Clock Divider DDAC NDAC
    ...

    But I figured it out and made a configuration:

    Also this configuration works in 8x oversampling, but the issue remains in 16x oversampling. Most things became more clear now, like the relation between FS and DSP clock frequency (IDAC). If you adjust one thing you also have to check other things.

    So I think that you also need to adjust another setting when enabling 16x oversampling but I can't find what it is, I tried adjusting DAC clock, DSP clock, IDAC, ...

    Here the register dump of my current config with 8x oversampling:

    PCM5122_ManClock.CFG

    Hope you have some time to test with an PCM5122EVM this week!

    Thanks,

    Jo

  • Hi Jo,

    You mentioned with the new configuration files also x8 OSR works fine but again x16 doesn't. In order to see what other registers might need to be changed, please try to do x4 OSR and compare all the register changes from x8 to x4 -so you can identify all the registers that are changed. 

    You mentioned you are using PurePath Console 1.16 , and as  I was  looking into the datasheet it says the part  can be programmed using either CodecControl software or PurePath Studio. I don't have the EVM in my possession to test it so you should test  it with CodecControl or PurepathStudio, in case it is the software limitation or bug. 

    8.3.4.1.2 Software

    Software development for the PCM512x is supported through TI's comprehensive PurePath Studio Development Environment; a powerful, easy-to-use tool designed specifically to simplify software development on the PCM512x audio platform. The Graphical Development Environment consists of a library of common audio functions that can be dragged-and-dropped into an audio signal flow and graphically connected together. The DSP code can then be assembled from the graphical signal flow with the click of a mouse. Please visit the PCM512x product folder on www.ti.com to learn more about PurePath Studio and the latest status on available, ready-to-use DSP algorithm.

    Regards,

    Arash

  • Hi Arash,

    The oversampling is not a real selectable option, it's depends on the sampling frequency, only with 8,16,32,44.1 and 48KHz there is the option to select 8x or 16x. It would be better to see the option as an oversampling doubler, and it's that double oversampling I want to use.

    I'm starting to think that 384KHz is the max oversampling frequency and that 16x oversampling is not possible at 44.1 or 48KHz. In above table 8 you see the oversampling with a specific sampling rate:

    FS = 384KHz -> 1x oversampling -> 384KHz oversampling

    FS = 192KHz -> 2x oversampling -> 384KHz oversampling

    FS = 96KHz -> 4x oversampling -> 384 KHz oversampling

    FS = 48KHz -> 8x oversampling -> 384 KHz oversampling

    FS = 48KHz -> 16x oversampling -> 768 KHz oversampling

    FS = 16KHz -> 16x oversampling -> 384 KHz oversampling

    But I still hope I'm making some mistake and the datasheet is correct.

    There are indeed multiple software applications to control the EVM, but they all have they're specific function:

    PurePath Studio: As the datasheet mentions it is used to control the Audio Processing. It gives you control over the built in ROM defined DSP block's.

    The hardware registers (I2S, PLL, ...) will be loaded with some default values that work with the EVM and will not let you control them. So no control over the 16x oversampling.

    PurePath Console: Gives you control over the hardware registers and no control over the ROM defined DSP block's. You have full control over all registers, so there can't be a limitation or bug.

       

    We have no interest in using the internal ROM defined DSP block's, we only want to use it as a simple DAC. That's why we use PurePath Console to find the best configuration of all hardware registers like I2S, PLL, ... and 16x oversampling.

    See this thread where they also use PurePath Console with a PCM5122EVM:

    https://e2e.ti.com/support/audio-group/audio/f/audio-forum/593600/pcm5122evm-u-issue-connecting-with-purepath-studio-and-purepath-console

    Hope you can help me out!

    Regards,

    Jo

  • Hi Jo, I understand why you are using PPC1 . In general we would like to stay with the  suggested software in datasheet and user's guide

     I don't think datasheet is in error to specify x8 and x16 for 48KHz, and  from your table, clearly you are hitting a limit with 768kHz. The only other suggestion that I can give you, if you have not done it already,  is to increase the speed of external clks and see the effect.

    Regards,

    Arash