Problem with DeviceTree , third codec freeze

Hello,

I’m working with Colibri IMX6 Solo 256MB (Toradex BSP 2.4) .
Our base board has 3 codecs sgtl5000.

  • 1 Codec - Colibri IMX6 Solo 256MB
  • 2 Codecs - Base Board

The SoM’s Codec and 1 of the main board (SSI2) is working fine but the second (SSI3) one freeze when start the aplay/arecord.
The i2c is working good, I can see all the codecs attached at i2c bus.

  • Codec 1 (SoM) - SSI1 I2C-2 - Working Ok
  • Codec 2 (Base Board) - SSI2 - I2C-4 - Working OK
  • Codec 3 (Base Board) - SSI3 - I2C-1 - Not Working

I’m suspecting a problem in my devicetree

root@colibri-imx6:~# aplay /usr/share/sounds/mysound/ringtone1.wav -V mono -Dhw:2,0 

Playing WAVE '/usr/share/sounds/mysound/ringtone1.wav' : Signed 16 bit Little Endian, Rate 32000 Hz,     Stereo

Hardware PCM card 2 'imx6-colibri-sgtl5000' device 0 subdevice 0
#######+                                           | 12%^CAborted by signal Interrupt...

root@colibri-imx6:~# Write failed: Broken pipe

I’m using kernel 3.10.17 with some modification in sgtl5000 drivers to support more than 1 codec.
In attached are the logs and the devicetree modification.
link text
Someone has an advice to debug this problem?

Thank you very much.

Best Regards,

Caio Pereira

You seem to link to the same audio clock twice ( audioclk ), but I guess in practice that should not make a difference since you don’t need to control the clock by software. Is the clock looking good hardware wise?

How does freezing exacly behave? Do I see that correct that you still can use Ctrl+C? Does it play first? If yes, for how long?

Also make sure that you assign pinmux pinctrl_audmux_t2/pinctrl_audmux_t3 to the ssi controller nodes.

@Stefan

I could fix it today.

I was using the wrong “int-port” value for SSI3.

The right value is “7” and not “3”.

At first I was thinking it was a clock problem, so it was duplicated but I will remove.

Thank you !

The guys from NXP (igorpadykov) finded this error for me.

https://community.nxp.com/message/845908?commentID=845908&et=watches.email.thread#comment-845908

   sound3 {
           status = "okay";
           compatible = "fsl,imx6-colibri-sgtl5000",
                        "fsl,imx-audio-sgtl5000";
           model = "imx6-colibri-sgtl5000";
           ssi-controller = <&ssi3>;
           audio-codec = <&codec3>;
           audio-routing =
                   "MIC_IN", "Mic Jack",
                   "Mic Jack", "Mic Bias",
                  "Headphone Jack", "HP_OUT",
                   "AIFOUT", "ADC",
                   "DAC", "AIFIN";
          mux-int-port = < **7** >;           
          mux-ext-port = <4>;
   };