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: mt8192: 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 the driver's partially 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-16-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

AngeloGioacchino Del Regno and committed by
Mark Brown
5a50483c dc7a3130

+129 -10
+129 -10
Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml
··· 13 13 description: 14 14 This binding describes the MT8192 sound card. 15 15 16 + allOf: 17 + - $ref: sound-card-common.yaml# 18 + 16 19 properties: 17 20 compatible: 18 21 enum: 19 22 - mediatek,mt8192_mt6359_rt1015_rt5682 20 23 - mediatek,mt8192_mt6359_rt1015p_rt5682 21 24 - mediatek,mt8192_mt6359_rt1015p_rt5682s 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 + - Speakers 38 + - Headphone Jack 39 + - IN1P 40 + - Left Spk 41 + - Right Spk 42 + 43 + # Sources 44 + - Headset Mic 45 + - HPOL 46 + - HPOR 47 + - Left SPO 48 + - Right SPO 49 + - Speaker 22 50 23 51 mediatek,platform: 24 52 $ref: /schemas/types.yaml#/definitions/phandle ··· 55 27 mediatek,hdmi-codec: 56 28 $ref: /schemas/types.yaml#/definitions/phandle 57 29 description: The phandle of HDMI codec. 30 + deprecated: true 58 31 59 32 headset-codec: 60 33 type: object 61 34 additionalProperties: false 35 + deprecated: true 62 36 63 37 properties: 64 38 sound-dai: ··· 71 41 speaker-codecs: 72 42 type: object 73 43 additionalProperties: false 44 + deprecated: true 74 45 75 46 properties: 76 47 sound-dai: ··· 82 51 required: 83 52 - sound-dai 84 53 85 - additionalProperties: false 54 + patternProperties: 55 + ".*-dai-link$": 56 + type: object 57 + additionalProperties: false 58 + 59 + description: 60 + Container for dai-link level properties and CODEC sub-nodes. 61 + 62 + properties: 63 + link-name: 64 + description: Indicates dai-link name and PCM stream name 65 + enum: 66 + - I2S0 67 + - I2S1 68 + - I2S2 69 + - I2S3 70 + - I2S4 71 + - I2S5 72 + - I2S6 73 + - I2S7 74 + - I2S8 75 + - I2S9 76 + - TDM 77 + 78 + codec: 79 + description: Holds subnode which indicates codec dai. 80 + type: object 81 + additionalProperties: false 82 + properties: 83 + sound-dai: 84 + minItems: 1 85 + maxItems: 2 86 + required: 87 + - sound-dai 88 + 89 + dai-format: 90 + description: audio format 91 + enum: [ i2s, right_j, left_j, dsp_a, dsp_b ] 92 + 93 + mediatek,clk-provider: 94 + $ref: /schemas/types.yaml#/definitions/string 95 + description: Indicates dai-link clock master. 96 + enum: [ cpu, codec ] 97 + 98 + required: 99 + - link-name 100 + 101 + unevaluatedProperties: false 86 102 87 103 required: 88 104 - compatible 89 105 - mediatek,platform 90 - - headset-codec 91 - - speaker-codecs 106 + 107 + # Disallow legacy properties if xxx-dai-link nodes are specified 108 + if: 109 + not: 110 + patternProperties: 111 + ".*-dai-link$": false 112 + then: 113 + properties: 114 + headset-codec: false 115 + speaker-codecs: false 116 + mediatek,hdmi-codec: false 92 117 93 118 examples: 94 119 - | 95 120 96 121 sound: mt8192-sound { 97 122 compatible = "mediatek,mt8192_mt6359_rt1015_rt5682"; 98 - mediatek,platform = <&afe>; 99 - mediatek,hdmi-codec = <&anx_bridge_dp>; 123 + model = "mt8192_mt6359_rt1015_rt5682"; 100 124 pinctrl-names = "aud_clk_mosi_off", 101 125 "aud_clk_mosi_on"; 102 126 pinctrl-0 = <&aud_clk_mosi_off>; 103 127 pinctrl-1 = <&aud_clk_mosi_on>; 128 + mediatek,platform = <&afe>; 104 129 105 - headset-codec { 106 - sound-dai = <&rt5682>; 130 + audio-routing = 131 + "Headphone Jack", "HPOL", 132 + "Headphone Jack", "HPOR", 133 + "IN1P", "Headset Mic", 134 + "Speakers", "Speaker"; 135 + 136 + spk-playback-dai-link { 137 + link-name = "I2S3"; 138 + dai-format = "i2s"; 139 + mediatek,clk-provider = "cpu"; 140 + codec { 141 + sound-dai = <&rt1015p>; 142 + }; 107 143 }; 108 144 109 - speaker-codecs { 110 - sound-dai = <&rt1015_l>, 111 - <&rt1015_r>; 145 + hs-playback-dai-link { 146 + link-name = "I2S8"; 147 + dai-format = "i2s"; 148 + mediatek,clk-provider = "cpu"; 149 + codec { 150 + sound-dai = <&rt5682 0>; 151 + }; 152 + }; 153 + 154 + hs-capture-dai-link { 155 + link-name = "I2S9"; 156 + dai-format = "i2s"; 157 + mediatek,clk-provider = "cpu"; 158 + codec { 159 + sound-dai = <&rt5682 0>; 160 + }; 161 + }; 162 + 163 + displayport-dai-link { 164 + link-name = "TDM"; 165 + dai-format = "dsp_a"; 166 + codec { 167 + sound-dai = <&anx_bridge_dp>; 168 + }; 112 169 }; 113 170 }; 114 171