[IMX8MP] How to make BCLK output 12MHz

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

[IMX8MP] How to make BCLK output 12MHz

751件の閲覧回数
petertseng
Contributor IV

The codec does not connect MCLK to the IMX8MP processor.

And the specification of the TLV320AIC3101 allows BCLK to be used as the PLL input instead of MCLK

petertseng_1-1718680615438.png

But how to make BCLK output clock (12MHz) ?

 

The following is my DTS:

&sai3 {
	#sound-dai-cells = <0>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_sai3>;
	assigned-clocks = <&clk IMX8MP_CLK_SAI3>;
	assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
	assigned-clock-rates = <12000000>;
	clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIO_BLK_CTRL_SAI3_IPG>, <&clk IMX8MP_CLK_DUMMY>,
			<&audio_blk_ctrl IMX8MP_CLK_AUDIO_BLK_CTRL_SAI3_MCLK1>, <&clk IMX8MP_CLK_DUMMY>,
			<&clk IMX8MP_CLK_DUMMY>;
	clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";
	status = "okay";
};

	pinctrl_sai3: sai3grp {
		fsl,pins = <
			MX8MP_IOMUXC_NAND_DATA01__AUDIOMIX_SAI3_TX_SYNC		0xd6	/* AUD_TXFS */
			MX8MP_IOMUXC_NAND_ALE__AUDIOMIX_SAI3_TX_BCLK		0xd6	/* AUD_TXC */
			MX8MP_IOMUXC_NAND_CE0_B__AUDIOMIX_SAI3_TX_DATA00	0xd6	/* AUD_TXD */
		>;
	};

 

Thanks in advance,

Best Regards
Peter

0 件の賞賛
返信
6 返答(返信)

618件の閲覧回数
Tdhyapo
Contributor I

After adding my own parameter, this work. thanks

 

0 件の賞賛
返信

600件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

good to hear this, I will close this thread now

0 件の賞賛
返信

727件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

refer to the table imx_pll1443x_tbl in the clock driver, current pll doesn't support 12Mhz, only 12.288Mhz, maybe you need add your own parameter to support this new clock

linux-imx/drivers/clk/imx/clk-pll14xx.c at lf-6.6.y · nxp-imx/linux-imx · GitHub

or maybe you can try to change the 

assigned-clock-parents = <&clk IMX8MP_CLK_24M>;

0 件の賞賛
返信

648件の閲覧回数
petertseng
Contributor IV

Hi joanxie,

Sorry for replying so late.

I am currently using the linux-imx lf-6.1.22-2.0.0 kernel.

https://github.com/nxp-imx/linux-imx/tree/lf-6.1.22-2.0.0

Maybe you could suggest some patches so I can keep up with your version.


Best Regards
Peter

0 件の賞賛
返信

633件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

don't have such patch, just change it by yourself according to my previous suggestion

タグ(1)
0 件の賞賛
返信

403件の閲覧回数
petertseng
Contributor IV

Hi joanxie,

I can now playback 48KHz WAV files, but the following error occurs when playback 44.1KHz.

[   60.932095] fsl-sai 30c30000.sai: failed to derive required Tx rate: 1411200
[   60.939178] fsl-sai 30c30000.sai: ASoC: error at snd_soc_dai_hw_params on 30c30000.sai: -22
[   60.947564]  30c30000.sai-tlv320aic3x-hifi: ASoC: error at __soc_pcm_hw_params on 30c30000.sai-tlv320aic3x-hifi: -22

 

Below is my modified DTS:

&sai3 {
	#sound-dai-cells = <0>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_sai3>;
	assigned-clocks = <&clk IMX8MP_CLK_SAI3>;
	assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
	assigned-clock-rates = <24576000>;
	status = "okay";
};

 

How can I solve this problem of playing 44.1K?


Best Regards
Peter

0 件の賞賛
返信