Syncing Dual AK5554VN Codecs on Custom IMX8MN Board with Yocto Linux 5.15

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Syncing Dual AK5554VN Codecs on Custom IMX8MN Board with Yocto Linux 5.15

341 Views
evancornell
Contributor III

Hi everyone,

I'm working on a custom IMX8MN board setup and facing a synchronization challenge with two AK5554VN codecs. I'm running Yocto Linux 5.15 and need some guidance to resolve this issue.

Setup Details:
Codecs: Two AK5554VN codecs

Connection:
Codec 1: Connected to SAI5 (Master)
Codec 2: Connected to SAI2 (Slave to SAI5's clocks - externally connected from SAI5 to SAI2)

Objective: I aim to achieve synchronized data reception from both codecs.

Current Process:
According to the AK5554VN datasheet, syncing two devices involves:

  • Disabling the MCLK
  • Releasing both from reset
  • Programming the codec registers via I2C bus for desired operation parameters
  • Starting the MCLK

Here is what I see happening in the Drivers:

  • MCLKs are stopped
  • SAI2 is released from PDN and programmed
  • SAI5 is released from PDN
  • codec I2C registers are programmed (except for register 0 controlling channel power-on)
  • Codec1 Register 0 is programmed enabling channels
  • MCLK is released
  • Finally, codec0 Register 0 is programmed enabling channels

Issue Encountered: There's a slight delay in data where SAI2 data leads SAI5 data by about 8 samples. See  scope shot showing the final Codec0 Register0 i2c transaction occurring after MCLK startup:

tek00001.png

Key Question: How can I ensure that codec0 Register 0 is programmed before the MCLK startup to achieve perfect synchronization?

Any insights or suggestions would be greatly appreciated. Thank you in advance for your help!

Labels (1)
0 Kudos
Reply
1 Reply

292 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello, I hope you are doing well.

We do not have an application with that specific configuration but, as you mention, the behavior of your application could be caused by the driver. Maybe you can ensure a specific value on codec0 Register 0 before the MCLK startup, modifying you driver to write on it.

Also, maybe this thread could be helpful.

Best regards.

0 Kudos
Reply