diff mbox series

[1/2] ASoC: dt-bindings: qcom: Document "aux-devs" property

Message ID 20200819091533.2334-2-stephan@gerhold.net
State Changes Requested, archived
Headers show
Series ASoC: qcom: common: Parse auxiliary devices from device tree | expand

Checks

Context Check Description
robh/checkpatch success

Commit Message

Stephan Gerhold Aug. 19, 2020, 9:15 a.m. UTC
In some cases we need to probe additional audio components that do
not appear as part of the DAI links specified in the device tree.
Examples for this are auxiliary devices such as analog amplifiers
or codecs.

To make them work they need to be added as part of "aux-devs"
and connected to some other audio component using the audio routes
configurable using "(qcom,)audio-routing".

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
 .../devicetree/bindings/sound/qcom,apq8016-sbc.txt        | 7 +++++++
 Documentation/devicetree/bindings/sound/qcom,apq8096.txt  | 8 ++++++++
 Documentation/devicetree/bindings/sound/qcom,sdm845.txt   | 8 ++++++++
 3 files changed, 23 insertions(+)

Comments

Rob Herring (Arm) Aug. 25, 2020, 9:52 p.m. UTC | #1
On Wed, Aug 19, 2020 at 11:15:32AM +0200, Stephan Gerhold wrote:
> In some cases we need to probe additional audio components that do
> not appear as part of the DAI links specified in the device tree.
> Examples for this are auxiliary devices such as analog amplifiers
> or codecs.
> 
> To make them work they need to be added as part of "aux-devs"
> and connected to some other audio component using the audio routes
> configurable using "(qcom,)audio-routing".
> 
> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> ---
>  .../devicetree/bindings/sound/qcom,apq8016-sbc.txt        | 7 +++++++
>  Documentation/devicetree/bindings/sound/qcom,apq8096.txt  | 8 ++++++++
>  Documentation/devicetree/bindings/sound/qcom,sdm845.txt   | 8 ++++++++
>  3 files changed, 23 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt b/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt
> index 84b28dbe9f15..23998262a0a7 100644
> --- a/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt
> +++ b/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt
> @@ -34,6 +34,13 @@ Required properties:
>  			  * DMIC
>  			  * Ext Spk
>  
> +Optional properties:
> +
> +- aux-devs		: A list of phandles for auxiliary devices (e.g. analog
> +			  amplifiers) that do not appear directly within the DAI
> +			  links. Should be connected to another audio component
> +			  using "qcom,audio-routing".
> +
>  Dai-link subnode properties and subnodes:
>  
>  Required dai-link subnodes:
> diff --git a/Documentation/devicetree/bindings/sound/qcom,apq8096.txt b/Documentation/devicetree/bindings/sound/qcom,apq8096.txt
> index c814e867850f..248df5056fec 100644
> --- a/Documentation/devicetree/bindings/sound/qcom,apq8096.txt
> +++ b/Documentation/devicetree/bindings/sound/qcom,apq8096.txt
> @@ -55,6 +55,14 @@ This binding describes the APQ8096 sound card, which uses qdsp for audio.
>  	Value type: <stringlist>
>  	Definition: The user-visible name of this sound card.
>  
> +- aux-devs
> +	Usage: optional
> +	Value type: <phandles with arguments>

How do you know how many arguments? It either has to be fixed or needs a 
#.*cells in the phandles. For the latter, you'd need to come up with a 
common binding.

