diff mbox

[v5,21/23] ASoC: qdsp6: dt-bindings: Add apq8096 machine bindings

Message ID 20180418153157.1960-22-srinivas.kandagatla@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Srinivas Kandagatla April 18, 2018, 3:31 p.m. UTC
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

Add devicetree bindings documentation file for Qualcomm apq8096 sound card.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 .../devicetree/bindings/sound/qcom,apq8096.txt     | 76 ++++++++++++++++++++++
 1 file changed, 76 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,apq8096.txt

Comments

Rob Herring April 24, 2018, 4:25 p.m. UTC | #1
On Wed, Apr 18, 2018 at 04:31:55PM +0100, srinivas.kandagatla@linaro.org wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> 
> Add devicetree bindings documentation file for Qualcomm apq8096 sound card.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  .../devicetree/bindings/sound/qcom,apq8096.txt     | 76 ++++++++++++++++++++++
>  1 file changed, 76 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/qcom,apq8096.txt
> 
> diff --git a/Documentation/devicetree/bindings/sound/qcom,apq8096.txt b/Documentation/devicetree/bindings/sound/qcom,apq8096.txt
> new file mode 100644
> index 000000000000..37e23d926b95
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/qcom,apq8096.txt
> @@ -0,0 +1,76 @@
> +* Qualcomm Technologies APQ8096 ASoC sound card driver
> +
> +This binding describes the APQ8096 sound card, which uses qdsp for audio.
> +
> +- compatible:
> +	Usage: required
> +	Value type: <stringlist>
> +	Definition: must be "qcom,apq8096-sndcard"
> +
> +- qcom,audio-routing:
> +	Usage: Optional
> +	Value type: <stringlist>
> +	Definition:  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:

Please list out valid values here.

> +
> += dailinks
> +Each subnode of sndcard represents either a dailink, and subnodes of each
> +dailinks would be cpu/codec/platform dais.
> +
> +- link-name:

Not a standard property, but I guess that sneaked in with the 8016 
binding...

> +	Usage: required
> +	Value type: <string>
> +	Definition: User friendly name for dai link
> +
> += CPU, PLATFORM, CODEC dais subnodes
> +- cpu:
> +	Usage: required
> +	Value type: <subnode>
> +	Definition: cpu dai sub-node
> +
> +- codec:
> +	Usage: Optional
> +	Value type: <subnode>
> +	Definition: codec dai sub-node
> +
> +- platform:
> +	Usage: Optional
> +	Value type: <subnode>
> +	Definition: platform dai sub-node
> +
> +- sound-dai:
> +	Usage: required
> +	Value type: <phandle>

phandle with args.

> +	Definition: dai phandle/s and port of CPU/CODEC/PLATFORM node.
> +
> +Example:
> +
> +audio {
> +	compatible = "qcom,apq8096-sndcard";
> +	qcom,model = "DB820c";
> +
> +	mm1-dai-link {
> +		link-name = "MultiMedia1";
> +		cpu {
> +			sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
> +		};
> +	};
> +
> +	hdmi-dai-link {
> +		link-name = "HDMI Playback";
> +		cpu {
> +			sound-dai = <&q6afe HDMI_RX>;
> +		};
> +
> +		platform {
> +			sound-dai = <&q6adm>;
> +		};
> +
> +		codec {
> +			sound-dai = <&hdmi 0>;
> +		};
> +	};
> +};
> -- 
> 2.16.2
>
Srinivas Kandagatla April 24, 2018, 4:49 p.m. UTC | #2
Thanks for the review.

