Skip to content

Commit

Permalink
Merge series "ASoC: qcom: common: Parse auxiliary devices from device…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
Mark Brown committed Sep 8, 2020
2 parents e525db7 + 1b839d3 commit bc442e4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions Documentation/devicetree/bindings/sound/qcom,apq8096.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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: <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
Each subnode of sndcard represents either a dailink, and subnodes of each
dailinks would be cpu/codec/platform dais.
Expand Down
8 changes: 8 additions & 0 deletions Documentation/devicetree/bindings/sound/qcom,sdm845.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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: <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
Each subnode of sndcard represents either a dailink, and subnodes of each
dailinks would be cpu/codec/platform dais.
Expand Down
4 changes: 4 additions & 0 deletions sound/soc/qcom/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit bc442e4

Please sign in to comment.