Merge "ASoC: msm8998: modify quat mi2s clock id in slave mode"
This commit is contained in:
commit
68284fc997
1 changed files with 12 additions and 3 deletions
|
@ -557,6 +557,13 @@ static struct snd_soc_dapm_route wcd_audio_paths[] = {
|
|||
{"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] = {
|
||||
{
|
||||
AFE_API_VERSION_I2S_CONFIG,
|
||||
|
@ -4508,6 +4515,11 @@ static int msm_mi2s_snd_startup(struct snd_pcm_substream *substream)
|
|||
*/
|
||||
mutex_lock(&mi2s_intf_conf[index].lock);
|
||||
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);
|
||||
if (IS_ERR_VALUE(ret)) {
|
||||
dev_err(rtd->card->dev,
|
||||
|
@ -4527,9 +4539,6 @@ static int msm_mi2s_snd_startup(struct snd_pcm_substream *substream)
|
|||
ret = -EINVAL;
|
||||
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);
|
||||
if (IS_ERR_VALUE(ret)) {
|
||||
pr_err("%s: set fmt cpu dai failed for MI2S (%d), err:%d\n",
|
||||
|
|
Loading…
Add table
Reference in a new issue