# Amlogic AXG sound card

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

> Device-tree binding reference for Amlogic AXG sound card.

<!-- 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;amlogic&#44;axg&#45;sound&#45;card&#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;Jerome Brunet &#60;jbrunet&#64;baylibre&#46;com&#62;&#34;</code></span>

<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>sound&#45;card&#45;common&#46;yaml&#35;</code>](</kernel/hardware/devicetree-bindings/dt-sound/sound-card-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> — not listed as required here

**Exact value (<code>const</code>):** <span id="dt-1765195bf8e86c3ccec6"><code>&#34;amlogic&#44;axg&#45;sound&#45;card&#34;</code></span>

<a id="dt-92d3cb2c57cfa58618be"></a>

### <code>audio&#45;aux&#45;devs</code> — not listed as required here

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

<div id="dt-50706304ab7bd3f53f75">
<p style="white-space: pre-wrap">list of auxiliary devices</p>
</div>

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

### <code>audio&#45;widgets</code> — not listed as required here

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-0a06a332be9f64501c83">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;non&#45;unique&#45;string&#45;array</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-493f5d03b14b15ff7558>)</span>

<div id="dt-51633fb0c7a2a3903455">
<p style="white-space: pre-wrap">A list off component DAPM widget. Each entry is a pair of strings, the first being the widget type, the second being the widget name</p>
</div>

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

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

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

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

<div id="dt-853257adf43f6880d753">
<p style="white-space: pre-wrap">Base PLL clocks of audio susbsytem, used to configure base clock frequencies for different audio use-cases.</p>
</div>

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

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

<a id="dt-56f41762ec5bb833dd20"></a>

### <code>&#94;dai&#45;link&#45;&#91;0&#45;9&#93;&#43;&#36;</code> — name matches this regular expression

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

<a id="dt-14842ea983c6ccc7d4b5"></a>

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

<code>false</code>

Not allowed by this rule.

<div id="dt-7c27ca26e21f660e1e36">
<p style="white-space: pre-wrap">Container for dai-link level properties and the CODEC sub-nodes. There should be at least one (and probably more) subnode of this type</p>
</div>

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

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

<a id="dt-17b16e1260d470cc89cb"></a>

**<code>dai&#45;format</code> — not listed as required here**

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-393bc6f1534008ead046">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;string</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-2c695d502852c3a1e1b7>)</span>

**Allowed values (<code>enum</code>):** <a id="dt-d2612ab7ffe0719c4791"></a> <span id="dt-cc446460dfd589f39b5a"><code>&#34;i2s&#34;</code></span>, <span id="dt-456640132e1d325d840f"><code>&#34;left&#45;j&#34;</code></span>, <span id="dt-556d0e034eb4ab290ae8"><code>&#34;dsp&#95;a&#34;</code></span>

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

**<code>dai&#45;tdm&#45;slot&#45;num</code> — not listed as required here**

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

<div id="dt-0b3d30e985036e12a214">
<p style="white-space: pre-wrap">Number of slots in use. If omitted, slot number is set to accommodate the largest mask provided.</p>
</div>

**Maximum value (<code>maximum</code>):** <span id="dt-b524d130c629d5fe34ab"><code>32</code></span>

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

**<code>dai&#45;tdm&#45;slot&#45;width</code> — not listed as required here**

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-00869e052feb4449019a">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

<div id="dt-e767f8373d6c62b5771f">
<p style="white-space: pre-wrap">Width in bits for each slot</p>
</div>

**Allowed values (<code>enum</code>):** <a id="dt-c1e87854d0eef72a6e61"></a> <span id="dt-041e0bb3a2c653c4a728"><code>8</code></span>, <span id="dt-190eece585f010ac17b0"><code>16</code></span>, <span id="dt-83774068d97fce42c7fb"><code>20</code></span>, <span id="dt-8cfe981c26733ca9a717"><code>24</code></span>, <span id="dt-48b707dbeb51a14b1724"><code>32</code></span>

**Default value (<code>default</code>):** <span id="dt-714142b1c0baa1434998"><code>32</code></span>

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

**<code>mclk&#45;fs</code> — not listed as required here**

