Sound Issue with Kernel 4.1.15

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sound Issue with Kernel 4.1.15

Jump to solution
2,221 Views
PaulDeMetrotion
Senior Contributor I

I am upgrading my i.MX6 kernel to version 4.1.15. I am using the same device tree as the previous version 3.14.28. Audio worked great on the earlier version but I am now getting the following error:

    sgtl5000 2-000a: sgtl5000 revision 0x11
    imx-sgtl5000 sound: phandle missing or invalid
    imx-sgtl5000: probe of sound failed with error -22

My question is has anybody seen this problem? Have the device tree entries for the SGTL5000 changed with the new kernel version?

Labels (4)
0 Kudos
1 Solution
1,594 Views
PaulDeMetrotion
Senior Contributor I

Thanks Jimmy!

I had already looked at this but your post made me double check. The imx-sgtl5000.c has indeed changed. Previously the OF parse looked for 'cpu-dai' as a parameter but now it looks for 'ssi-controller'. Made the change in the device tree and everything is good again. Why do they make this kind of unnecessary code change????

View solution in original post

0 Kudos
6 Replies
1,594 Views
ganeshmc
Contributor I

Dear Paul,

Please help me how to edit device tree file.

0 Kudos
1,594 Views
PaulDeMetrotion
Senior Contributor I

What specifically do you need?

0 Kudos
1,594 Views
ganeshmc
Contributor I

Dear Paul,

         I am facing the same issue, which you have said in the query

"

I am upgrading my i.MX6 kernel to version 4.1.15. I am using the same device tree as the previous version 3.14.28. Audio worked great on the earlier version but I am now getting the following error:

 

    sgtl5000 2-000a: sgtl5000 revision 0x11
    imx-sgtl5000 sound: phandle missing or invalid
    imx-sgtl5000: probe of sound failed with error -22

 

My question is has anybody seen this problem? Have the device tree entries for the SGTL5000 changed with the new kernel version?

"

    If you have any solution for the above issue, please share with me.

0 Kudos
1,594 Views
PaulDeMetrotion
Senior Contributor I

Here are the relevant sections I have in my device tree. Make sure your mux-int-port and mux-ext-port numbers are correct.

sound {
  compatible = "fsl,imx6q-c420-sgtl5000",
  "fsl,imx-audio-sgtl5000";
  model = "sgtl5000-audio";
  cpu-dai = <&ssi2>;
  audio-codec = <&sgtl5000>;
  audio-routing = "Line Out Jack", "LINE_OUT";
  mux-int-port = <2>; 
  mux-ext-port = <5>;
};

&i2c3 {
  clock-frequency = <100000>;
  pinctrl-names = "default";
  pinctrl-0 = <&pinctrl_i2c3>;
  status = "okay";

  sgtl5000: sgtl5000@0a {
    compatible = "fsl,sgtl5000";
    reg = <0x0a>;
    VDDA-supply = <&reg_v3p3a>;
    VDDD-supply = <&sw4_reg>;
    VDDIO-supply = <&reg_v3p3a>;
    clocks = <&codec_osc>;
  };

  eeprom@50 {
    compatible = "st-micro,24c256";
    reg = <0x50>;
    pagesize = <64>;
  };
};

0 Kudos
1,594 Views
jimmychan
NXP TechSupport
NXP TechSupport

in the imx-sgtl5000.c

ssi_np = of_parse_phandle(pdev->dev.of_node, "ssi-controller", 0);

codec_np = of_parse_phandle(pdev->dev.of_node, "audio-codec", 0);

 

if (!ssi_np || !codec_np) {

               dev_err(&pdev->dev, "phandle missing or invalid\n");

               ret = -EINVAL;

               goto fail;

        }

So, please check the "ssi-controller" and "audio-codec" are setting correctly in your dtsi file. you can take imx6qdl-sabrelite.dtsi for reference.

0 Kudos
1,595 Views
PaulDeMetrotion
Senior Contributor I

Thanks Jimmy!

I had already looked at this but your post made me double check. The imx-sgtl5000.c has indeed changed. Previously the OF parse looked for 'cpu-dai' as a parameter but now it looks for 'ssi-controller'. Made the change in the device tree and everything is good again. Why do they make this kind of unnecessary code change????

0 Kudos