On 24/04/18 17:25, Rob Herring wrote:
> On Wed, Apr 18, 2018 at 04:31:55PM +0100, srinivas.kandagatla@linaro.org wrote:
>> From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>>
>> Add devicetree bindings documentation file for Qualcomm apq8096 sound card.
>>
>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>> ---
>>   .../devicetree/bindings/sound/qcom,apq8096.txt     | 76 ++++++++++++++++++++++
>>   1 file changed, 76 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/sound/qcom,apq8096.txt
>>
>> diff --git a/Documentation/devicetree/bindings/sound/qcom,apq8096.txt b/Documentation/devicetree/bindings/sound/qcom,apq8096.txt
>> new file mode 100644
>> index 000000000000..37e23d926b95
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/sound/qcom,apq8096.txt
>> @@ -0,0 +1,76 @@
>> +* Qualcomm Technologies APQ8096 ASoC sound card driver
>> +
>> +This binding describes the APQ8096 sound card, which uses qdsp for audio.
>> +
>> +- compatible:
>> +	Usage: required
>> +	Value type: <stringlist>
>> +	Definition: must be "qcom,apq8096-sndcard"
>> +
>> +- qcom,audio-routing:
>> +	Usage: Optional
>> +	Value type: <stringlist>
>> +	Definition:  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:
> 
> Please list out valid values here.

I can list the values for the HDMI playback use-case, but the list would 
grow as we start adding wcd9335 codec support.

> 
>> +
>> += dailinks
>> +Each subnode of sndcard represents either a dailink, and subnodes of each
>> +dailinks would be cpu/codec/platform dais.
>> +
>> +- link-name:
> 
> Not a standard property, but I guess that sneaked in with the 8016
> binding...
Yes, I followed 8016 bindings.

Am happy to prefix this with qcom if that makes more sense.
> 
>> +	Usage: required
>> +	Value type: <string>
>> +	Definition: User friendly name for dai link
>> +
>> += CPU, PLATFORM, CODEC dais subnodes
>> +- cpu:
>> +	Usage: required
>> +	Value type: <subnode>
>> +	Definition: cpu dai sub-node
>> +
>> +- codec:
>> +	Usage: Optional
>> +	Value type: <subnode>
>> +	Definition: codec dai sub-node
>> +
>> +- platform:
>> +	Usage: Optional
>> +	Value type: <subnode>
>> +	Definition: platform dai sub-node
>> +
>> +- sound-dai:
>> +	Usage: required
>> +	Value type: <phandle>
> 
> phandle with args.
Yep.

--srini
Rob Herring April 25, 2018, 3:04 p.m. UTC | #3
On Tue, Apr 24, 2018 at 11:49 AM, Srinivas Kandagatla
<srinivas.kandagatla@linaro.org> wrote:
> Thanks for the review.
>
>
> On 24/04/18 17:25, Rob Herring wrote:
>>
>> On Wed, Apr 18, 2018 at 04:31:55PM +0100, srinivas.kandagatla@linaro.org
>> wrote:
>>>
>>> From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>>>
>>> Add devicetree bindings documentation file for Qualcomm apq8096 sound
>>> card.
>>>
>>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>>> ---
>>>   .../devicetree/bindings/sound/qcom,apq8096.txt     | 76
>>> ++++++++++++++++++++++
>>>   1 file changed, 76 insertions(+)
>>>   create mode 100644
>>> Documentation/devicetree/bindings/sound/qcom,apq8096.txt
>>>
>>> diff --git a/Documentation/devicetree/bindings/sound/qcom,apq8096.txt
>>> b/Documentation/devicetree/bindings/sound/qcom,apq8096.txt
>>> new file mode 100644
>>> index 000000000000..37e23d926b95
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/sound/qcom,apq8096.txt
>>> @@ -0,0 +1,76 @@
>>> +* Qualcomm Technologies APQ8096 ASoC sound card driver
>>> +
>>> +This binding describes the APQ8096 sound card, which uses qdsp for
>>> audio.
>>> +
>>> +- compatible:
>>> +       Usage: required
>>> +       Value type: <stringlist>
>>> +       Definition: must be "qcom,apq8096-sndcard"
>>> +
>>> +- qcom,audio-routing:
>>> +       Usage: Optional
>>> +       Value type: <stringlist>
>>> +       Definition:  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:
>>
>>
>> Please list out valid values here.
>
>
> I can list the values for the HDMI playback use-case, but the list would
> grow as we start adding wcd9335 codec support.

