AnsweredAssumed Answered

Understanding audio routing in linux for wm8985

Question asked by Jamal Mohiuddin on Feb 13, 2018
Latest reply on Feb 14, 2018 by igorpadykov

I have a custom i.MX6 board which has WM8985 audio codec. I have the codec driver wm8985 in sound/soc/codecs folder. I am developing the machine level driver sound/soc/fsl/imx-wm8985.c

I am taking the wm8962 code as reference. I am unable to understand the audio routing concept in linux audio subsystem.

I have modified the device tree to the following looking at wm8962 device tree.

 

sound {                 compatible = "fsl,imx6q-sabresd-wm8985",                            "fsl,imx-audio-wm8985";                 model = "wm8985-audio";                 cpu-dai = <&ssi2>;                 audio-codec = <&codec>;                 audio-routing =                         "Headphone Jack", "HPL",                         "Headphone Jack", "HPR",                         "Ext Spk", "SPKL",                         "Ext Spk", "SPKR",                         "Mic Bias", "AMIC",                         "RIN", "Mic Bias",                         "DMIC", "Mic Bias",                         "DMICDAT", "DMIC";                 mux-int-port = <2>;                 mux-ext-port = <3>;                 hp-det-gpios = <&gpio7 8 1>; /* same as sabre */                 /*mic-det-gpios = <&gpio1 23 1>;*/ /* move to enet_ref_clk */         };

 

Is this correct. Can you please help me to understanding what does the source and sink means in this. How to make a route..

enter image description here

Running aplay, i am getting Read/Write Error which happens due to incorrect routing..

Outcomes