Other Parts Discussed in Thread: TLV320AIC3120EVM-U
Hi ,
I am working on L5.4.70 kernel on i.MX8 M Mini processor . We are using tlv320dac100 codec module.
when I gave : aplay -l
Hardware device listed successfully -->
*** List of PLAYBACK Hardware Devices ***
card 0: imxspdif [imx-spdif], device 0: S/PDIF PCM snd-soc-dummy-dai-0 [S/PDIF PCM snd-soc-dummy-dai-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Output [Audio Output], device 0: 30050000.sai-tlv320dac31xx-hifi tlv320dac31xx-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
When I am trying to play audio[earphone ] with
aplay -D plughw:1,0 /unit_tests/Audio/sample_22_frames.mp3
I am getting following error :
root@iWave-G39H:~# aplay -D plughw:1,0 /unit_tests/Audio/sample_22_frames.mp3
Playing raw data '/unit_tests/Audio/sample_22_frames.mp3' : Unsigned 8 bit, Rate 8000 Hz, Mono
[ 3483.772935] tlv320aic31xx-codec 1-0018: aic31xx_set_dai_sysclk: Unsupported frequency 208000
[ 3483.785232] asoc-simple-card sound-tlv320dac31: ASoC: machine hw_params failed: -22
aplay: set_params:1403:
Unable to install hw params:
ACCESS: RW_INTERLEAVED
FORMAT: U8 SUBFORMAT: STD
SAMPLE_BITS: 8 FRAME_BITS: 8
CHANNELS: 1
RATE: 8000
PERIOD_TIME: 125000
PERIOD_SIZE: 1000
PERIOD_BYTES: 1000
PERIODS: 4
BUFFER_TIME: 500000
BUFFER_SIZE: 4000
BUFFER_BYTES: 4000
TICK_TIME: 0
[ 3483.946043] tlv320aic31xx-codec 1-0018: aic31xx_set_dai_sysclk: Unsupported frequency 0
Here I attached my dts tree ,
/ TLV amplifier /
sound-tlv320dac31 {
compatible = "simple-audio-card";
simple-audio-card,name = "Audio Output";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&sound_codec>;
simple-audio-card,frame-master = <&sound_codec>;
/*simple-audio-card,mclk-fs=<256>;*/
simple-audio-card,widgets =
"Headphone", "Headphone Jack";
simple-audio-card,routing =
"Headphone Jack", "HPL",
"Headphone Jack", "HPR";
/* simple-audio-card,aux-devs = <&hpa1>;* /
simple-audio-card,cpu {
sound-dai = <&sai5>;
};
sound_codec: simple-audio-card,codec {
sound-dai = <&codec>;
/*clocks = <&clk IMX8MM_CLK_SAI5_ROOT>;*/
system-clock-frequency=<12000000>;
};
};
&sai5 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai5>;
assigned-clocks = <&clk IMX8MM_CLK_SAI5>;
assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
assigned-clock-rates = <12000000>;
clocks = <&clk IMX8MM_CLK_SAI5_IPG>, <&clk IMX8MM_CLK_DUMMY>,
<&clk IMX8MM_CLK_SAI5_ROOT>, <&clk IMX8MM_CLK_DUMMY>,
<&clk IMX8MM_CLK_DUMMY>, <&clk IMX8MM_AUDIO_PLL1_OUT>,
<&clk IMX8MM_AUDIO_PLL2_OUT>;
clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k";
status = "okay";
};
codec: codec@18 {
compatible = "ti,tlv320dac3100";
pinctrl-names = "default";
/*pinctrl-0 = <&pinctrl_codec>;*/
reg = <0x18>;
#sound-dai-cells = <0>;
HPVDD-supply = <®_3p3v>;
SPRVDD-supply = <®_3p3v>;
SPLVDD-supply = <®_3p3v>;
AVDD-supply = <®_3p3v>;
IOVDD-supply = <®_3p3v>;
DVDD-supply = <®_1p8v>;
/*gpio-reset = <&gpio1 6 GPIO_ACTIVE_LOW>;*/ /* configured in the hardware */
status = "okay";
};
pinctrl_sai5: sai5grp { / SAI5: IOMUX Pin Configuration /
fsl,pins = <
MX8MM_IOMUXC_SAI5_MCLK_SAI5_MCLK 0xd6
MX8MM_IOMUXC_SAI5_RXD2_SAI5_TX_BCLK 0xd6
MX8MM_IOMUXC_SAI5_RXD1_SAI5_TX_SYNC 0xd6
MX8MM_IOMUXC_SAI5_RXD3_SAI5_TX_DATA0 0xd6
MX8MM_IOMUXC_SAI5_RXD0_SAI5_RX_DATA0 0xd6
>;
};
Here is some dmesg print
dmesg | grep tlv
[ 3.676843] asoc-simple-card sound-tlv320dac31: tlv320dac31xx-hifi <-> 30050000.sai mapping ok
[ 3.689218] asoc-simple-card sound-tlv320dac31: ASoC: no DMI vendor name!
root@iWave-G39H:~# dmesg | grep sai
[ 3.663954] debugfs: Directory '30050000.sai' with parent 'Audio Output' already present!
Anything I am missing out in dts tree, why I am getting hardware parameter failed and unsupported frequency error. Please help me in resolving this error
Thanks in advance,
Regards,
Deeksha