aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2016-09-06 05:57:42 -0400
committerMark Brown <broonie@kernel.org>2016-09-06 07:28:23 -0400
commit1190300d03516d00f68abcb01bfab00835bc0ac5 (patch)
tree65ffcddd1a9d76c90d53b5e5966134c86f82468e
parent6adcbdcd4b6e8301c3a4c61284e701f87de9a409 (diff)
ASoC: qcom: apq8016-sbc: add board specific dapm mic widgets
This patch adds support to board specific dapm mic widgets so that these can be used to specify proper connections of various micbias supported by the board and SOC. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/qcom/apq8016_sbc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c
index 1289543c8fb2..5c3ccf3f8fdf 100644
--- a/sound/soc/qcom/apq8016_sbc.c
+++ b/sound/soc/qcom/apq8016_sbc.c
@@ -147,6 +147,15 @@ static struct apq8016_sbc_data *apq8016_sbc_parse_of(struct snd_soc_card *card)
147 return data; 147 return data;
148} 148}
149 149
150static const struct snd_soc_dapm_widget apq8016_sbc_dapm_widgets[] = {
151
152 SND_SOC_DAPM_MIC("Handset Mic", NULL),
153 SND_SOC_DAPM_MIC("Headset Mic", NULL),
154 SND_SOC_DAPM_MIC("Secondary Mic", NULL),
155 SND_SOC_DAPM_MIC("Digital Mic1", NULL),
156 SND_SOC_DAPM_MIC("Digital Mic2", NULL),
157};
158
150static int apq8016_sbc_platform_probe(struct platform_device *pdev) 159static int apq8016_sbc_platform_probe(struct platform_device *pdev)
151{ 160{
152 struct device *dev = &pdev->dev; 161 struct device *dev = &pdev->dev;
@@ -159,6 +168,8 @@ static int apq8016_sbc_platform_probe(struct platform_device *pdev)
159 return -ENOMEM; 168 return -ENOMEM;
160 169
161 card->dev = dev; 170 card->dev = dev;
171 card->dapm_widgets = apq8016_sbc_dapm_widgets;
172 card->num_dapm_widgets = ARRAY_SIZE(apq8016_sbc_dapm_widgets);
162 data = apq8016_sbc_parse_of(card); 173 data = apq8016_sbc_parse_of(card);
163 if (IS_ERR(data)) { 174 if (IS_ERR(data)) {
164 dev_err(&pdev->dev, "Error resolving dai links: %ld\n", 175 dev_err(&pdev->dev, "Error resolving dai links: %ld\n",