Hello,
I am integrating the audio codec TLV320AIC3120 into a custom IMX8MP board. I have the device integrated into the Linux device tree. But when I try to play a 48kHz audio file, I get an error that says the TX rate cannot be derived, 1411200 Hz, which is 44.1kHz * 2 * 16 for the bit clock.
I'm not sure why its selecting 44.1kHz when the audio file is 48kHz. See the output and pertinent device tree sections below:
root@nitrogen8mp:~# aplay -r 48000 piano2.wav
[ 856.378182] fsl-sai 30c30000.sai: failed to derive required Tx rate: 1411200
[ 856.385276] fsl-sai 30c30000.sai: ASoC: error at snd_soc_dai_hw_params on 30c30000.sai: -22
[ 856.393670] HiFi: ASoC: error at __soc_pcm_hw_params on HiFi: -22
ALSA lib /usr/src/debug/alsa-lib/1.2.8-r0/src/pcm/pcm_direct.c:1336:(snd1_pcm_direct_initialize_slave) unable to install hw params
ALSA lib /usr/src/debug/alsa-lib/1.2.8-r0/src/pcm/pcm_dmix.c:1011:(snd_pcm_dmix_open) unable to initialize slave
sound-tlv320aic31xx {
compatible = "fsl,imx-audio-tlv320aic31xx";
model = "tlv320aic31xx-hifi";
/*audio-cpu = <&sai3>;*/
audio-cpu = <&sai3>;
audio-codec = <&tlv320aic31xx>;
/*audio-asrc=<&easrc>; */
audio-routing =
"Ext Spk", "SPL",
"Ext Spk", "SPR";
mclk-id = <PLL_CLKIN_BCLK>;
};
tlv320aic31xx: audio-codec@18 {
compatible = "ti,tlv320dac3101";
pinctrl-names = "default";
reg = <0x18>;
#sound-dai-cells = <0>;
HPVDD-supply = <®ulator_3p3v>;
SPRVDD-supply = <®ulator_5p0v>;
SPLVDD-supply = <®ulator_5p0v>;
AVDD-supply = <®ulator_3p3v>;
IOVDD-supply = <®ulator_1p8v>;
DVDD-supply = <®ulator_1p8v>;
clocks = <&clk IMX8MP_CLK_SAI3>;
/*reset-gpios = <&mcp23018 4 (GPIO_ACTIVE_LOW)>;*/
/*ai31xx-micbias-vg = <MICBIAS_AVDDV>;*/
};
&sai3 {
assigned-clocks = <&clk IMX8MP_CLK_SAI3>;
assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
/*assigned-clock-rates = <12288000>;*/
assigned-clock-rates = <24576000>;
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";
fsl,sai-mclk-direction-output;
};
Hi @bbbergan ,
Did you get any lead? I get same problem.
Thanks,
Ajita
Hi bbbargen Do you get the solution of this problem?
Please add the following in &sai3
status = "okay";