<?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>i.MX Processorsのトピックi.MX8M Plus - SPDIF Protocol Implementation Example</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Plus-SPDIF-Protocol-Implementation-Example/m-p/2397053#M246066</link>
    <description>&lt;P&gt;Hi Team,&lt;BR /&gt;&lt;BR /&gt;Could someone pls suggest how to implement and validate SPDIF Protocol in i.MX8M plus?&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jul 2026 07:00:26 GMT</pubDate>
    <dc:creator>ramkrish</dc:creator>
    <dc:date>2026-07-21T07:00:26Z</dc:date>
    <item>
      <title>i.MX8M Plus - SPDIF Protocol Implementation Example</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Plus-SPDIF-Protocol-Implementation-Example/m-p/2397053#M246066</link>
      <description>&lt;P&gt;Hi Team,&lt;BR /&gt;&lt;BR /&gt;Could someone pls suggest how to implement and validate SPDIF Protocol in i.MX8M plus?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2026 07:00:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Plus-SPDIF-Protocol-Implementation-Example/m-p/2397053#M246066</guid>
      <dc:creator>ramkrish</dc:creator>
      <dc:date>2026-07-21T07:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8M Plus - SPDIF Protocol Implementation Example</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Plus-SPDIF-Protocol-Implementation-Example/m-p/2397074#M246067</link>
      <description>&lt;P&gt;Use the existing Linux ALSA Audio XCVR / S/PDIF driver on i.MX8M Plus; you normally do&amp;nbsp;&lt;STRONG&gt;not&lt;/STRONG&gt;&amp;nbsp;implement the S/PDIF protocol from scratch. The i.MX8M Plus Audio XCVR supports eARC, ARC, and S/PDIF modes, and the Linux S/PDIF support exposes one playback device for Tx and one capture device for Rx through ALSA.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suggested implementation path:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Enable the kernel driver&lt;/STRONG&gt;&amp;nbsp;Enable:&lt;/P&gt;
