Hikey 960 Audio codec interfacing : i2S 0 in slave mode

I am working on Audio codec interfacing with hikey960 and facing some issue with slave mode configuration in hikey 960. I could not find any specific code related to slave mode configuration. Actually I want to connect an external audio codec (Analog Device Eval- AD1777z ) to i2s0 of hikey960 through the low speed expansion connector. By default hikey 960 is in master mode. I want to change this master mode to slave mode and use Codec clocks as Bitclock and LRclock.

Can anybody help me to come out from this issue?

Hi @sreerag,

You might want to check this post: How to make I2S0(on LF connector) a PCM slave? where @doitright shared some tips for setting I2S0 in slave mode.

Thanks,
Mani

This switch statement presumably chooses between master and slave mode;
https://android.googlesource.com/kernel/hikey-linaro/+/refs/heads/android-hikey-linaro-4.9/sound/soc/hisilicon/hisi-i2s.c#101

Read the documentation on simple-card or whatever machine driver you are using to see how to configure the device tree to set your codec to master.
https://www.kernel.org/doc/Documentation/devicetree/bindings/sound/simple-card.txt

Be aware that I have NOT tested the hikey960 in slave mode, so I cannot confirm if it actually works.