Qualcomm APQ8016 and similar sound cards

Schema identifier ($id): "http://devicetree.org/schemas/sound/qcom,apq8016-sbc-sndcard.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Srinivas Kandagatla <srinivas.kandagatla@linaro.org>", "Stephan Gerhold <stephan@gerhold.net>"

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "qcom,apq8016-sbc-sndcard", "qcom,msm8916-qdsp6-sndcard"

reg — required here #

Array item rules (items) #

Item 1

Microphone I/O mux register address

Item 2

Speaker I/O mux register address

reg-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "mic-iomux"

Item 2

Exact value (const): "spkr-iomux"

audio-routing — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/non-unique-string-array

A list of the connections between audio components. Each entry is a pair of strings, the first being the connection's sink, the second being the connection's source. Valid names could be power supplies, MicBias of codec and the jacks on the board.

aux-devs — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle-array

List of phandles pointing to auxiliary devices, such as amplifiers, to be added to the sound card.

model — required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/string

User visible long sound card name

pin-switches — not listed as required here #

List of widget names for which pin switches should be created.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/string-array

widgets — not listed as required here #

User specified audio sound widgets.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/non-unique-string-array

Properties matching a name pattern (patternProperties) #

Each subnode represents a dai link. Subnodes of each dai links would be cpu/codec dais.

Value type (type): "object"

Properties and child nodes (properties) #

link-name — required here

Indicates dai-link name and PCM stream name.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/string

Maximum number of items (maxItems): 1

cpu — required here

Holds subnode which indicates cpu dai.

Value type (type): "object"

Properties not matched by properties or patternProperties in this schema (additionalProperties)

false

Not allowed by this rule.

Properties and child nodes (properties)

sound-dai — not listed as required here

Maximum number of items (maxItems): 1

platform — not listed as required here

Holds subnode which indicates platform dai.

Value type (type): "object"

Properties not matched by properties or patternProperties in this schema (additionalProperties)

false

Not allowed by this rule.

Properties and child nodes (properties)

sound-dai — not listed as required here

Maximum number of items (maxItems): 1

codec — not listed as required here

Holds subnode which indicates codec dai.

Value type (type): "object"

Properties not matched by properties or patternProperties in this schema (additionalProperties)

false

Not allowed by this rule.

Properties and child nodes (properties)

sound-dai — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 8

Required in this object (required): "link-name", "cpu"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Required in this object (required): "compatible", "reg", "reg-names", "model"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/sound/qcom,lpass.h>
sound@7702000 {
    compatible = "qcom,apq8016-sbc-sndcard";
    reg = <0x07702000 0x4>, <0x07702004 0x4>;
    reg-names = "mic-iomux", "spkr-iomux";

    model = "DB410c";
    audio-routing =
        "AMIC2", "MIC BIAS Internal2",
        "AMIC3", "MIC BIAS External1";

    pinctrl-0 = <&cdc_pdm_lines_act &ext_sec_tlmm_lines_act &ext_mclk_tlmm_lines_act>;
    pinctrl-1 = <&cdc_pdm_lines_sus &ext_sec_tlmm_lines_sus &ext_mclk_tlmm_lines_sus>;
    pinctrl-names = "default", "sleep";

    quaternary-dai-link {
        link-name = "ADV7533";
        cpu {
            sound-dai = <&lpass MI2S_QUATERNARY>;
        };
        codec {
            sound-dai = <&adv_bridge 0>;
        };
    };

    primary-dai-link {
        link-name = "WCD";
        cpu {
            sound-dai = <&lpass MI2S_PRIMARY>;
        };
        codec {
            sound-dai = <&lpass_codec 0>, <&wcd_codec 0>;
        };
    };

    tertiary-dai-link {
        link-name = "WCD-Capture";
        cpu {
            sound-dai = <&lpass MI2S_TERTIARY>;
        };
        codec {
            sound-dai = <&lpass_codec 1>, <&wcd_codec 1>;
        };
    };
};
#include <dt-bindings/sound/qcom,q6afe.h>
#include <dt-bindings/sound/qcom,q6asm.h>
sound@7702000 {
    compatible = "qcom,msm8916-qdsp6-sndcard";
    reg = <0x07702000 0x4>, <0x07702004 0x4>;
    reg-names = "mic-iomux", "spkr-iomux";

    model = "msm8916";
    widgets =
        "Speaker", "Speaker",
        "Headphone", "Headphones";
    pin-switches = "Speaker";
    audio-routing =
        "Speaker", "Speaker Amp OUT",
        "Speaker Amp IN", "HPH_R",
        "Headphones", "HPH_L",
        "Headphones", "HPH_R",
        "AMIC1", "MIC BIAS Internal1",
        "AMIC2", "MIC BIAS Internal2",
        "AMIC3", "MIC BIAS Internal3";
    aux-devs = <&speaker_amp>;

    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&cdc_pdm_lines_act>;
    pinctrl-1 = <&cdc_pdm_lines_sus>;

    mm1-dai-link {
        link-name = "MultiMedia1";
        cpu {
            sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
        };
    };

    primary-dai-link {
        link-name = "Primary MI2S";
        cpu {
            sound-dai = <&q6afedai PRIMARY_MI2S_RX>;
        };
        platform {
            sound-dai = <&q6routing>;
        };
        codec {
            sound-dai = <&lpass_codec 0>, <&wcd_codec 0>;
        };
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause

Edit this page