# QMC audio

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

> Device-tree binding reference for QMC audio.

<!-- 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;qmc&#45;audio&#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;Herve Codina &#60;herve&#46;codina&#64;bootlin&#46;com&#62;&#34;</code></span>

<div id="dt-6d1c5ef59f0239d38c02">
<p style="white-space: pre-wrap">The QMC audio is an ASoC component which uses QMC (QUICC Multichannel
Controller) channels to transfer the audio data.
It provides several DAIs. For each DAI, the DAI is working in interleaved mode
if only one QMC channel is used by the DAI or it is working in non-interleaved
mode if several QMC channels are used by the DAI.</p>
</div>

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

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

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

### Rule 1

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

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

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

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

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

**Exact value (<code>const</code>):** <span id="dt-1765195bf8e86c3ccec6"><code>&#34;fsl&#44;qmc&#45;audio&#34;</code></span>

<a id="dt-2efe70314a961a652abe"></a>

### <code>&#35;address&#45;cells</code> — required here

**Exact value (<code>const</code>):** <span id="dt-e6e6af09ab617572731b"><code>1</code></span>

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

### <code>&#35;size&#45;cells</code> — required here

**Exact value (<code>const</code>):** <span id="dt-793e842f88ef513a8f93"><code>0</code></span>

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

### <code>&#35;sound&#45;dai&#45;cells</code> — required here

**Exact value (<code>const</code>):** <span id="dt-06650c5e4c981bc2a500"><code>1</code></span>

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

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

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

### <code>&#94;dai&#64;&#40;&#91;0&#45;9&#93;&#124;&#91;1&#45;5&#93;&#91;0&#45;9&#93;&#124;6&#91;0&#45;3&#93;&#41;&#36;</code> — name matches this regular expression

<div id="dt-dac5adcdc7a3748ac9f3">
<p style="white-space: pre-wrap">A DAI managed by this controller</p>
</div>

**Value type (<code>type</code>):** <span id="dt-947f6a431aebbe7c2a3f"><code>&#34;object&#34;</code></span>

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

#### Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</code>)

<code>false</code>

Not allowed by this rule.

<a id="dt-7517afb9d36dbe87a8e8"></a>

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

<a id="dt-15c9b89566c5777c98dd"></a>

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

**Minimum value (<code>minimum</code>):** <span id="dt-0a9c291d05bca15dcd1e"><code>0</code></span>

**Maximum value (<code>maximum</code>):** <span id="dt-7aa3a0d88daadcb1ec45"><code>63</code></span>

<div id="dt-8582f02ecd2c44165360">
<p style="white-space: pre-wrap">The DAI number</p>
</div>

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

**<code>fsl&#44;qmc&#45;chan</code> — required here**

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-40e28e3321d8f553679e">[<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>

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

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

> <a id="dt-4bb4df3dd143a69b0e21"></a>
>
> **Array item rules (<code>items</code>)**
>
> <a id="dt-424ac688dbc5eb2a2fdc"></a>
>
> **Item 1**
>
> > <div id="dt-1d00fa0bd4300c9ca556">
> > <p style="white-space: pre-wrap">phandle to QMC node</p>
> > </div>
>
> <a id="dt-591c99d2a3934ec1211e"></a>
>
> **Item 2**
>
> > <div id="dt-33d3d73846913f72aeaa">
> > <p style="white-space: pre-wrap">Channel number</p>
> > </div>

**Minimum number of items (<code>minItems</code>):** <span id="dt-8e836725ef3fb714c6da"><code>1</code></span>

<div id="dt-684e2c49599e25a3d558">
<p style="white-space: pre-wrap">Should be a phandle/number pair list. The list of phandle to QMC node and the QMC channel pair to use for this DAI. If only one phandle/number pair is provided, this DAI works in interleaved mode, i.e. audio channels for this DAI are interleaved in the QMC channel. If more than one pair is provided, this DAI works in non-interleave mode. In that case the first audio channel uses the the first QMC channel, the second audio channel uses the second QMC channel, etc...</p>
</div>

**Required in this object (<code>required</code>):** <a id="dt-9742d267f585f3fa637d"></a> <span id="dt-111786d3f28f0bb0b98b"><code>&#34;reg&#34;</code></span>, <span id="dt-23856c93c099471d1227"><code>&#34;fsl&#44;qmc&#45;chan&#34;</code></span>

**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;&#35;address&#45;cells&#34;</code></span>, <span id="dt-f3765998c4e103e45f2f"><code>&#34;&#35;size&#45;cells&#34;</code></span>, <span id="dt-329d9b3604d5b98bc19d"><code>&#34;&#35;sound&#45;dai&#45;cells&#34;</code></span>

<a id="dt-738c4b4f9e483441138b"></a>

## Properties not matched by properties or patternProperties in this schema (<code>additionalProperties</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">audio_controller: audio-controller {
    compatible = "fsl,qmc-audio";
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;
    #sound-dai-cells = &lt;1&gt;;
    dai@16 {
        reg = &lt;16&gt;;
        fsl,qmc-chan = &lt;&amp;qmc 16&gt;;
    };
    dai@17 {
        reg = &lt;17&gt;;
        fsl,qmc-chan = &lt;&amp;qmc 17&gt;;
    };
    dai@18 {
        reg = &lt;18&gt;;
        /* Non-interleaved mode */
        fsl,qmc-chan = &lt;&amp;qmc 18&gt;, &lt;&amp;qmc 19&gt;;
    };
};

sound {
    compatible = "simple-audio-card";
    #address-cells = &lt;1&gt;;
    #size-cells = &lt;0&gt;;
    simple-audio-card,dai-link@0 {
        reg = &lt;0&gt;;
        format = "dsp_b";
        cpu {
            sound-dai = &lt;&amp;audio_controller 16&gt;;
        };
        codec {
            sound-dai = &lt;&amp;codec1&gt;;
            dai-tdm-slot-num = &lt;4&gt;;
            dai-tdm-slot-width = &lt;8&gt;;
            /* TS 3, 5, 7, 9 */
            dai-tdm-slot-tx-mask = &lt;0 0 0 1 0 1 0 1 0 1&gt;;
            dai-tdm-slot-rx-mask = &lt;0 0 0 1 0 1 0 1 0 1&gt;;
        };
    };
    simple-audio-card,dai-link@1 {
        reg = &lt;1&gt;;
        format = "dsp_b";
        cpu {
            sound-dai = &lt;&amp;audio_controller 17&gt;;
        };
        codec {
            sound-dai = &lt;&amp;codec2&gt;;
            dai-tdm-slot-num = &lt;4&gt;;
            dai-tdm-slot-width = &lt;8&gt;;
            /* TS 2, 4, 6, 8 */
            dai-tdm-slot-tx-mask = &lt;0 0 1 0 1 0 1 0 1&gt;;
            dai-tdm-slot-rx-mask = &lt;0 0 1 0 1 0 1 0 1&gt;;
        };
    };
    simple-audio-card,dai-link@2 {
        reg = &lt;2&gt;;
        format = "dsp_b";
        cpu {
            sound-dai = &lt;&amp;audio_controller 18&gt;;
        };
        codec {
            sound-dai = &lt;&amp;codec3&gt;;
            dai-tdm-slot-num = &lt;2&gt;;
            dai-tdm-slot-width = &lt;8&gt;;
            /* TS 9, 10 */
            dai-tdm-slot-tx-mask = &lt;0 0 0 0 0 0 0 0 0 1 1&gt;;
            dai-tdm-slot-rx-mask = &lt;0 0 0 0 0 0 0 0 0 1 1&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>
