All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ASoC: qcom: common: Parse auxiliary devices from device tree
@ 2020-08-19  9:15 ` Stephan Gerhold
  0 siblings, 0 replies; 10+ messages in thread
From: Stephan Gerhold @ 2020-08-19  9:15 UTC (permalink / raw)
  To: Mark Brown
  Cc: Srinivas Kandagatla, Patrick Lai, Banajit Goswami, Liam Girdwood,
	alsa-devel, Rob Herring, devicetree, linux-arm-msm,
	Stephan Gerhold

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.

The ASoC core provides a way to probe these components by adding
them to snd_soc_card->aux_dev.

This patch set allows specifying them in the device tree through
a new "aux-devs" property.

Stephan Gerhold (2):
  ASoC: dt-bindings: qcom: Document "aux-devs" property
  ASoC: qcom: common: Parse auxiliary devices from device tree

 .../devicetree/bindings/sound/qcom,apq8016-sbc.txt        | 7 +++++++
 Documentation/devicetree/bindings/sound/qcom,apq8096.txt  | 8 ++++++++
 Documentation/devicetree/bindings/sound/qcom,sdm845.txt   | 8 ++++++++
 sound/soc/qcom/common.c                                   | 4 ++++
 4 files changed, 27 insertions(+)

-- 
2.28.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 0/2] ASoC: qcom: common: Parse auxiliary devices from device tree
@ 2020-08-19  9:15 ` Stephan Gerhold
  0 siblings, 0 replies; 10+ messages in thread
From: Stephan Gerhold @ 2020-08-19  9:15 UTC (permalink / raw)
  To: Mark Brown
  Cc: devicetree, alsa-devel, Banajit Goswami, Stephan Gerhold,
	linux-arm-msm, Patrick Lai, Liam Girdwood, Rob Herring,
	Srinivas Kandagatla

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.

The ASoC core provides a way to probe these components by adding
them to snd_soc_card->aux_dev.

This patch set allows specifying them in the device tree through
a new "aux-devs" property.

Stephan Gerhold (2):
  ASoC: dt-bindings: qcom: Document "aux-devs" property
  ASoC: qcom: common: Parse auxiliary devices from device tree

 .../devicetree/bindings/sound/qcom,apq8016-sbc.txt        | 7 +++++++
 Documentation/devicetree/bindings/sound/qcom,apq8096.txt  | 8 ++++++++
 Documentation/devicetree/bindings/sound/qcom,sdm845.txt   | 8 ++++++++
 sound/soc/qcom/common.c                                   | 4 ++++
 4 files changed, 27 insertions(+)

-- 
2.28.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/2] ASoC: dt-bindings: qcom: Document "aux-devs" property
  2020-08-19  9:15 ` Stephan Gerhold
@ 2020-08-19  9:15   ` Stephan Gerhold
  -1 siblings, 0 replies; 10+ messages in thread
From: Stephan Gerhold @ 2020-08-19  9:15 UTC (permalink / raw)
  To: Mark Brown
  Cc: Srinivas Kandagatla, Patrick Lai, Banajit Goswami, Liam Girdwood,
	alsa-devel, Rob Herring, devicetree, linux-arm-msm,
	Stephan Gerhold

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>
+	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


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 1/2] ASoC: dt-bindings: qcom: Document "aux-devs" property
@ 2020-08-19  9:15   ` Stephan Gerhold
  0 siblings, 0 replies; 10+ messages in thread
From: Stephan Gerhold @ 2020-08-19  9:15 UTC (permalink / raw)
  To: Mark Brown
  Cc: devicetree, alsa-devel, Banajit Goswami, Stephan Gerhold,
	linux-arm-msm, Patrick Lai, Liam Girdwood, Rob Herring,
	Srinivas Kandagatla

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>
+	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


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] ASoC: qcom: common: Parse auxiliary devices from device tree
  2020-08-19  9:15 ` Stephan Gerhold
@ 2020-08-19  9:15   ` Stephan Gerhold
  -1 siblings, 0 replies; 10+ messages in thread
From: Stephan Gerhold @ 2020-08-19  9:15 UTC (permalink / raw)
  To: Mark Brown
  Cc: Srinivas Kandagatla, Patrick Lai, Banajit Goswami, Liam Girdwood,
	alsa-devel, Rob Herring, devicetree, linux-arm-msm,
	Stephan Gerhold

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.

The ASoC core provides a way to probe these components by adding
them to snd_soc_card->aux_dev. We can use the snd_soc_of_parse_aux_devs()
function to parse them from the device tree.

As an example for this, some MSM8916 smartphones have an analog
speaker amplifier connected to the HPHR output. With the new property
this can be modelled as follows:

	speaker-amp: audio-amplifier {
		compatible = "simple-audio-amplifier";
		enable-gpios = <&msmgpio 114 GPIO_ACTIVE_HIGH>;
		sound-name-prefix = "Speaker Amp";
	};

	&sound {
		aux-devs = <&speaker_amp>;
		audio-routing = "Speaker Amp IN", "HPHR";
	};

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
 sound/soc/qcom/common.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c
index 5194d90ddb96..fe6e778c31c0 100644
--- a/sound/soc/qcom/common.c
+++ b/sound/soc/qcom/common.c
@@ -39,6 +39,10 @@ int qcom_snd_parse_of(struct snd_soc_card *card)
 			return ret;
 	}
 
+	ret = snd_soc_of_parse_aux_devs(card, "aux-devs");
+	if (ret)
+		return ret;
+
 	/* Populate links */
 	num_links = of_get_child_count(dev->of_node);
 
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] ASoC: qcom: common: Parse auxiliary devices from device tree
@ 2020-08-19  9:15   ` Stephan Gerhold
  0 siblings, 0 replies; 10+ messages in thread
