7

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..

md.jamal
  • 4,067
  • 8
  • 45
  • 108
  • [What is ALSA in the Linux kernel?](https://unix.stackexchange.com/a/120168/56041) – jww Feb 14 '18 at 05:07
  • 1
    Thanks. I know what ALSA is but, I need more detail understanding of audio routing , so i can make those changes in my device tree – md.jamal Feb 14 '18 at 05:09
  • 2
    @md.jamal Take a look at this example: https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/sound/mxs-audio-sgtl5000.txt Source is where the audio data comes from and sink is where it goes. There are usually different combinations of routes, but you might want to start with a single, simple route. – Peter L. Feb 15 '18 at 07:18
  • @jww ALSA - Advanced Linux Sound Architecture : https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture – Vijeth PO Jan 06 '19 at 09:29
  • @md.jamal Useful link : https://01.org/linuxgraphics/gfx-docs/drm/sound/soc/index.html – Vijeth PO Jan 06 '19 at 09:30

0 Answers0