Commit bc442e47 authored by Mark Brown's avatar Mark Brown

Merge series "ASoC: qcom: common: Parse auxiliary devices from device tree"...

Merge series "ASoC: qcom: common: Parse auxiliary devices from device tree" from Stephan Gerhold <stephan@gerhold.net>:

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.

v1: https://lore.kernel.org/linux-arm-msm/20200819091533.2334-1-stephan@gerhold.net/
Changes in v2:
  - Fix value type in device tree bindings:
    aux-devs should be array of phandles without any arguments, so change
    <phandles with arguments> -> <array of phandles>

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
parents e525db7e 1b839d3e
...@@ -34,6 +34,13 @@ Required properties: ...@@ -34,6 +34,13 @@ Required properties:
* DMIC * DMIC
* Ext Spk * 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: Dai-link subnode properties and subnodes:
Required dai-link subnodes: Required dai-link subnodes:
......
...@@ -55,6 +55,14 @@ This binding describes the APQ8096 sound card, which uses qdsp for audio. ...@@ -55,6 +55,14 @@ This binding describes the APQ8096 sound card, which uses qdsp for audio.
Value type: <stringlist> Value type: <stringlist>
Definition: The user-visible name of this sound card. Definition: The user-visible name of this sound card.
- aux-devs
Usage: optional
Value type: <array of phandles>
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 = dailinks
Each subnode of sndcard represents either a dailink, and subnodes of each Each subnode of sndcard represents either a dailink, and subnodes of each
dailinks would be cpu/codec/platform dais. dailinks would be cpu/codec/platform dais.
......
...@@ -24,6 +24,14 @@ This binding describes the SDM845 sound card, which uses qdsp for audio. ...@@ -24,6 +24,14 @@ This binding describes the SDM845 sound card, which uses qdsp for audio.
Value type: <stringlist> Value type: <stringlist>
Definition: The user-visible name of this sound card. Definition: The user-visible name of this sound card.
- aux-devs
Usage: optional
Value type: <array of phandles>
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 = dailinks
Each subnode of sndcard represents either a dailink, and subnodes of each Each subnode of sndcard represents either a dailink, and subnodes of each
dailinks would be cpu/codec/platform dais. dailinks would be cpu/codec/platform dais.
......
...@@ -39,6 +39,10 @@ int qcom_snd_parse_of(struct snd_soc_card *card) ...@@ -39,6 +39,10 @@ int qcom_snd_parse_of(struct snd_soc_card *card)
return ret; return ret;
} }
ret = snd_soc_of_parse_aux_devs(card, "aux-devs");
if (ret)
return ret;
/* Populate links */ /* Populate links */
num_links = of_get_child_count(dev->of_node); num_links = of_get_child_count(dev->of_node);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment