lkml.org 
[lkml]   [2017]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] ASoC: qcom: apq8016-sbc: set default mclk rate
Date
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

MCLK for internal audio codec is expected to be at 9.6MHz by default.
This patch adds support to 9.6MHz to make the default case possible.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
sound/soc/qcom/apq8016_sbc.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c
index d084d7468299..1064c1b85c63 100644
--- a/sound/soc/qcom/apq8016_sbc.c
+++ b/sound/soc/qcom/apq8016_sbc.c
@@ -34,10 +34,12 @@ struct apq8016_sbc_data {
#define MIC_CTRL_QUA_WS_SLAVE_SEL_10 BIT(17)
#define MIC_CTRL_TLMM_SCLK_EN BIT(1)
#define SPKR_CTL_PRI_WS_SLAVE_SEL_11 (BIT(17) | BIT(16))
+#define DEFAULT_MCLK_RATE 9600000

static int apq8016_sbc_dai_init(struct snd_soc_pcm_runtime *rtd)
{
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+ struct snd_soc_dai *codec_dai = rtd->codec_dai;
struct snd_soc_card *card = rtd->card;
struct apq8016_sbc_data *pdata = snd_soc_card_get_drvdata(card);
int rval = 0;
@@ -68,6 +70,10 @@ static int apq8016_sbc_dai_init(struct snd_soc_pcm_runtime *rtd)

}

+ /* Set default mclk for internal codec */
+ snd_soc_dai_set_sysclk(codec_dai, 0, DEFAULT_MCLK_RATE,
+ SND_SOC_CLOCK_IN);
+
return rval;
}

--
2.11.0
\
 
 \ /
  Last update: 2017-07-17 15:55    [W:0.072 / U:2.340 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site