Hello Igor,
That worked great thank you very much!
Now I have one more question, we have two codecs in our design, they share the bclk and fsclk but not the data line. They both use AUDMUX4 TXC and AUDMUX4 TXFS but one uses AUDMUX4 TXD and other AUDMUX3 TXD. We got one codec working with your suggestion but linux doesnt recognise the second one. Here is how we modified the code for that;
sound1 {
compatible = "fsl,imx-audio-cs4349";
model = "imx-audio-cs4349-1";
ssi-controller = <&ssi2>;
audio-codec = <&codec1>;
audio-routing =
"Line Out Jack", "AOUT1L",
"Line Out Jack", "AOUT1R",
"Line Out Jack", "AOUT2L",
"Line Out Jack", "AOUT2R",
"Line Out Jack", "AOUT3L",
"Line Out Jack", "AOUT3R",
"Line Out Jack", "AOUT4L",
"Line Out Jack", "AOUT4R",
"AIN1L", "Line In Jack",
"AIN1R", "Line In Jack",
"AIN2L", "Line In Jack",
"AIN2R", "Line In Jack";
mux-int-port = <2>;
mux-ext-port = <4>;
};
sound2 {
compatible = "fsl,imx-audio-cs4349";
model = "imx-audio-cs4349-2";
ssi-controller = <&ssi1>;
audio-codec = <&codec2>;
audio-routing =
"Line Out Jack", "AOUT1L",
"Line Out Jack", "AOUT1R",
"Line Out Jack", "AOUT2L",
"Line Out Jack", "AOUT2R",
"Line Out Jack", "AOUT3L",
"Line Out Jack", "AOUT3R",
"Line Out Jack", "AOUT4L",
"Line Out Jack", "AOUT4R",
"AIN1L", "Line In Jack",
"AIN1R", "Line In Jack",
"AIN2L", "Line In Jack",
"AIN2R", "Line In Jack";
mux-int-port = <1>;
mux-ext-port = <3>;
};
&i2c3 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3>;
status = "okay";
codec1: cs4349@48 {
compatible = "cirrus,cs4349";
reg = <0x48>;
reset-gpios = <&gpio4 27 0>;
sysclk = <24000000>;
};
codec2: cs4349@49 {
compatible = "cirrus,cs4349";
reg = <0x49>;
reset-gpios = <&gpio4 27 0>;
sysclk = <24000000>;
};
};
pinctrl_audmux_1: audmuxgrp_1 {
fsl,pins = <
MX6QDL_PAD_DISP0_DAT20__AUD4_TXC 0x130b0 /*ARM-I2S-BCLK*/
MX6QDL_PAD_DISP0_DAT21__AUD4_TXD 0x130b0 /*ARM-I2S-D0 */
MX6QDL_PAD_DISP0_DAT22__AUD4_TXFS 0x130b0 /* ARM-I2S-LRCLK*/
MX6QDL_PAD_DISP0_DAT23__AUD4_RXD 0x130b0
>;
};
pinctrl_audmux_2: audmuxgrp_2 {
fsl,pins = <
MX6QDL_PAD_DISP0_DAT20__AUD4_TXC 0x130b0 /*ARM-I2S-BCLK*/
MX6QDL_PAD_CSI0_DAT5__AUD3_TXD 0x130b0 /*ARM-I2S-D1 */
MX6QDL_PAD_DISP0_DAT22__AUD4_TXFS 0x130b0 /* ARM-I2S-LRCLK*/
MX6QDL_PAD_DISP0_DAT23__AUD4_RXD 0x130b0
>;
};
&audmux {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_audmux_1 &pinctrl_audmux_2>;
status = "okay";
};
&ssi1 {
fsl,mode = "i2s-master";
status = "okay";
};
&ssi2 {
fsl,mode = "i2s-master";
status = "okay";
};