<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: IMX6 DualLite sound card wm8960 in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/IMX6-DualLite-sound-card-wm8960/m-p/1367687#M182734</link>
    <description>&lt;P&gt;&lt;SPAN&gt;and I got fail with followed error message:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;debugfs: Directory '202c000.ssi' with parent 'wm8960-audio' already present!&lt;BR /&gt;imx-wm8960 sound: wm8960-hifi &amp;lt;-&amp;gt; 202c000.ssi mapping ok&lt;BR /&gt;imx-wm8960 sound: snd-soc-dummy-dai &amp;lt;-&amp;gt; 2034000.asrc mapping ok&lt;BR /&gt;imx-wm8960 sound: wm8960-hifi &amp;lt;-&amp;gt; 202c000.ssi mapping ok&lt;BR /&gt;#0: wm8960-audio&lt;BR /&gt;wm8960 0-001a: ASoC: Right Output Mixer DAPM update failed: -11&lt;BR /&gt;wm8960 0-001a: ASoC: Left Output Mixer DAPM update failed: -11&lt;BR /&gt;wm8960 0-001a: ASoC: Left Input Mixer DAPM update failed: -11&lt;BR /&gt;wm8960 0-001a: ASoC: Right Boost Mixer DAPM update failed: -11&lt;BR /&gt;wm8960-supply: disabling&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Nov 2021 06:40:56 GMT</pubDate>
    <dc:creator>shinnn</dc:creator>
    <dc:date>2021-11-08T06:40:56Z</dc:date>
    <item>
      <title>IMX6 DualLite sound card wm8960</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX6-DualLite-sound-card-wm8960/m-p/1315857#M177686</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am using iMX6 DualLite. I want to use wm8960 on imx6dl&lt;/P&gt;&lt;P&gt;But currently the default BSP audio on imx6dl uses wm8962 and uses ssi interface&lt;/P&gt;&lt;P&gt;I have tried porting wm8960 of imx6ul-14x14-evk.dtsi to imx6qdl-sabresd.dtsi,.dtsi, but it didn’t work.&lt;/P&gt;&lt;P&gt;In addition, there are also reference forums and porting methods on the Internet, but they have no effect, as follows&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shinnn_0-1627635471070.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/151377iC9F318796149B91F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="shinnn_0-1627635471070.png" alt="shinnn_0-1627635471070.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jul 2021 08:57:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX6-DualLite-sound-card-wm8960/m-p/1315857#M177686</guid>
      <dc:creator>shinnn</dc:creator>
      <dc:date>2021-07-30T08:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: IMX6 DualLite sound card wm8960</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX6-DualLite-sound-card-wm8960/m-p/1327588#M178897</link>
      <description>&lt;P&gt;You can refer to &lt;A href="https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/WM8960-audio-codec/ta-p/1119101" target="_blank"&gt;https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/WM8960-audio-codec/ta-p/1119101&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 08:20:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX6-DualLite-sound-card-wm8960/m-p/1327588#M178897</guid>
      <dc:creator>Rita_Wang</dc:creator>
      <dc:date>2021-08-23T08:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: IMX6 DualLite sound card wm8960</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX6-DualLite-sound-card-wm8960/m-p/1367682#M182733</link>
      <description>&lt;P&gt;Hi&amp;nbsp;b45499,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It still can't work, do you have any other ideas?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm working on i.MX 6DualLite&amp;nbsp;custom board&amp;nbsp;connect the wm8960 with ssi interface.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you share your imx-wm8960.c and wm8960.c , wm8960.h &amp;nbsp;files?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Below is device tree( imx6qdl-sabresd.dtsi&amp;nbsp;YOCTO&amp;nbsp; linux kernel 5.4.70_2.3.0)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;	reg_audio: regulator-audio {
		compatible = "regulator-fixed";
		regulator-name = "wm8960-supply";
		gpio = &amp;lt;&amp;amp;gpio4 11 0&amp;gt;;
		enable-active-high;
	};&lt;/LI-CODE&gt;&lt;LI-CODE lang="c"&gt;	codec: wm8960@1a {
		compatible = "wlf,wm8960";
		reg = &amp;lt;0x1a&amp;gt;;
		
		wlf,shared-lrclk;
		clocks = &amp;lt;&amp;amp;clks IMX6QDL_CLK_CKO&amp;gt;;
		clock-names = "mclk";
		
		DCVDD-supply = &amp;lt;&amp;amp;reg_audio&amp;gt;;
		DBVDD-supply = &amp;lt;&amp;amp;reg_audio&amp;gt;;
		AVDD-supply = &amp;lt;&amp;amp;reg_audio&amp;gt;;
		CPVDD-supply = &amp;lt;&amp;amp;reg_audio&amp;gt;;
		MICVDD-supply = &amp;lt;&amp;amp;reg_audio&amp;gt;;
		PLLVDD-supply = &amp;lt;&amp;amp;reg_audio&amp;gt;;
		SPKVDD1-supply = &amp;lt;&amp;amp;reg_audio&amp;gt;;
		SPKVDD2-supply = &amp;lt;&amp;amp;reg_audio&amp;gt;;
		gpio-cfg = &amp;lt;
			0x0000 /* 0:Default */
			0x0000 /* 1:Default */
			0x0013 /* 2:FN_DMICCLK */
			0x0000 /* 3:Default */
			0x8014 /* 4:FN_DMICCDAT */
			0x0000 /* 5:Default */
		&amp;gt;;
		amic-mono;
	};&lt;/LI-CODE&gt;&lt;LI-CODE lang="c"&gt;	sound {
		compatible = "fsl,imx6q-sabresd-wm8960",
			   "fsl,imx-audio-wm8960";
		model = "wm8960-audio";
		cpu-dai = &amp;lt;&amp;amp;ssi2&amp;gt;;
		audio-codec = &amp;lt;&amp;amp;codec&amp;gt;;
		asrc-controller = &amp;lt;&amp;amp;asrc&amp;gt;;
		codec-master;
		gpr = &amp;lt;&amp;amp;gpr 4 0x100000 0x100000&amp;gt;;
		/*
		 * hp-det = &amp;lt;hp-det-pin hp-det-polarity&amp;gt;;
		 * hp-det-pin: JD1 JD2  or JD3
		 * hp-det-polarity = 0: hp detect high for headphone
		 * hp-det-polarity = 1: hp detect high for speaker
		 */
		hp-det =  0&amp;gt;;
		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",
			"Mic Jack", "MICB",
			"Main MIC", "MICB";
		mux-int-port = &amp;lt;2&amp;gt;;
		mux-ext-port = &amp;lt;3&amp;gt;;
		hp-det-gpios = &amp;lt;&amp;amp;gpio7 8 1&amp;gt;;
		mic-det-gpios = &amp;lt;&amp;amp;gpio1 9 1&amp;gt;;
	};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;imx-wm8960.c&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;static int imx_wm8960_probe(struct platform_device *pdev)
{
	struct device_node *np = pdev-&amp;gt;dev.of_node;
	struct device_node *cpu_np = NULL, *codec_np = NULL;
	struct platform_device *cpu_pdev;
	struct imx_wm8960_data *data;
	struct platform_device *asrc_pdev = NULL;
	struct device_node *asrc_np;
	u32 width;
	int int_port, ext_port, tmp_port;
	int ret;

	data = devm_kzalloc(&amp;amp;pdev-&amp;gt;dev, sizeof(*data), GFP_KERNEL);
	if (!data) {
		ret = -ENOMEM;
		goto fail;
	}

	data-&amp;gt;pdev = pdev;
	data-&amp;gt;imx_hp_jack_pin.pin = "Headphone Jack";
	data-&amp;gt;imx_hp_jack_pin.mask = SND_JACK_HEADPHONE;

	data-&amp;gt;imx_hp_jack_gpio.name = "headphone detect";
	data-&amp;gt;imx_hp_jack_gpio.report = SND_JACK_HEADPHONE;
	data-&amp;gt;imx_hp_jack_gpio.debounce_time = 250;
	data-&amp;gt;imx_hp_jack_gpio.invert = 0;

	data-&amp;gt;imx_mic_jack_pin.pin = "Mic Jack";
	data-&amp;gt;imx_mic_jack_pin.mask = SND_JACK_MICROPHONE;

	data-&amp;gt;imx_mic_jack_gpio.name = "mic detect";
	data-&amp;gt;imx_mic_jack_gpio.report = SND_JACK_MICROPHONE;
	data-&amp;gt;imx_mic_jack_gpio.debounce_time = 250;
	data-&amp;gt;imx_mic_jack_gpio.invert = 0;

	if (of_property_read_bool(pdev-&amp;gt;dev.of_node, "codec-rpmsg"))
		data-&amp;gt;is_codec_rpmsg = true;

	cpu_np = of_parse_phandle(pdev-&amp;gt;dev.of_node, "cpu-dai", 0);
	if (!cpu_np) {
		dev_err(&amp;amp;pdev-&amp;gt;dev, "cpu dai phandle missing or invalid\n");
		ret = -EINVAL;
		goto fail;
	}
	
	/*==add==*/
	
		if (!strstr(cpu_np-&amp;gt;name, "ssi"))
		goto audmux_bypass;

	ret = of_property_read_u32(np, "mux-int-port", &amp;amp;int_port);
	if (ret) {
		dev_err(&amp;amp;pdev-&amp;gt;dev, "mux-int-port missing or invalid\n");
		goto fail;
	}
	ret = of_property_read_u32(np, "mux-ext-port", &amp;amp;ext_port);
	if (ret) {
		dev_err(&amp;amp;pdev-&amp;gt;dev, "mux-ext-port missing or invalid\n");
		goto fail;
	}

	/*
	 * The port numbering in the hardware manual starts at 1, while
	 * the audmux API expects it starts at 0.
	 */
	int_port--;
	ext_port--;
	if (data-&amp;gt;is_codec_master) {
		tmp_port = int_port;
		int_port = ext_port;
		ext_port = tmp_port;
	}

	ret = imx_audmux_v2_configure_port(ext_port,
			IMX_AUDMUX_V2_PTCR_SYN |
			IMX_AUDMUX_V2_PTCR_TFSEL(int_port) |
			IMX_AUDMUX_V2_PTCR_TCSEL(int_port) |
			IMX_AUDMUX_V2_PTCR_TFSDIR |
			IMX_AUDMUX_V2_PTCR_TCLKDIR,
			IMX_AUDMUX_V2_PDCR_RXDSEL(int_port));
	if (ret) {
		dev_err(&amp;amp;pdev-&amp;gt;dev, "audmux internal port setup failed\n");
		goto fail;
	}
	ret = imx_audmux_v2_configure_port(int_port,
			IMX_AUDMUX_V2_PTCR_SYN,
			IMX_AUDMUX_V2_PDCR_RXDSEL(ext_port));
	if (ret) {
		dev_err(&amp;amp;pdev-&amp;gt;dev, "audmux external port setup failed\n");
		goto fail;
	}

audmux_bypass:
	/*===end=*/
....
....
...
out:
	ret = 0;
fail:
	if (cpu_np)
		of_node_put(cpu_np);
	if (codec_np)
		of_node_put(codec_np);

	return ret;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;shinnn&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 06:25:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX6-DualLite-sound-card-wm8960/m-p/1367682#M182733</guid>
      <dc:creator>shinnn</dc:creator>
      <dc:date>2021-11-08T06:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: IMX6 DualLite sound card wm8960</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX6-DualLite-sound-card-wm8960/m-p/1367687#M182734</link>
      <description>&lt;P&gt;&lt;SPAN&gt;and I got fail with followed error message:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;debugfs: Directory '202c000.ssi' with parent 'wm8960-audio' already present!&lt;BR /&gt;imx-wm8960 sound: wm8960-hifi &amp;lt;-&amp;gt; 202c000.ssi mapping ok&lt;BR /&gt;imx-wm8960 sound: snd-soc-dummy-dai &amp;lt;-&amp;gt; 2034000.asrc mapping ok&lt;BR /&gt;imx-wm8960 sound: wm8960-hifi &amp;lt;-&amp;gt; 202c000.ssi mapping ok&lt;BR /&gt;#0: wm8960-audio&lt;BR /&gt;wm8960 0-001a: ASoC: Right Output Mixer DAPM update failed: -11&lt;BR /&gt;wm8960 0-001a: ASoC: Left Output Mixer DAPM update failed: -11&lt;BR /&gt;wm8960 0-001a: ASoC: Left Input Mixer DAPM update failed: -11&lt;BR /&gt;wm8960 0-001a: ASoC: Right Boost Mixer DAPM update failed: -11&lt;BR /&gt;wm8960-supply: disabling&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 06:40:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX6-DualLite-sound-card-wm8960/m-p/1367687#M182734</guid>
      <dc:creator>shinnn</dc:creator>
      <dc:date>2021-11-08T06:40:56Z</dc:date>
    </item>
  </channel>
</rss>