> +	Definition: A list of phandles for auxiliary devices (e.g. analog
> +		    amplifiers) that do not appear directly within the DAI
> +		    links. Should be connected to another audio component
> +		    using "audio-routing".
> +
>  = dailinks
>  Each subnode of sndcard represents either a dailink, and subnodes of each
>  dailinks would be cpu/codec/platform dais.
> diff --git a/Documentation/devicetree/bindings/sound/qcom,sdm845.txt b/Documentation/devicetree/bindings/sound/qcom,sdm845.txt
> index ca8c89e88bfa..3d5cbe953cf7 100644
> --- a/Documentation/devicetree/bindings/sound/qcom,sdm845.txt
> +++ b/Documentation/devicetree/bindings/sound/qcom,sdm845.txt
> @@ -24,6 +24,14 @@ This binding describes the SDM845 sound card, which uses qdsp for audio.
>  	Value type: <stringlist>
>  	Definition: The user-visible name of this sound card.
>  
> +- aux-devs
> +	Usage: optional
> +	Value type: <phandles with arguments>
> +	Definition: A list of phandles for auxiliary devices (e.g. analog
> +		    amplifiers) that do not appear directly within the DAI
> +		    links. Should be connected to another audio component
> +		    using "audio-routing".
> +
>  = dailinks
>  Each subnode of sndcard represents either a dailink, and subnodes of each
>  dailinks would be cpu/codec/platform dais.
> -- 
> 2.28.0
>
Stephan Gerhold Aug. 26, 2020, 8:41 a.m. UTC | #2
On Tue, Aug 25, 2020 at 03:52:53PM -0600, Rob Herring wrote:
> On Wed, Aug 19, 2020 at 11:15:32AM +0200, Stephan Gerhold wrote:
> > In some cases we need to probe additional audio components that do
> > not appear as part of the DAI links specified in the device tree.
> > Examples for this are auxiliary devices such as analog amplifiers
> > or codecs.
> > 
> > To make them work they need to be added as part of "aux-devs"
> > and connected to some other audio component using the audio routes
> > configurable using "(qcom,)audio-routing".
> > 
> > Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> > Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> > ---
> >  .../devicetree/bindings/sound/qcom,apq8016-sbc.txt        | 7 +++++++
> >  Documentation/devicetree/bindings/sound/qcom,apq8096.txt  | 8 ++++++++
> >  Documentation/devicetree/bindings/sound/qcom,sdm845.txt   | 8 ++++++++
> >  3 files changed, 23 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt b/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt
> > index 84b28dbe9f15..23998262a0a7 100644
> > --- a/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt
> > +++ b/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt
> > @@ -34,6 +34,13 @@ Required properties:
> >  			  * DMIC
> >  			  * Ext Spk
> >  
> > +Optional properties:
> > +
> > +- aux-devs		: A list of phandles for auxiliary devices (e.g. analog
> > +			  amplifiers) that do not appear directly within the DAI
> > +			  links. Should be connected to another audio component
> > +			  using "qcom,audio-routing".
> > +
> >  Dai-link subnode properties and subnodes:
> >  
> >  Required dai-link subnodes:
> > diff --git a/Documentation/devicetree/bindings/sound/qcom,apq8096.txt b/Documentation/devicetree/bindings/sound/qcom,apq8096.txt
> > index c814e867850f..248df5056fec 100644
> > --- a/Documentation/devicetree/bindings/sound/qcom,apq8096.txt
> > +++ b/Documentation/devicetree/bindings/sound/qcom,apq8096.txt
> > @@ -55,6 +55,14 @@ This binding describes the APQ8096 sound card, which uses qdsp for audio.
> >  	Value type: <stringlist>
> >  	Definition: The user-visible name of this sound card.
> >  
> > +- aux-devs
> > +	Usage: optional
> > +	Value type: <phandles with arguments>
> 
> How do you know how many arguments? It either has to be fixed or needs a 
> #.*cells in the phandles. For the latter, you'd need to come up with a 
> common binding.
> 

Actually the phandle should not have any arguments, seems like I just
copied this from some other entry. Will fix this, thank you!

Stephan
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt b/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt
index 84b28dbe9f15..23998262a0a7 100644
--- a/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt
+++ b/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt
@@ -34,6 +34,13 @@  Required properties:
 			  * DMIC
 			  * Ext Spk
 
+Optional properties:
+
+- aux-devs		: A list of phandles for auxiliary devices (e.g. analog
+			  amplifiers) that do not appear directly within the DAI
+			  links. Should be connected to another audio component
+			  using "qcom,audio-routing".
+
 Dai-link subnode properties and subnodes:
 
 Required dai-link subnodes:
diff --git a/Documentation/devicetree/bindings/sound/qcom,apq8096.txt b/Documentation/devicetree/bindings/sound/qcom,apq8096.txt
index c814e867850f..248df5056fec 100644
--- a/Documentation/devicetree/bindings/sound/qcom,apq8096.txt
+++ b/Documentation/devicetree/bindings/sound/qcom,apq8096.txt
@@ -55,6 +55,14 @@  This binding describes the APQ8096 sound card, which uses qdsp for audio.
 	Value type: <stringlist>
 	Definition: The user-visible name of this sound card.
 
+- aux-devs
+	Usage: optional
+	Value type: <phandles with arguments>
+	Definition: A list of phandles for auxiliary devices (e.g. analog
+		    amplifiers) that do not appear directly within the DAI
+		    links. Should be connected to another audio component
+		    using "audio-routing".
+
 = dailinks
 Each subnode of sndcard represents either a dailink, and subnodes of each
 dailinks would be cpu/codec/platform dais.
diff --git a/Documentation/devicetree/bindings/sound/qcom,sdm845.txt b/Documentation/devicetree/bindings/sound/qcom,sdm845.txt
index ca8c89e88bfa..3d5cbe953cf7 100644
--- a/Documentation/devicetree/bindings/sound/qcom,sdm845.txt
+++ b/Documentation/devicetree/bindings/sound/qcom,sdm845.txt
@@ -24,6 +24,14 @@  This binding describes the SDM845 sound card, which uses qdsp for audio.
 	Value type: <stringlist>
 	Definition: The user-visible name of this sound card.
 
+- aux-devs
+	Usage: optional
+	Value type: <phandles with arguments>
+	Definition: A list of phandles for auxiliary devices (e.g. analog
+		    amplifiers) that do not appear directly within the DAI
+		    links. Should be connected to another audio component
+		    using "audio-routing".
+
 = dailinks
 Each subnode of sndcard represents either a dailink, and subnodes of each
 dailinks would be cpu/codec/platform dais.