&lt;P&gt;CONFIG_SND_IMX_SPDIF&lt;/P&gt;
&lt;P&gt;Menu path:&lt;/P&gt;
&lt;P&gt;Copy&lt;/P&gt;
&lt;P&gt;Device Drivers&lt;/P&gt;
&lt;P&gt;&amp;nbsp; -&amp;gt; Sound card support&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; Advanced Linux Sound Architecture&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; ALSA for SoC audio support&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; SoC Audio for Freescale i.MX CPUs&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; SoC Audio support for i.MX boards with S/PDIF&lt;/P&gt;
&lt;P&gt;The documented DT bindings are under&amp;nbsp;Documentation/devicetree/bindings/sound/fsl,spdif.txt&amp;nbsp;and&amp;nbsp;Documentation/devicetree/bindings/sound/imx-audio-spdfif.txt&amp;nbsp;.&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Configure the device tree&lt;/STRONG&gt;&amp;nbsp;For i.MX8M Plus, use the&amp;nbsp;xcvr&amp;nbsp;audio block and enable the sound card / DAI link. A representative configuration is:&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;sound-xcvr {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; compatible = "fsl,imx-audio-card";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; model = "imx-audio-xcvr";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pri-dai-link {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; link-name = "XCVR PCM";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sound-dai = &amp;lt;&amp;amp;xcvr&amp;gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;/P&gt;
&lt;P&gt;};&lt;/P&gt;
&lt;P&gt;&amp;amp;xcvr {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #sound-dai-cells = &amp;lt;0&amp;gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pinctrl-names = "default";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pinctrl-0 = &amp;lt;&amp;amp;pinctrl_xcvr&amp;gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; status = "okay";&lt;/P&gt;
&lt;P&gt;};&lt;/P&gt;
&lt;P&gt;For Tx pin muxing, one documented example uses&amp;nbsp;MX8MP_IOMUXC_SPDIF_TX__AUDIOMIX_SPDIF1_OUT&amp;nbsp;.&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Check board routing / jumpers&lt;/STRONG&gt;&amp;nbsp;If using the NXP audio board, set the physical routing for the intended S/PDIF path. For i.MX8M Plus,&amp;nbsp;J1500=1-2&amp;nbsp;routes the coaxial connector to i.MX8M Plus, and&amp;nbsp;J1500=4-5&amp;nbsp;routes the optical connector to i.MX8M Plus.&amp;nbsp;&amp;nbsp;If routing through CPLD / HDMI card,&amp;nbsp;J2511=1-3&amp;nbsp;is documented as “i.MX 8M Plus to CPLD to HDMI card.”&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Use ALSA / IEC958 correctly&lt;/STRONG&gt;&amp;nbsp;The S/PDIF Tx driver supports 32, 44.1, and 48 kHz sample rates, with&amp;nbsp;S16_LE&amp;nbsp;and&amp;nbsp;S24_LE&amp;nbsp;formats; for 24-bit output, the file must use 32 bits per channel frame with only the 24 LSBs valid.&amp;nbsp;&amp;nbsp;If the path expects IEC958 subframes rather than raw PCM, do the PCM-to-IEC958 conversion in user space, for example using an ALSA PCM plugin.&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Validation steps:&lt;/P&gt;
&lt;P&gt;aplay -l&lt;/P&gt;
&lt;P&gt;arecord -l&lt;/P&gt;
&lt;P&gt;Use these to identify the S/PDIF playback / capture card and device IDs. The documentation shows the S/PDIF device appearing as an ALSA card such as&amp;nbsp;imxspdif [imx-spdif], device 0: S/PDIF PCM&amp;nbsp;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Tx validation:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;aplay -D hw:&amp;lt;card_id&amp;gt;,&amp;lt;pcm_id&amp;gt; audio48k24S.wav&lt;/P&gt;
&lt;P&gt;The reference validation method uses an external optical S/PDIF receiver, such as an M-Audio Transit USB sound card with WaveLab, then records the stream externally and plays it back to check correctness.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Rx validation:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;arecord -D hw:&amp;lt;card_id&amp;gt;,&amp;lt;pcm_id&amp;gt; -c 2 -d 20 -r 48000 -f S24_LE record.wav&lt;/P&gt;
&lt;P&gt;The sample rate passed to&amp;nbsp;arecord&amp;nbsp;must match the incoming S/PDIF stream sample rate.&amp;nbsp;&amp;nbsp;For Rx, the application flow is to open the S/PDIF Rx PCM device, wait for the internal DPLL to lock to the input bit stream, get the input sample rate, set channel / format / rate parameters, then prepare and trigger capture.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For protocol-level checks, use:&lt;/P&gt;
&lt;P&gt;iecset -c &amp;lt;card_id&amp;gt;&lt;/P&gt;
&lt;P&gt;iecset&amp;nbsp;is the standard utility documented for setting or dumping IEC958 status bits, and the driver also exposes channel-status handling through the ALSA control interface.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For i.MX8M Plus EVK-style validation, NXP also documents loopback-style Linux testing using the&amp;nbsp;imxaudioxcvr&amp;nbsp;card, for example recording from&amp;nbsp;imxaudioxcvr&amp;nbsp;and playing to&amp;nbsp;wm8960audio&amp;nbsp;:&lt;/P&gt;
&lt;P&gt;arecord -Dsysdefault:CARD=imxaudioxcvr -c2 -r48000 -fS32_LE -twav | \&lt;/P&gt;
&lt;P&gt;aplay -Dsysdefault:CARD=wm8960audio&lt;/P&gt;
&lt;P&gt;In short: enable the i.MX S/PDIF / XCVR ALSA driver, configure the&amp;nbsp;xcvr&amp;nbsp;device tree and board routing, then validate Tx/Rx with&amp;nbsp;aplay&amp;nbsp;,&amp;nbsp;arecord&amp;nbsp;,&amp;nbsp;iecset&amp;nbsp;, and an external optical/coax S/PDIF source or sink.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2026 07:42:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Plus-SPDIF-Protocol-Implementation-Example/m-p/2397074#M246067</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2026-07-21T07:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8M Plus - SPDIF Protocol Implementation Example</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Plus-SPDIF-Protocol-Implementation-Example/m-p/2397501#M246083</link>
      <description>Hi Yipingwang,&lt;BR /&gt;&lt;BR /&gt;Could you please guide me with any reference schematics to implement SPDIF in Simplest way.</description>
      <pubDate>Wed, 22 Jul 2026 04:12:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Plus-SPDIF-Protocol-Implementation-Example/m-p/2397501#M246083</guid>
      <dc:creator>ramkrish</dc:creator>
      <dc:date>2026-07-22T04:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX8M Plus - SPDIF Protocol Implementation Example</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Plus-SPDIF-Protocol-Implementation-Example/m-p/2397546#M246086</link>
      <description>&lt;P&gt;For the simplest i.MX 8M Plus S/PDIF implementation, use the i.MX Audio Board / MCIMX8M-AUD as the closest NXP reference hardware, not the base i.MX 8M Plus EVK alone. The audio board is documented as supporting i.MX 8M Plus and providing S/PDIF I/O with RCA and TOSLINK connectors, with TOSLINK support up to 192 kHz.&lt;/P&gt;
&lt;P&gt;Recommended simple approach:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Use optical S/PDIF first if possible&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;Easiest hardware path:&amp;nbsp;i.MX8MP SPDIF_OUT&amp;nbsp;→ optical TOSLINK transmitter module.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;For receive: optical TOSLINK receiver module →&amp;nbsp;i.MX8MP SPDIF_IN&amp;nbsp;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;This avoids coaxial 75 Ω line-drive, transformer/coupling, and grounding concerns.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Use the i.MX 8M Plus S/PDIF pins through IOMUX&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;The i.MX 8M Plus audio subsystem includes&amp;nbsp;&lt;STRONG&gt;SPDIF input and output&lt;/STRONG&gt;&amp;nbsp;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;The reference manual shows IOMUX options for&amp;nbsp;AUDIOMIX_SPDIF1_OUT&amp;nbsp;and&amp;nbsp;AUDIOMIX_SPDIF1_IN&amp;nbsp;on selectable pads.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;In Linux, the corresponding IOMUX definitions include&amp;nbsp;MX8MP_IOMUXC_SPDIF_TX__AUDIOMIX_SPDIF_OUT&amp;nbsp;and&amp;nbsp;MX8MP_IOMUXC_SPDIF_RX__AUDIOMIX_SPDIF_IN&amp;nbsp;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;If you need coaxial RCA&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;Do&amp;nbsp;&lt;STRONG&gt;not&lt;/STRONG&gt;&amp;nbsp;treat the SoC pin like a direct RCA line driver.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;Add the proper 75 Ω S/PDIF coax output network / coupling per the selected transmitter/interface circuit.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;Optical is usually the simpler and safer first implementation.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Reference material to look at&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;MCIMX8M-AUD / i.MX Audio Board&lt;/STRONG&gt;&amp;nbsp;: best NXP reference for S/PDIF I/O with RCA and TOSLINK on the i.MX 8M family.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;i.MX 8M Plus Reference Manual&lt;/STRONG&gt;&amp;nbsp;: pinmux / IOMUX setup for&amp;nbsp;AUDIOMIX_SPDIF1_IN&amp;nbsp;and&amp;nbsp;AUDIOMIX_SPDIF1_OUT&amp;nbsp;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;i.MX 8M Plus datasheet&lt;/STRONG&gt;&amp;nbsp;: S/PDIF timing parameters are documented, including clock high/low timing.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;
&lt;P&gt;For the simplest design, route&amp;nbsp;AUDIOMIX_SPDIF1_OUT/IN&amp;nbsp;to optical TOSLINK modules and use the MCIMX8M-AUD as the NXP reference point for S/PDIF I/O behavior.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2026 06:04:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX8M-Plus-SPDIF-Protocol-Implementation-Example/m-p/2397546#M246086</guid>
      <dc:creator>yipingwang</dc:creator>
      <dc:date>2026-07-22T06:04:21Z</dc:date>
    </item>
  </channel>
</rss>