**Shared schema rule (<code>&#36;ref</code>):** <span id="dt-4db7319211b427e0e617">[<code>&#47;schemas&#47;types&#46;yaml&#35;&#47;definitions&#47;uint32</code>](</kernel/hardware/devicetree-bindings/dt-shared/types.md#dt-d57795d6573ee5d67d37>)</span>

<div id="dt-ad755f9af6840efe628a">
<p style="white-space: pre-wrap">Multiplication factor between the frame rate and master clock rate</p>
</div>

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

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

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

<div id="dt-90dc847ff2d69d3831dd">
<p style="white-space: pre-wrap">phandle of the CPU DAI</p>
</div>

<a id="dt-39975eb09b3cd1ede7b8"></a>

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

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

**<code>&#94;dai&#45;tdm&#45;slot&#45;&#40;t&#124;r&#41;x&#45;mask&#45;&#91;0&#45;3&#93;&#36;</code> — name matches this regular expression**

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

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

**Maximum number of items (<code>maxItems</code>):** <span id="dt-7f7dfd3fe245b1832ebd"><code>32</code></span>

<div id="dt-a30996a230692ae1c256">
<p style="white-space: pre-wrap">Transmit and receive cpu slot masks of each TDM lane When omitted, mask is assumed to have to no slots. A valid interface must have at least one slot, so at least one these mask should be provided with an enabled slot.</p>
</div>

<a id="dt-6a0bbbeda176b3b34179"></a>

**<code>&#94;codec&#40;&#45;&#91;0&#45;9&#93;&#43;&#41;&#63;&#36;</code> — name matches this regular expression**

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

<a id="dt-24d40784aeea4534ff52"></a>

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

<code>false</code>

Not allowed by this rule.

<div id="dt-f75cf825cd0cb630e46a">
<p style="white-space: pre-wrap">dai-link representing backend links should have at least one subnode. One subnode for each codec of the dai-link. dai-link representing frontend links have no codec, therefore have no subnodes</p>
</div>

<a id="dt-0c033f00922f8acbd0ac"></a>

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

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

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

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

<div id="dt-7be1c75d14c5f1640815">
<p style="white-space: pre-wrap">phandle of the codec DAI</p>
</div>

<a id="dt-735779c988cd50bf6112"></a>

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

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

**<code>&#94;dai&#45;tdm&#45;slot&#45;&#40;t&#124;r&#41;x&#45;mask&#36;</code> — name matches this regular expression**

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

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

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

<div id="dt-e4ad9082da8476c8f376">
<p style="white-space: pre-wrap">Transmit and receive codec slot masks</p>
</div>

**Required in this object (<code>required</code>):** <a id="dt-dc98ecd923462e7489e7"></a> <span id="dt-0e60559fddf072e879fb"><code>&#34;sound&#45;dai&#34;</code></span>

**Required in this object (<code>required</code>):** <a id="dt-883bf2b15500b3eb27a0"></a> <span id="dt-26d54f64f6bc2a9b4488"><code>&#34;sound&#45;dai&#34;</code></span>

**Required in this object (<code>required</code>):** <a id="dt-8313173ff1c9b300d560"></a> <span id="dt-048b70ee865d6847aa3d"><code>&#34;dai&#45;link&#45;0&#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">sound {
    compatible = "amlogic,axg-sound-card";
    model = "AXG-S420";
    audio-aux-devs = &lt;&amp;tdmin_a&gt;, &lt;&amp;tdmout_c&gt;;
    audio-widgets = "Line", "Lineout",
                    "Line", "Linein",
                    "Speaker", "Speaker1 Left",
                    "Speaker", "Speaker1 Right",
                    "Speaker", "Speaker2 Left",
                    "Speaker", "Speaker2 Right";
    audio-routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2",
                    "SPDIFOUT IN 0", "FRDDR_A OUT 3",
                    "TDM_C Playback", "TDMOUT_C OUT",
                    "TDMIN_A IN 2", "TDM_C Capture",
                    "TDMIN_A IN 5", "TDM_C Loopback",
                    "TODDR_A IN 0", "TDMIN_A OUT",
                    "Lineout", "Lineout AOUTL",
                    "Lineout", "Lineout AOUTR",
                    "Speaker1 Left", "SPK1 OUT_A",
                    "Speaker2 Left", "SPK2 OUT_A",
                    "Speaker1 Right", "SPK1 OUT_B",
                    "Speaker2 Right", "SPK2 OUT_B",
                    "Linein AINL", "Linein",
                    "Linein AINR", "Linein";

    dai-link-0 {
        sound-dai = &lt;&amp;frddr_a&gt;;
    };

    dai-link-1 {
        sound-dai = &lt;&amp;toddr_a&gt;;
    };

    dai-link-2 {
        sound-dai = &lt;&amp;tdmif_c&gt;;
        dai-format = "i2s";
        dai-tdm-slot-tx-mask-2 = &lt;1 1&gt;;
        dai-tdm-slot-tx-mask-3 = &lt;1 1&gt;;
        dai-tdm-slot-rx-mask-1 = &lt;1 1&gt;;
        mclk-fs = &lt;256&gt;;

        codec-0 {
            sound-dai = &lt;&amp;lineout&gt;;
        };

        codec-1 {
            sound-dai = &lt;&amp;speaker_amp1&gt;;
        };

        codec-2 {
            sound-dai = &lt;&amp;speaker_amp2&gt;;
        };

        codec-3 {
            sound-dai = &lt;&amp;linein&gt;;
        };
    };

    dai-link-3 {
        sound-dai = &lt;&amp;spdifout&gt;;

        codec {
            sound-dai = &lt;&amp;spdif_dit&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>
