Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: dt-bindings: mt8195: Document audio-routing and dai-link subnode

Document the dai-link subnodes and the audio-routing property, allowing
to describe machine specific audio hardware and links in device tree.

While at it, also deprecate the old properties which were previously
used with driver hardcoded configuration.

Also, since describing machine specific audio hardware and links replaces
the now deprecated old logic doing the same in a driver hardcoded fashion,
it is not allowed to have both the old and new properties together.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240416071410.75620-15-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

AngeloGioacchino Del Regno and committed by
Mark Brown
dc7a3130 6ed619b3

+134
+134
Documentation/devicetree/bindings/sound/mt8195-mt6359.yaml
··· 12 12 description: 13 13 This binding describes the MT8195 sound card. 14 14 15 + allOf: 16 + - $ref: sound-card-common.yaml# 17 + 15 18 properties: 16 19 compatible: 17 20 enum: ··· 26 23 $ref: /schemas/types.yaml#/definitions/string 27 24 description: User specified audio sound card name 28 25 26 + audio-routing: 27 + description: 28 + A list of the connections between audio components. Each entry is a 29 + pair of strings, the first being the connection's sink, the second 30 + being the connection's source. 31 + Valid names could be the input or output widgets of audio components, 32 + power supplies, MicBias of codec and the software switch. 33 + minItems: 2 34 + items: 35 + enum: 36 + # Sinks 37 + - Ext Spk 38 + - Headphone 39 + - IN1P 40 + - Left Spk 41 + - Right Spk 42 + 43 + # Sources 44 + - Headset Mic 45 + - HPOL 46 + - HPOR 47 + - Left BE_OUT 48 + - Left SPO 49 + - Right BE_OUT 50 + - Right SPO 51 + - Speaker 52 + 29 53 mediatek,platform: 30 54 $ref: /schemas/types.yaml#/definitions/phandle 31 55 description: The phandle of MT8195 ASoC platform. ··· 60 30 mediatek,dptx-codec: 61 31 $ref: /schemas/types.yaml#/definitions/phandle 62 32 description: The phandle of MT8195 Display Port Tx codec node. 33 + deprecated: true 63 34 64 35 mediatek,hdmi-codec: 65 36 $ref: /schemas/types.yaml#/definitions/phandle 66 37 description: The phandle of MT8195 HDMI codec node. 38 + deprecated: true 67 39 68 40 mediatek,adsp: 69 41 $ref: /schemas/types.yaml#/definitions/phandle ··· 77 45 A list of the desired dai-links in the sound card. Each entry is a 78 46 name defined in the machine driver. 79 47 48 + patternProperties: 49 + ".*-dai-link$": 50 + type: object 51 + additionalProperties: false 52 + description: 53 + Container for dai-link level properties and CODEC sub-nodes. 54 + 55 + properties: 56 + link-name: 57 + description: Indicates dai-link name and PCM stream name 58 + enum: 59 + - DPTX_BE 60 + - ETDM1_IN_BE 61 + - ETDM2_IN_BE 62 + - ETDM1_OUT_BE 63 + - ETDM2_OUT_BE 64 + - ETDM3_OUT_BE 65 + - PCM1_BE 66 + 67 + codec: 68 + description: Holds subnode which indicates codec dai. 69 + type: object 70 + additionalProperties: false 71 + properties: 72 + sound-dai: 73 + minItems: 1 74 + maxItems: 2 75 + required: 76 + - sound-dai 77 + 78 + dai-format: 79 + description: audio format 80 + enum: [ i2s, right_j, left_j, dsp_a, dsp_b ] 81 + 82 + mediatek,clk-provider: 83 + $ref: /schemas/types.yaml#/definitions/string 84 + description: Indicates dai-link clock master. 85 + enum: [ cpu, codec ] 86 + 87 + required: 88 + - link-name 89 + 80 90 additionalProperties: false 81 91 82 92 required: 83 93 - compatible 84 94 - mediatek,platform 85 95 96 + # Disallow legacy properties if xxx-dai-link nodes are specified 97 + if: 98 + not: 99 + patternProperties: 100 + ".*-dai-link$": false 101 + then: 102 + properties: 103 + mediatek,dptx-codec: false 104 + mediatek,hdmi-codec: false 105 + 86 106 examples: 87 107 - | 88 108 89 109 sound: mt8195-sound { 90 110 compatible = "mediatek,mt8195_mt6359_rt1019_rt5682"; 111 + model = "mt8195_r1019_5682"; 91 112 mediatek,platform = <&afe>; 92 113 pinctrl-names = "default"; 93 114 pinctrl-0 = <&aud_pins_default>; 115 + 116 + audio-routing = 117 + "Headphone", "HPOL", 118 + "Headphone", "HPOR", 119 + "IN1P", "Headset Mic", 120 + "Ext Spk", "Speaker"; 121 + 122 + mm-dai-link { 123 + link-name = "ETDM1_IN_BE"; 124 + mediatek,clk-provider = "cpu"; 125 + }; 126 + 127 + hs-playback-dai-link { 128 + link-name = "ETDM1_OUT_BE"; 129 + mediatek,clk-provider = "cpu"; 130 + codec { 131 + sound-dai = <&headset_codec>; 132 + }; 133 + }; 134 + 135 + hs-capture-dai-link { 136 + link-name = "ETDM2_IN_BE"; 137 + mediatek,clk-provider = "cpu"; 138 + codec { 139 + sound-dai = <&headset_codec>; 140 + }; 141 + }; 142 + 143 + spk-playback-dai-link { 144 + link-name = "ETDM2_OUT_BE"; 145 + mediatek,clk-provider = "cpu"; 146 + codec { 147 + sound-dai = <&spk_amplifier>; 148 + }; 149 + }; 150 + 151 + hdmi-dai-link { 152 + link-name = "ETDM3_OUT_BE"; 153 + codec { 154 + sound-dai = <&hdmi_tx>; 155 + }; 156 + }; 157 + 158 + displayport-dai-link { 159 + link-name = "DPTX_BE"; 160 + codec { 161 + sound-dai = <&dp_tx>; 162 + }; 163 + }; 94 164 }; 95 165 96 166 ...