I am developing linux kernel based on the stm32mp157 chip. I need to interface sound driver tlv320aic23. In this case the protocol is SAI (serial audio interface). I have modified my device tree and and when I run the linux kernel I can see that audio card has been found. But when I play a sound I do not hear anything. Does anyone have any idea what could be the possible reason? Any kind of hints would be really helpful. Thanks in advance.
Changes in the device tree as follows:
sound: sound {
compatible = "simple-audio-card";
label = "Sound-Card";
simple-audio-card,format = "i2s";
simple-audio-card,mclk-fs = <256>;
simple-audio-card,bitclock-master = <&dailink0_master>;
simple-audio-card,frame-master = <&dailink0_master>;
simple-audio-card,widgets =
"Line", "Line In",
"Line", "Line Out";
simple-audio-card,routing =
"Line Out", "LOUT",
"Line Out", "ROUT",
"LLINEIN", "Line In",
"RLINEIN", "Line In";
status = "okay";
simple-audio-card,cpu {
sound-dai = <&sai1a 0>;
};
dailink0_master: simple-audio-card,codec {
sound-dai = <&tlv320aic_codec>;
clocks = <&rcc SAI1_K>;
system-clock-frequency = <&sai1a>;
system-clock-direction-out = "out";
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <32>;
};
};
&i2c1 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2c1_pins_c>;
pinctrl-1 = <&i2c1_pins_sleep_c>;
#address-cells = <1>;
#size-cells = <0>;
i2c-scl-rising-time-ns = <100>;
i2c-scl-falling-time-ns = <7>;
status = "okay";
tlv320aic_codec:tlv320aic23@1b {
compatible = "ti,tlv320aic23";
reg = <0x1b>;
#address-cells = <1>;
#size-cells = <0>;
#sound-dai-cells= <0>;
clocks = <&sai1a>;
clock-names = "mclk";
status = "okay";
};
};
&sai1{
clocks = <&rcc SAI1>, <&rcc PLL3_R>, <&rcc PLL3_R>;
clock-names = "pclk", "x8k", "x11k";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&sai1a_pins_mx>;
pinctrl-1 = <&sai1a_sleep_pins_mx>;
status = "okay";
sai1a:audio-controller@4400a004{
#clock-cells = <0>;
clocks = <&rcc SAI1_K>;
clock-names = "sai_ck";
dma-names = "tx";
status = "okay";
};
};