TLV320AIC3101 Codec, integrating with Imx8mp Failed to derive required Rx rate: 1411200

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

TLV320AIC3101 Codec, integrating with Imx8mp Failed to derive required Rx rate: 1411200

559 Views
MJD
Contributor II

Hi @nxp
we are trying to integrate TLV320AIC3101 codec and we are able to listen only over 48000 sample rate audios but when we play 44100 sample rate or any other we are facing with the bellow error.

30c30000.sai-tlv320aic3x-hifi: ASoC: error at __soc_pcm_hw_params on 30c30000.sai-tlv320aic3x-hifi: -22
[ 698.132054] fsl-sai 30c30000.sai: failed to derive required Rx rate: 1411200
[ 698.139126] fsl-sai 30c30000.sai: ASoC: error at snd_soc_dai_hw_params on 30c30000.sai: -22
[ 698.147520] 30c30000.sai-tlv320aic3x-hifi: ASoC: error at __soc_pcm_hw_params on 30c30000.sai-tlv320aic3x-hifi: -22
[ 698.158187] fsl-sai 30c30000.sai: failed to derive required Rx rate: 1411200

Below is our DTS configuration 
 sound-tlv320aic310x {
153 compatible = "simple-audio-card";
154 simple-audio-card,name = "sound-tlv320aic310x";
155 simple-audio-card,format = "i2s";
156 simple-audio-card,bitclock-master = <&cpudai2>;
157 simple-audio-card,frame-master = <&cpudai2>;
158 /*simple-audio-card,mclk-fs = <32>;*/
159 simple-audio-card,widgets =
160 "Microphone", "Microphone Jack",
161 "Line", "Line In Jack",
162 "Line", "Line Out Jack",
163 "Headphone", "Headphone Jack",
164 "Speaker", "Speaker External",
165 "Line", "POTS Line In",
166 "Line", "External Mic";
167 simple-audio-card,routing =
168 "Headphone Jack", "HPLOUT",
169 "Headphone Jack", "HPROUT",
170 "LINE2R", "POTS Line In",
171 "Line Out Jack", "LLOUT",
172 "Line Out Jack", "RLOUT";
173
174 cpudai2:simple-audio-card,cpu {
175 sound-dai = <&sai3>;
176 clocks = <&clk IMX8MP_CLK_SAI3_ROOT>;
177 dai-tdm-slot-num = <2>;
178 dai-tdm-slot-width = <32>;
179 };
180 simple-audio-card,codec {
181 sound-dai = <&codec>;
182 /*clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIO_BLK_CTRL_SAI3_MCLK1>; */
183 clocks = <&clk IMX8MP_CLK_SAI3_ROOT>;
184 };
185 };
codec: codec@18 {
720 #sound-dai-cells=<0>;
721 pinctrl-names = "default";
722 pinctrl-0 = <&pinctrl_tlv320>;
723 compatible = "ti,tlv320aic3x";
724 reg = <0x18>;
725 reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
726 ai31xx-micbias-vg = <MICBIAS_2_0V>;
727 IOVDD-supply = <&buck5>;
728 DVDD-supply = <&buck5>;
729 AVDD-supply = <&buck4>;
730 DRVDD-supply = <&buck4>;
731 };


687&sai3 {
891 #sound-dai-cells = <0>;
892 pinctrl-names = "default";
893 pinctrl-0 = <&pinctrl_sai3>;
894 assigned-clocks = <&clk IMX8MP_CLK_SAI3>;
895 assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
896 assigned-clock-rates = <12288000>;
897 clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIO_BLK_CTRL_SAI3_IPG>, <&clk IMX8MP_CLK_DUMMY>,
898 <&audio_blk_ctrl IMX8MP_CLK_AUDIO_BLK_CTRL_SAI3_MCLK1>, <&clk IMX8MP_CLK_DUMMY>,
899 <&clk IMX8MP_CLK_DUMMY>, <&clk IMX8MP_AUDIO_PLL1_OUT>, <&clk IMX8MP_AUDIO_PLL2_OUT>;
900 clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k";
901 fsl,sai-mclk-direction-output;
902 status = "okay";
903 };
pinctrl_tlv320: tlv320grp {
1240 fsl,pins = <
1241 MX8MP_IOMUXC_GPIO1_IO10__GPIO1_IO10 0x00
1242 >;
1243 };
1244
1245
1246 pinctrl_sai3: sai3grp {
1247 fsl,pins = <
1248 MX8MP_IOMUXC_SAI3_TXFS__AUDIOMIX_SAI3_TX_SYNC 0xd6
1249 MX8MP_IOMUXC_SAI3_TXC__AUDIOMIX_SAI3_TX_BCLK 0xd6
1250 MX8MP_IOMUXC_SAI3_RXD__AUDIOMIX_SAI3_RX_DATA00 0xd6
1251 MX8MP_IOMUXC_SAI3_TXD__AUDIOMIX_SAI3_TX_DATA00 0xd6
1252 MX8MP_IOMUXC_SAI3_MCLK__AUDIOMIX_SAI3_MCLK 0xd6
1253 MX8MP_IOMUXC_SAI3_RXFS__GPIO4_IO28 0xd6
1254 MX8MP_IOMUXC_SAI3_RXC__GPIO4_IO29 0xd6
1255 >;
1256 };

0 Kudos
Reply
2 Replies

517 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

You are getting that error because PLL/prescaler cannot provide requested frequency to play audio at 44.1 KHz sample rate.

If you need to reproduce at that sample rate, maybe you should use an external crystal to provide necessary clock frequency or modify clock driver to provide necessary frequency.

Best regards.

0 Kudos
Reply

514 Views
MJD
Contributor II

Hi @JorgeCas 

Thank you for your response,

Can you please provide, any resolved configuration with this issue as a reference.

And providing external clock is not fissable with our custom board. 

0 Kudos
Reply