If you don't have the values, then how does one validate a DT is correct?

Honestly, a single property like this seems insufficient to describe
audio routing.

>>> +
>>> += dailinks
>>> +Each subnode of sndcard represents either a dailink, and subnodes of
>>> each
>>> +dailinks would be cpu/codec/platform dais.
>>> +
>>> +- link-name:
>>
>>
>> Not a standard property, but I guess that sneaked in with the 8016
>> binding...
>
> Yes, I followed 8016 bindings.
>
> Am happy to prefix this with qcom if that makes more sense.

I'd just leave it to be consistent.
Srinivas Kandagatla April 25, 2018, 4:16 p.m. UTC | #4
On 25/04/18 16:04, Rob Herring wrote:
>> I can list the values for the HDMI playback use-case, but the list would
>> grow as we start adding wcd9335 codec support.
> If you don't have the values, then how does one validate a DT is correct?
> 
I can list all the sources and sinks wired on the board in next version.

> Honestly, a single property like this seems insufficient to describe
> audio routing.

This is how all the audio drivers do routing in DT, non DT is also 
pretty much inline with this.


--srini
> 
>>>> +
Mark Brown April 25, 2018, 4:21 p.m. UTC | #5
On Wed, Apr 25, 2018 at 10:04:54AM -0500, Rob Herring wrote:
> On Tue, Apr 24, 2018 at 11:49 AM, Srinivas Kandagatla

> If you don't have the values, then how does one validate a DT is correct?

> Honestly, a single property like this seems insufficient to describe
> audio routing.

It's perfectly fine, it's a list of source to sink mappings which can
handle any set of N:M links.
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/sound/qcom,apq8096.txt b/Documentation/devicetree/bindings/sound/qcom,apq8096.txt
new file mode 100644
index 000000000000..37e23d926b95
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qcom,apq8096.txt
@@ -0,0 +1,76 @@ 
+* Qualcomm Technologies APQ8096 ASoC sound card driver
+
+This binding describes the APQ8096 sound card, which uses qdsp for audio.
+
+- compatible:
+	Usage: required
+	Value type: <stringlist>
+	Definition: must be "qcom,apq8096-sndcard"
+
+- qcom,audio-routing:
+	Usage: Optional
+	Value type: <stringlist>
+	Definition:  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:
+
+= dailinks
+Each subnode of sndcard represents either a dailink, and subnodes of each
+dailinks would be cpu/codec/platform dais.
+
+- link-name:
+	Usage: required
+	Value type: <string>
+	Definition: User friendly name for dai link
+
+= CPU, PLATFORM, CODEC dais subnodes
+- cpu:
+	Usage: required
+	Value type: <subnode>
+	Definition: cpu dai sub-node
+
+- codec:
+	Usage: Optional
+	Value type: <subnode>
+	Definition: codec dai sub-node
+
+- platform:
+	Usage: Optional
+	Value type: <subnode>
+	Definition: platform dai sub-node
+
+- sound-dai:
+	Usage: required
+	Value type: <phandle>
+	Definition: dai phandle/s and port of CPU/CODEC/PLATFORM node.
+
+Example:
+
+audio {
+	compatible = "qcom,apq8096-sndcard";
+	qcom,model = "DB820c";
+
+	mm1-dai-link {
+		link-name = "MultiMedia1";
+		cpu {
+			sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
+		};
+	};
+
+	hdmi-dai-link {
+		link-name = "HDMI Playback";
+		cpu {
+			sound-dai = <&q6afe HDMI_RX>;
+		};
+
+		platform {
+			sound-dai = <&q6adm>;
+		};
+
+		codec {
+			sound-dai = <&hdmi 0>;
+		};
+	};
+};