WM8960 audio broken on MCIMX7SABRE dev board using prebuilt SD card image ?

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

WM8960 audio broken on MCIMX7SABRE dev board using prebuilt SD card image ?

Jump to solution
1,509 Views
rimas
Contributor I

Greetings,

I am trying to get audio working using the WM8960 codec present on the MCIMX7SABRE development board.   I have downloaded this SD card image:

fsl-image-machine-test-imx7dsabresd-20180428-96.rootfs.sdcard.gz

Looking through the boot messages, I see the following:

imx-wm8960 sound: failed to get gpr property
imx-wm8960: probe of sound failed with error -2
imx-sii902x sound-hdmi: snd-soc-dummy-dai <-> 308c0000.sai mapping ok

and only the sound-hdmi device shows up when looking at /proc/asound/pcm

looking at the source code (imx-wm8960.c), I see that the failure occurs here:

if (ret) {
   dev_err(&pdev->dev, "failed to get gpr property\n");
   goto fail;
} else {
   data->gpr = syscon_node_to_regmap(args.np);
   if (IS_ERR(data->gpr)) {
      ret = PTR_ERR(data->gpr);
      dev_err(&pdev->dev, "failed to get gpr regmap\n");
      goto fail;
   }
   regmap_update_bits(data->gpr, args.args[0], args.args[1], args.args[2]);
}

decompiling the device tree blob (imx7d-sdb.dtb), I see the following definition for "sound":

sound {
   compatible = "fsl,imx7d-evk-wm8960", "fsl,imx-audio-wm8960";
   model = "wm8960-audio";
   cpu-dai = <0x66>;
   audio-codec = <0x67>;
   codec-master;
   hp-det = <0x2 0x0>;
   hp-det-gpios = <0x39 0x1c 0x0>;
   audio-routing = "Headphone Jack", "HP_L", "Headphone Jack", "HP_R", "Ext Spk", "SPK_LP", "Ext Spk",   "SPK_LN", "Ext Spk", "SPK_RP", "Ext Spk", "SPK_RN", "LINPUT1", "Main MIC",
"Main MIC", "MICB";
   assigned-clocks = <0x1 0x14b 0x1 0x14a>;
   assigned-clock-parents = <0x1 0x1ae>;
   assigned-clock-rates = <0x0 0xbb8000>;
};

but there is no definition for gpr.  Does anyone have any hints as to how to make the imx-wm8960 driver work correctly?  I am attaching a log of the boot messages.

Thanks!!

Labels (3)
0 Kudos
1 Solution
1,091 Views
igorpadykov
NXP Employee
NXP Employee

Hi Rimas

from log "Linux version 4.1.44-fslc+g6c1ad49" seems "community bsp" release was used

in the case. Difference between official nxp bsps and community is described on

FSL Community BSP Release Notes 2.3 documentation 

One can try official nxp Demo Images from link

i.MX Software|NXP 

i.MX 7Dual/Solo SABRESD Linux Binary Demo Files

https://www.nxp.com/webapp/Download?colCode=L4.1.15_2.0.0_iMX7D&appType=license&location=null&Parent... 

Or build from sources using documentation

https://www.nxp.com/webapp/Download?colCode=L4.1.15_2.0.0-LINUX-DOCS&Parent_nodeId=13376994810717061... 

linux-imx - i.MX Linux kernel 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
1 Reply
1,092 Views
igorpadykov
NXP Employee
NXP Employee

Hi Rimas

from log "Linux version 4.1.44-fslc+g6c1ad49" seems "community bsp" release was used

in the case. Difference between official nxp bsps and community is described on

FSL Community BSP Release Notes 2.3 documentation 

One can try official nxp Demo Images from link

i.MX Software|NXP 

i.MX 7Dual/Solo SABRESD Linux Binary Demo Files

https://www.nxp.com/webapp/Download?colCode=L4.1.15_2.0.0_iMX7D&appType=license&location=null&Parent... 

Or build from sources using documentation

https://www.nxp.com/webapp/Download?colCode=L4.1.15_2.0.0-LINUX-DOCS&Parent_nodeId=13376994810717061... 

linux-imx - i.MX Linux kernel 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos