ASoC: msm8998: modify quat mi2s clock id in slave mode
update configuration to set bit clock as EBIT in slave mode. Change-Id: Iec62be7b566f20d4ec2bcd300beb3e4f362b6542 Signed-off-by: Varun Balaraj <varunb@codeaurora.org>
This commit is contained in:
parent
60be71604a
commit
5d64d994ec
1 changed files with 12 additions and 3 deletions
|
@ -555,6 +555,13 @@ static struct snd_soc_dapm_route wcd_audio_paths[] = {
|
||||||
{"MIC BIAS4", NULL, "MCLK"},
|
{"MIC BIAS4", NULL, "MCLK"},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static u32 mi2s_ebit_clk[MI2S_MAX] = {
|
||||||
|
Q6AFE_LPASS_CLK_ID_PRI_MI2S_EBIT,
|
||||||
|
Q6AFE_LPASS_CLK_ID_SEC_MI2S_EBIT,
|
||||||
|
Q6AFE_LPASS_CLK_ID_TER_MI2S_EBIT,
|
||||||
|
Q6AFE_LPASS_CLK_ID_QUAD_MI2S_EBIT,
|
||||||
|
};
|
||||||
|
|
||||||
static struct afe_clk_set mi2s_clk[MI2S_MAX] = {
|
static struct afe_clk_set mi2s_clk[MI2S_MAX] = {
|
||||||
{
|
{
|
||||||
AFE_API_VERSION_I2S_CONFIG,
|
AFE_API_VERSION_I2S_CONFIG,
|
||||||
|
@ -4507,6 +4514,11 @@ static int msm_mi2s_snd_startup(struct snd_pcm_substream *substream)
|
||||||
*/
|
*/
|
||||||
mutex_lock(&mi2s_intf_conf[index].lock);
|
mutex_lock(&mi2s_intf_conf[index].lock);
|
||||||
if (++mi2s_intf_conf[index].ref_cnt == 1) {
|
if (++mi2s_intf_conf[index].ref_cnt == 1) {
|
||||||
|
/* Check if msm needs to provide the clock to the interface */
|
||||||
|
if (!mi2s_intf_conf[index].msm_is_mi2s_master) {
|
||||||
|
fmt = SND_SOC_DAIFMT_CBM_CFM;
|
||||||
|
mi2s_clk[index].clk_id = mi2s_ebit_clk[index];
|
||||||
|
}
|
||||||
ret = msm_mi2s_set_sclk(substream, true);
|
ret = msm_mi2s_set_sclk(substream, true);
|
||||||
if (IS_ERR_VALUE(ret)) {
|
if (IS_ERR_VALUE(ret)) {
|
||||||
dev_err(rtd->card->dev,
|
dev_err(rtd->card->dev,
|
||||||
|
@ -4526,9 +4538,6 @@ static int msm_mi2s_snd_startup(struct snd_pcm_substream *substream)
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto clk_off;
|
goto clk_off;
|
||||||
}
|
}
|
||||||
/* Check if msm needs to provide the clock to the interface */
|
|
||||||
if (!mi2s_intf_conf[index].msm_is_mi2s_master)
|
|
||||||
fmt = SND_SOC_DAIFMT_CBM_CFM;
|
|
||||||
ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
|
ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
|
||||||
if (IS_ERR_VALUE(ret)) {
|
if (IS_ERR_VALUE(ret)) {
|
||||||
pr_err("%s: set fmt cpu dai failed for MI2S (%d), err:%d\n",
|
pr_err("%s: set fmt cpu dai failed for MI2S (%d), err:%d\n",
|
||||||
|
|
Loading…
Add table
Reference in a new issue