IMX8M Plus: Configure SAI MCLK as input for I2S transmission

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

IMX8M Plus: Configure SAI MCLK as input for I2S transmission

跳至解决方案
272 次查看
coulomz
Contributor I

Hello everyone,

I'm trying to configure the SAI MCLK to be an input to the SAI module in order to provide a clock for I2S output transmission signals.

The reference manual for IMX8M plus states that this is possible on chapter 14.1.1.1. However, it is not clear what registers need to be set to enable this functionality, as opposed to the IMX8M mini where the external master clock can be enabled through GPR (e.g. GPR_SAI2_EXT_MCLK_EN). To my understanding, this is different on the IMX8M plus because it uses the Audio Block Control registers.

A fellow NXP technician suggested setting the following:

1. Set the "14.2.3.1.10 SAI2 MCLK SELECT Register" as SPDIF.EXTCLK.

2. Set the "8.2.4.115 SW_MUX_CTL_PAD_SPDIF_EXT_CLK" as ALT0_AUDIOMIX_SPDIF1_EXT_CLK.

3. Set the "14.4.4.1.30 MCLK Control" as MCLK signal pin is an input

in order to provide the mclk through the SPDIF1_EXT_CLK pin.

However, it is still unclear to me where in yocto linux the SAI2 MCLK SELECT Register of audio_blk_ctrl should be set and whether the SPDIF.EXTCLK is capable of working for generating I2S signals.

Thank you

0 项奖励
回复
1 解答
201 次查看
pengyong_zhang
NXP Employee
NXP Employee

Hi @coulomz 

You can use change the relate register value by regmap API in below driver code, 

https://github.com/nxp-imx/linux-imx/blob/fb0f25c8fe6d8ae45bfb24f869ea8c41d35e979a/sound/soc/fsl/fsl...

B.R

在原帖中查看解决方案

0 项奖励
回复
2 回复数
202 次查看
pengyong_zhang
NXP Employee
NXP Employee

Hi @coulomz 

You can use change the relate register value by regmap API in below driver code, 

https://github.com/nxp-imx/linux-imx/blob/fb0f25c8fe6d8ae45bfb24f869ea8c41d35e979a/sound/soc/fsl/fsl...

B.R

0 项奖励
回复
184 次查看
coulomz
Contributor I

Thank you for the support, I was able to configure it as an input through the SAI driver.

0 项奖励
回复