Hi All,
I need to enable i2s2 (sai2) for some testing. I am trying to use linux dummy audio codec to enable the i2s output for testing purpose. Here are my device tree additions. The code compiles fine and board also boots fine. There is no error in dmesg. But the dummy audio card is not visible in the system.
dummycodec: simple-audio-card,codec {
compatible = "linux,snd-soc-dummy";
status = "okay";
#sound-dai-cells = <0>;
clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
clock-names = "mclk";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai2_mclk>;
assigned-clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_SRC>,
<&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
assigned-clock-parents = <&clks IMX7D_PLL_AUDIO_POST_DIV>;
assigned-clock-rates = <0>, <12288000>;
};
sound-dummy {
model = "snd-soc-dummy";
compatible = "simple-audio-card";
status = "okay";
simple-audio-card,name = "snddaudio_dummy";
simple-audio-card,format = "i2s";
simple-audio-card,widgets = "Speaker", "Speakers";
simple-audio-card,routing = "Speakers", "Speaker";
simple-audio-card,frame-master = <&dummycodec>;
simple-audio-card,bitclock-master = <&dummycodec>;
cpu-dai = <&sai2>;
audio-codec = <&dummycodec>;
codec-master;
};
&sai2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai2>;
assigned-clocks = <&clks IMX7D_SAI2_ROOT_SRC>,
<&clks IMX7D_SAI2_ROOT_CLK>;
assigned-clock-parents = <&clks IMX7D_PLL_AUDIO_POST_DIV>;
assigned-clock-rates = <0>, <36864000>;
status = "okay";
};