From: Stephan Gerhold @ 2020-08-19  9:15 UTC (permalink / raw)
  To: Mark Brown
  Cc: devicetree, alsa-devel, Banajit Goswami, Stephan Gerhold,
	linux-arm-msm, Patrick Lai, Liam Girdwood, Rob Herring,
	Srinivas Kandagatla

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.

The ASoC core provides a way to probe these components by adding
them to snd_soc_card->aux_dev. We can use the snd_soc_of_parse_aux_devs()
function to parse them from the device tree.

As an example for this, some MSM8916 smartphones have an analog
speaker amplifier connected to the HPHR output. With the new property
this can be modelled as follows:

	speaker-amp: audio-amplifier {
		compatible = "simple-audio-amplifier";
		enable-gpios = <&msmgpio 114 GPIO_ACTIVE_HIGH>;
		sound-name-prefix = "Speaker Amp";
	};

	&sound {
		aux-devs = <&speaker_amp>;
		audio-routing = "Speaker Amp IN", "HPHR";
	};

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
 sound/soc/qcom/common.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c
index 5194d90ddb96..fe6e778c31c0 100644
--- a/sound/soc/qcom/common.c
+++ b/sound/soc/qcom/common.c
@@ -39,6 +39,10 @@ int qcom_snd_parse_of(struct snd_soc_card *card)
 			return ret;
 	}
 
+	ret = snd_soc_of_parse_aux_devs(card, "aux-devs");
+	if (ret)
+		return ret;
+
 	/* Populate links */
 	num_links = of_get_child_count(dev->of_node);
 
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] ASoC: dt-bindings: qcom: Document "aux-devs" property
  2020-08-19  9:15   ` Stephan Gerhold
@ 2020-08-25 21:52     ` Rob Herring
  -1 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2020-08-25 21:52 UTC (permalink / raw)
  To: Stephan Gerhold
  Cc: Mark Brown, Srinivas Kandagatla, Patrick Lai, Banajit Goswami,
	Liam Girdwood, alsa-devel, devicetree, linux-arm-msm

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
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] ASoC: dt-bindings: qcom: Document "aux-devs" property
@ 2020-08-25 21:52     ` Rob Herring
  0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2020-08-25 21:52 UTC (permalink / raw)
  To: Stephan Gerhold
  Cc: devicetree, alsa-devel, Banajit Goswami, linux-arm-msm,
	Patrick Lai, Liam Girdwood, Mark Brown, Srinivas Kandagatla

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
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] ASoC: dt-bindings: qcom: Document "aux-devs" property
  2020-08-25 21:52     ` Rob Herring
@ 2020-08-26  8:41       ` Stephan Gerhold
  -1 siblings, 0 replies; 10+ messages in thread
From: Stephan Gerhold @ 2020-08-26  8:41 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Brown, Srinivas Kandagatla, Patrick Lai, Banajit Goswami,
	Liam Girdwood, alsa-devel, devicetree, linux-arm-msm

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] ASoC: dt-bindings: qcom: Document "aux-devs" property
@ 2020-08-26  8:41       ` Stephan Gerhold
  0 siblings, 0 replies; 10+ messages in thread
From: Stephan Gerhold @ 2020-08-26  8:41 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, alsa-devel, Banajit Goswami, linux-arm-msm,
	Patrick Lai, Liam Girdwood, Mark Brown, Srinivas Kandagatla

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-08-26  8:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-19  9:15 [PATCH 0/2] ASoC: qcom: common: Parse auxiliary devices from device tree Stephan Gerhold
2020-08-19  9:15 ` Stephan Gerhold
2020-08-19  9:15 ` [PATCH 1/2] ASoC: dt-bindings: qcom: Document "aux-devs" property Stephan Gerhold
2020-08-19  9:15   ` Stephan Gerhold
2020-08-25 21:52   ` Rob Herring
2020-08-25 21:52     ` Rob Herring
2020-08-26  8:41     ` Stephan Gerhold
2020-08-26  8:41       ` Stephan Gerhold
2020-08-19  9:15 ` [PATCH 2/2] ASoC: qcom: common: Parse auxiliary devices from device tree Stephan Gerhold
2020-08-19  9:15   ` Stephan Gerhold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.