aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2016-02-11 07:18:45 -0500
committerMark Brown <broonie@kernel.org>2016-02-19 11:20:18 -0500
commitbbedefb9e8c350bc7e8e7dc4732ba1974789e3e9 (patch)
treef27d0d7202b5088556343f41295f89e07022054a /sound/soc
parentfb5d11524eda5561f6dd8cc03f9dc778027ce907 (diff)
ASoC: qcom: apq8016-sbc: add mic support
This patch add mic support on apq8016-sbc board aka db410c. Tested it with headset mic. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Acked-by: Kenneth Westfield <kwestfie@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/qcom/apq8016_sbc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c
index 1efdf0088ecd..1289543c8fb2 100644
--- a/sound/soc/qcom/apq8016_sbc.c
+++ b/sound/soc/qcom/apq8016_sbc.c
@@ -30,6 +30,7 @@ struct apq8016_sbc_data {
30 struct snd_soc_dai_link dai_link[]; /* dynamically allocated */ 30 struct snd_soc_dai_link dai_link[]; /* dynamically allocated */
31}; 31};
32 32
33#define MIC_CTRL_TER_WS_SLAVE_SEL BIT(21)
33#define MIC_CTRL_QUA_WS_SLAVE_SEL_10 BIT(17) 34#define MIC_CTRL_QUA_WS_SLAVE_SEL_10 BIT(17)
34#define MIC_CTRL_TLMM_SCLK_EN BIT(1) 35#define MIC_CTRL_TLMM_SCLK_EN BIT(1)
35#define SPKR_CTL_PRI_WS_SLAVE_SEL_11 (BIT(17) | BIT(16)) 36#define SPKR_CTL_PRI_WS_SLAVE_SEL_11 (BIT(17) | BIT(16))
@@ -53,6 +54,12 @@ static int apq8016_sbc_dai_init(struct snd_soc_pcm_runtime *rtd)
53 MIC_CTRL_TLMM_SCLK_EN, 54 MIC_CTRL_TLMM_SCLK_EN,
54 pdata->mic_iomux); 55 pdata->mic_iomux);
55 break; 56 break;
57 case MI2S_TERTIARY:
58 writel(readl(pdata->mic_iomux) | MIC_CTRL_TER_WS_SLAVE_SEL |
59 MIC_CTRL_TLMM_SCLK_EN,
60 pdata->mic_iomux);
61
62 break;
56 63
57 default: 64 default:
58 dev_err(card->dev, "unsupported cpu dai configuration\n"); 65 dev_err(card->dev, "unsupported cpu dai configuration\n");
@@ -126,9 +133,6 @@ static struct apq8016_sbc_data *apq8016_sbc_parse_of(struct snd_soc_card *card)
126 } 133 }
127 134
128 link->platform_of_node = link->cpu_of_node; 135 link->platform_of_node = link->cpu_of_node;
129 /* For now we only support playback */
130 link->playback_only = true;
131
132 ret = of_property_read_string(np, "link-name", &link->name); 136 ret = of_property_read_string(np, "link-name", &link->name);
133 if (ret) { 137 if (ret) {
134 dev_err(card->dev, "error getting codec dai_link name\n"); 138 dev_err(card->dev, "error getting codec dai_link name\n");