ASoC: qcom: apq8016-sbc: add support to routing via DT
This patch adds support to allow audio routing via Device Tree. This is mostly used to specify MICBIAS and other power supplies relation. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
1190300d03
commit
05f9033f74
|
@ -16,6 +16,24 @@ Required properties:
|
||||||
* "spkr-iomux"
|
* "spkr-iomux"
|
||||||
- qcom,model : Name of the sound card.
|
- qcom,model : Name of the sound card.
|
||||||
|
|
||||||
|
- qcom,audio-routing : 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 msm8x16_wcd codec and the jacks on the board:
|
||||||
|
|
||||||
|
Power supplies:
|
||||||
|
* MIC BIAS External1
|
||||||
|
* MIC BIAS External2
|
||||||
|
* MIC BIAS Internal1
|
||||||
|
* MIC BIAS Internal2
|
||||||
|
|
||||||
|
Board connectors:
|
||||||
|
* Headset Mic
|
||||||
|
* Secondary Mic",
|
||||||
|
* DMIC
|
||||||
|
* Ext Spk
|
||||||
|
|
||||||
Dai-link subnode properties and subnodes:
|
Dai-link subnode properties and subnodes:
|
||||||
|
|
||||||
Required dai-link subnodes:
|
Required dai-link subnodes:
|
||||||
|
@ -37,6 +55,18 @@ sound: sound {
|
||||||
reg-names = "mic-iomux", "spkr-iomux";
|
reg-names = "mic-iomux", "spkr-iomux";
|
||||||
qcom,model = "DB410c";
|
qcom,model = "DB410c";
|
||||||
|
|
||||||
|
qcom,audio-routing =
|
||||||
|
"MIC BIAS External1", "Handset Mic",
|
||||||
|
"MIC BIAS Internal2", "Headset Mic",
|
||||||
|
"MIC BIAS External1", "Secondary Mic",
|
||||||
|
"AMIC1", "MIC BIAS External1",
|
||||||
|
"AMIC2", "MIC BIAS Internal2",
|
||||||
|
"AMIC3", "MIC BIAS External1",
|
||||||
|
"DMIC1", "MIC BIAS Internal1",
|
||||||
|
"MIC BIAS Internal1", "Digital Mic1",
|
||||||
|
"DMIC2", "MIC BIAS Internal1",
|
||||||
|
"MIC BIAS Internal1", "Digital Mic2";
|
||||||
|
|
||||||
/* I2S - Internal codec */
|
/* I2S - Internal codec */
|
||||||
internal-dai-link@0 {
|
internal-dai-link@0 {
|
||||||
cpu { /* PRIMARY */
|
cpu { /* PRIMARY */
|
||||||
|
|
|
@ -85,6 +85,15 @@ static struct apq8016_sbc_data *apq8016_sbc_parse_of(struct snd_soc_card *card)
|
||||||
return ERR_PTR(ret);
|
return ERR_PTR(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* DAPM routes */
|
||||||
|
if (of_property_read_bool(node, "qcom,audio-routing")) {
|
||||||
|
ret = snd_soc_of_parse_audio_routing(card,
|
||||||
|
"qcom,audio-routing");
|
||||||
|
if (ret)
|
||||||
|
return ERR_PTR(ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Populate links */
|
/* Populate links */
|
||||||
num_links = of_get_child_count(node);
|
num_links = of_get_child_count(node);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue