Hi,
I have the 3 SAI, connected to different devices:
SAI1 --> Codec
SAI2 --> Telit module, GE910
SAI3 --> Telit module, GE910
How do you setup the device tree for a SAI that it is connected directly to another SAI without control?
I think my problem is due to the rooting and widget
[ 3630.791599] asoc-simple-card sound@2: 202c000.sai <-> 202c000.sai mapping ok
[ 3630.798779] asoc-simple-card sound@2: ASoC: no source widget found for SPK_LP
[ 3630.805996] asoc-simple-card sound@2: ASoC: Failed to add route SPK_LP -> direct -> Speaker
[ 3630.814402] asoc-simple-card sound@2: ASoC: no sink widget found for LINPUT1
[ 3630.821490] asoc-simple-card sound@2: ASoC: Failed to add route Mic Jack -> direct -> LINPUT1
[ 3630.830053] asoc-simple-card sound@2: ASoC: no sink widget found for RINPUT1
[ 3630.837117] asoc-simple-card sound@2: ASoC: Failed to add route Mic Jack -> direct -> RINPUT1
Any idea how should look my device tree?
This is what i got so far
codec_test: codec_test {
 compatible = "linux,snd-soc-dummy";
 #sound-dai-cells = <0>;
 status="okay";
 };
 sound0: sound@0 {
 status="okay"
 compatible = "simple-audio-card";
 model = "nau8810-audio";
 simple-audio-card,name = "default";
 simple-audio-card,format = "i2s";
 simple-audio-card,bitclock-master = <&dailink0_master>;
 simple-audio-card,frame-master = <&dailink0_master>;
 simple-audio-card,widgets =
 "Speaker", "Speaker";
 simple-audio-card,routing =
 "Speaker", "Speaker";
simple-audio-card,cpu {
 sound-dai = <&sai1>;
 };
dailink0_master: simple-audio-card,codec {
 sound-dai = <&codec>;
 clocks = <&clks IMX6UL_CLK_SAI1>;
 };
 };
 sound1: sound@1 { 
 status = "okay";
 compatible = "simple-audio-card";
 model = "default";
 simple-audio-card,name = "Modem1";
 simple-audio-card,format = "i2s";
 simple-audio-card,bitclock-master = <&dailink1_master>;
 simple-audio-card,frame-master = <&dailink1_master>;
 simple-audio-card,widgets =
 // "Microphone", "Mic Jack",
 "Speaker", "Speaker";
 simple-audio-card,routing =
 // "Speaker", "SPK_LP",
 // "LINPUT1", "Mic Jack",
 // "RINPUT1", "Mic Jack",
 // "Microphone", "Microphone",
 "Speaker", "Speaker";
simple-audio-card,cpu {
 sound-dai = <&sai3>;
 };
 dailink1_master: simple-audio-card,codec {
 sound-dai = <&codec_test>;
 clocks = <&clks IMX6UL_CLK_SAI3>;
 };
 }; 
 sound2: sound@2 { 
 status = "okay";
 compatible = "simple-audio-card";
 model = "default";
 simple-audio-card,name = "Modem2";
 simple-audio-card,format = "i2s";
 simple-audio-card,bitclock-master = <&dailink2_master>;
 simple-audio-card,frame-master = <&dailink2_master>;
 simple-audio-card,widgets =
 "Microphone","Microphone Jack",
 "Headphone","Headphone Jack";
 simple-audio-card,routing =
 "MIC_IN","Microphone Jack",
 "Headphone Jack","HP_OUT";
 simple-audio-card,cpu {
 sound-dai = <&sai2>;
 };
 dailink2_master: simple-audio-card,codec {
 sound-dai = <&codec_test>;
 clocks = <&clks IMX6UL_CLK_SAI2>;
 };
 };
};
&i2c4 {
 clock_frequency = <100000>;
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_i2c4>;
 status = "okay";
codec: nau8810@1a {
 #sound-dai-cells = <0>;
 compatible = "nuvoton,nau8810";
 reg = <0x1a>;
 //wlf,shared-lrclk;
 };
 eeprom: at24c02@50 {
 compatible = "microchip,24c02";
 reg = <0x50>;
 pagesize = <16>;
 // Use this for readonly access
 //readonly;
 };
};
&sai1 {
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_sai1>;
 assigned-clocks = <&clks IMX6UL_CLK_SAI1_SEL>,
 <&clks IMX6UL_CLK_SAI1>;
 assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
 assigned-clock-rates = <0>, <12288000>;
 fsl,sai-mclk-direction-output;
 fsl,sai-synchronous-rx;
 fsl,mode = "i2s-master";
 sai-index = <1>;
 status = "okay";
};
&sai2 {
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_sai2>;
 assigned-clocks = <&clks IMX6UL_CLK_SAI2_SEL>,
 <&clks IMX6UL_CLK_SAI2>;
 assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
 assigned-clock-rates = <0>, <12288000>;
 fsl,sai-mclk-direction-output;
 fsl,sai-synchronous-rx;
 fsl,mode = "i2s-master";
 sai-index = <2>;
 status = "okay";
};
&sai3 {
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_sai3>;
 assigned-clocks = <&clks IMX6UL_CLK_SAI3_SEL>,
 <&clks IMX6UL_CLK_SAI3>;
 assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
 assigned-clock-rates = <0>, <12288000>;
 fsl,sai-mclk-direction-output;
 fsl,sai-synchronous-rx;
 fsl,mode = "i2s-master";
 sai-index = <3>;
 status = "okay";
};#
Hi Helios
example with "simple-audio-card" configuration can be found on
i.MX7Dual + SGTL5000 no data on SAI output
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Dear Igor,
Thank you very much for your response, the link you send me i already saw it. In that setup there is only one codec, when in mine i got the codec plus 2 audio devices, GSM modems. Those don't have I2C control and there are not a Codec either. I think I need to use a dummy codec, this is why i used the linux,snd-soc-dummy or should i use snd-soc-dummy-dai? Not 100% sure what driver i should use either.
Any suggestion will be appreciated!!!