The imx8mp configuration i2s slave mode is abnormal

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

The imx8mp configuration i2s slave mode is abnormal

1,159 次查看
yzg
Contributor I

Hello:

I encountered the following problems when recording with imx8mp:

Kernel version: Linux imx8mpevk 5.15.71

I configured sai3 as slave i2s mode. The following is a screenshot of some codes

yzg_0-1694571704027.png

yzg_1-1694571710895.pngyzg_2-1694571717380.pngyzg_3-1694571723316.png

When I execute arecord -f dat > test.wav command, theoretically should record sample rate 48000, but params_rate(params); This kernel interface always returns 44100, the sound I am recording is distorted, I suspect it is partly caused by this, please help to analyze the reason

yzg_4-1694571741041.png

 

标签 (1)
0 项奖励
回复
2 回复数

1,098 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @yzg 

Please check below code in your kernel :

	if (format_is_dsd(params)) {
		/* Use the maximum freq from DSD512 (512*44100 = 22579200) */
		if (!(params_rate(params) % 11025))
			mclk_freq = IMX_CARD_MCLK_22P5792MHZ;
		else
			mclk_freq = IMX_CARD_MCLK_24P576MHZ;
	}
0 项奖励
回复

1,053 次查看
yzg
Contributor I
Hi,
I didn't enter this judgment statement. I'm not in dsd mode
0 项奖励
回复