# NXP Audio Mixer (AUDMIX).

_Peios Kernel / Hardware and drivers / Device-tree binding reference / Audio bindings_

> Device-tree binding reference for NXP Audio Mixer (AUDMIX)..

<!-- SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) -->


<a id="dt-root"></a>

**Schema identifier (<code>&#36;id</code>):** <span id="dt-09f478f44eb202ea573e"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;schemas&#47;sound&#47;fsl&#44;audmix&#46;yaml&#35;&#34;</code></span>

**Schema dialect (<code>&#36;schema</code>):** <span id="dt-dcb375baab6014763a68"><code>&#34;http&#58;&#47;&#47;devicetree&#46;org&#47;meta&#45;schemas&#47;core&#46;yaml&#35;&#34;</code></span>

<a id="dt-e46b5a5dd81dbd751c9f"></a>

**Maintainers (<code>maintainers</code>):** <a id="dt-fbc39820abb8bb999095"></a> <span id="dt-fb78ddfc22abfc6fe56d"><code>&#34;Shengjiu Wang &#60;shengjiu&#46;wang&#64;nxp&#46;com&#62;&#34;</code></span>, <span id="dt-0f999bb9185dbf6b58d8"><code>&#34;Frank Li &#60;Frank&#46;Li&#64;nxp&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The Audio Mixer is a on-chip functional module that allows mixing of two
audio streams into a single audio stream. Audio Mixer has two input serial
audio interfaces. These are driven by two Synchronous Audio interface
modules (SAI). Each input serial interface carries 8 audio channels in its
frame in TDM manner. Mixer mixes audio samples of corresponding channels
from two interfaces into a single sample. Before mixing, audio samples of
two inputs can be attenuated based on configuration. The output of the
Audio Mixer is also a serial audio interface. Like input interfaces it has
the same TDM frame format. This output is used to drive the serial DAC TDM
interface of audio codec and also sent to the external pins along with the
receive path of normal audio SAI module for readback by the CPU.</p>
<pre><code>The output of Audio Mixer can be selected from any of the three streams
  - serial audio input 1
  - serial audio input 2
  - mixed audio</code></pre>
<p style="white-space: pre-wrap">Mixing operation is independent of audio sample rate but the two audio
input streams must have same audio sample rate with same number of channels
in TDM frame to be eligible for mixing.</p>
</div>

<a id="dt-e1f655ed0ff4d595dadc"></a>

## Properties and child nodes (<code>properties</code>)

<a id="dt-5c1d81699dcbe840de83"></a>

### <code>compatible</code> — required here

**Allowed values (<code>enum</code>):** <a id="dt-207128c21dbd6355c894"></a> <span id="dt-bd234eb96375d77ca611"><code>&#34;fsl&#44;imx8qm&#45;audmix&#34;</code></span>, <span id="dt-0d17ba1dd2e75413f7d4"><code>&#34;fsl&#44;imx952&#45;audmix&#34;</code></span>

<a id="dt-9c1635fdb65d87e33d77"></a>

### <code>reg</code> — required here

**Maximum number of items (<code>maxItems</code>):** <span id="dt-71421d35675d9a533ad2"><code>1</code></span>

<a id="dt-4e9a371963ac013ad39d"></a>

### <code>clocks</code> — required here

**Maximum number of items (<code>maxItems</code>):** <span id="dt-c7438d9082840936a9a7"><code>1</code></span>

<a id="dt-041d7cd76b652a5de06a"></a>

### <code>clock&#45;names</code> — required here

<a id="dt-3d1de59bdfddccf00eed"></a>

#### Array item rules (<code>items</code>)

<a id="dt-b779484bf9e022991fd6"></a>

**Item 1**

> **Exact value (<code>const</code>):** <span id="dt-3403d68873725c15739a"><code>&#34;ipg&#34;</code></span>

<a id="dt-030bda573e8c53177f1a"></a>

### <code>power&#45;domains</code> — not listed as required here

**Maximum number of items (<code>maxItems</code>):** <span id="dt-74e4e6f1d3f2a860fdb9"><code>1</code></span>

<a id="dt-1639e88130e6dc5c2bc3"></a>

### <code>dais</code> — not listed as required here

<div id="dt-ac7afeae096485f8d31f">
<p style="white-space: pre-wrap">contain a list of phandles to AUDMIX connected DAIs.</p>
</div>

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-d23f5c9f9cec75dba1ac">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;phandle&#45;array</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-8f5710c4314b4caa4970>)</span>

**Minimum number of items (<code>minItems</code>):** <span id="dt-eda6d1f3566833959335"><code>2</code></span>

<a id="dt-3cb2a0a32851a78f4e27"></a>

#### Array item rules (<code>items</code>)

<a id="dt-a38c1b8d4db770edcb52"></a>

**Item 1**

> <div id="dt-a64d97ac0148fbb7d369">
> <p style="white-space: pre-wrap">the AUDMIX output</p>
> </div>
>
> **Maximum number of items (<code>maxItems</code>):** <span id="dt-e1b130cd4b199b82e0d3"><code>1</code></span>

<a id="dt-f82f9b75aaee42b8e7ba"></a>

**Item 2**

> <div id="dt-df19a62bdc42917b3f77">
> <p style="white-space: pre-wrap">serial audio input 1</p>
> </div>
>
> **Maximum number of items (<code>maxItems</code>):** <span id="dt-353b0fca7b159e56d973"><code>1</code></span>

<a id="dt-e62fe236ff7bbc2e25ab"></a>

**Item 3**

> <div id="dt-95fc29d15e2cb2cb9773">
> <p style="white-space: pre-wrap">serial audio input 2</p>
> </div>
>
> **Maximum number of items (<code>maxItems</code>):** <span id="dt-1c0095c8582534a08d35"><code>1</code></span>

<a id="dt-638717a7c9bbf1878b7e"></a>

### <code>ports</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-253551a11be145495212">[<code>&#47;schemas&#47;graph&#46;yaml&#35;&#47;properties&#47;ports</code>](</kernel/hardware/devicetree-bindings/dt-shared/graph.md#dt-638717a7c9bbf1878b7e>)</span>

<a id="dt-bd319faf13454f764484"></a>

#### Properties matching a name pattern (<code>patternProperties</code>)

<a id="dt-99024c8b57a0be881524"></a>

**<code>&#94;port&#64;&#91;0&#45;1&#93;</code> — name matches this regular expression**

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-ecc340b3c0d6e9dc5c41">[<code>audio&#45;graph&#45;port&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-sound/audio-graph-port.md#dt-root>)</span>

<a id="dt-a8580acd2378301bf022"></a>

**Properties not evaluated by applicable rules (<code>unevaluatedProperties</code>)**

<code>false</code>

Not allowed by this rule.

<div id="dt-58be965bdee64d70035e">
<p style="white-space: pre-wrap">Input port from SAI TX</p>
</div>

<a id="dt-076265030fa616d9c245"></a>

#### Properties and child nodes (<code>properties</code>)

<a id="dt-dc67b74e0468f2f7f265"></a>

**<code>port&#64;2</code> — not listed as required here**

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-bf0c0e1b24d670f57f64">[<code>audio&#45;graph&#45;port&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-sound/audio-graph-port.md#dt-root>)</span>

<a id="dt-a2a3302eb9200a1fab03"></a>

**Properties not evaluated by applicable rules (<code>unevaluatedProperties</code>)**

<code>false</code>

Not allowed by this rule.

<div id="dt-2494ba4fb5f1dc4cb38b">
<p style="white-space: pre-wrap">Output port to SAI RX</p>
</div>

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;compatible&#34;</code></span>, <span id="dt-ee7433925c1528c16b99"><code>&#34;reg&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;clocks&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;clock&#45;names&#34;</code></span>

<a id="dt-935ee547587f3e75de61"></a>

## All of these rules must match (<code>allOf</code>)

<a id="dt-d33de94ac1d3652cd22a"></a>

### Rule 1

> <a id="dt-3bbb54dfa1f05dfb4d25"></a>
>
> #### Condition (<code>if</code>)
>
> > <a id="dt-97f47e9dc804c839f86d"></a>
> >
> > **Properties and child nodes (<code>properties</code>)**
> >
> > <a id="dt-bbadeeb73dfaefabae79"></a>
> >
> > **<code>compatible</code> — not listed as required here**
> >
> > <a id="dt-ebe43a424f4497a78746"></a>
> >
> > **Rule for matching array elements (<code>contains</code>)**
> >
> > > **Allowed values (<code>enum</code>):** <a id="dt-b5c9dbe70762f9ad7bb5"></a> <span id="dt-d017b1b1b5a0bb01c549"><code>&#34;fsl&#44;imx8qm&#45;audmix&#34;</code></span>
>
> <a id="dt-1ba25143802b75b74702"></a>
>
> #### When the condition matches (<code>then</code>)
>
> > **Required in this object (<code>required</code>):** <a id="dt-b0b2f2243ff9a854f151"></a> <span id="dt-4e9ead0e861b67997dec"><code>&#34;power&#45;domains&#34;</code></span>

<a id="dt-63ab525a9812ac23c446"></a>

## Properties not evaluated by applicable rules (<code>unevaluatedProperties</code>)

<code>false</code>

Not allowed by this rule.

<a id="dt-1a130cabaa8a47b058bf"></a>

## Examples (<code>examples</code>)

<pre id="dt-0bd6510295af0c95ff2d"><code class="language-dts">audmix@59840000 {
  compatible = "fsl,imx8qm-audmix";
  reg = &lt;0x59840000 0x10000&gt;;
  clocks = &lt;&amp;amix_lpcg 0&gt;;
  clock-names = "ipg";
  power-domains = &lt;&amp;pd_audmix&gt;;
  dais = &lt;&amp;sai4&gt;, &lt;&amp;sai5&gt;;

  ports {
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;

    port@0 {
      reg = &lt;0&gt;;
      playback-only;

      amix_endpoint0: endpoint {
        dai-tdm-slot-num = &lt;8&gt;;
        dai-tdm-slot-width = &lt;32&gt;;
        dai-tdm-slot-width-map = &lt;32 8 32&gt;;
        dai-format = "dsp_a";
        remote-endpoint = &lt;&amp;be00_ep&gt;;
      };
    };

    port@1 {
      reg = &lt;1&gt;;
      playback-only;

      amix_endpoint1: endpoint {
        dai-tdm-slot-num = &lt;8&gt;;
        dai-tdm-slot-width = &lt;32&gt;;
        dai-tdm-slot-width-map = &lt;32 8 32&gt;;
        dai-format = "dsp_a";
        remote-endpoint = &lt;&amp;be01_ep&gt;;
      };
    };

    port@2 {
      reg = &lt;2&gt;;
      capture-only;

      amix_endpoint2: endpoint {
        dai-tdm-slot-num = &lt;8&gt;;
        dai-tdm-slot-width = &lt;32&gt;;
        dai-tdm-slot-width-map = &lt;32 8 32&gt;;
        dai-format = "dsp_a";
        bitclock-master;
        frame-master;
        remote-endpoint = &lt;&amp;be02_ep&gt;;
      };
    };
  };
};
</code></pre>

## Source notes

<details>
<summary>Annotations retained from the schema source</summary>

<p id="dt-comment-0"><strong>Line 1:</strong> <span> SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)</span></p>

</details>
