Skip to content

Commit 699fc6d

Browse files
TomasBarakNXPkartben
authored andcommitted
drivers: i2s: mcux_sai: add MCLK direction control in the initialization
Add support for configuring the master clock (MCLK) direction in the I2S MCUX SAI driver. This allows controlling whether the MCLK pin acts as an input or output based on device tree configuration, improving flexibility when interfacing with external audio codecs. The change leverages the mclk_output property from device tree to properly set the direction of the MCLK pin during initialization. Signed-off-by: Tomas Barak <tomas.barak@nxp.com>
1 parent 0b7527c commit 699fc6d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/i2s/i2s_mcux_sai.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,6 +1124,8 @@ static int i2s_mcux_initialize(const struct device *dev)
11241124
/*clock configuration*/
11251125
audio_clock_settings(dev);
11261126

1127+
enable_mclk_direction(dev, dev_cfg->mclk_output);
1128+
11271129
SAI_Init(base);
11281130

11291131
dev_data->tx.state = I2S_STATE_NOT_READY;

0 commit comments

Comments
 (0)