ASoC: sdm845: Set DAI format for dmic codec
authorCheng-Yi Chiang <cychiang@chromium.org>
Tue, 15 Jan 2019 08:41:59 +0000 (16:41 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 16 Jan 2019 16:33:02 +0000 (16:33 +0000)
Set codec DAI format for dmic codec in startup.

Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/sdm845.c

index 6f66a58e23caa1178bec669a14eb54c4dec72a95..882f52ed8231a0675a1b191df7beea394bb31a05 100644 (file)
@@ -248,12 +248,14 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream)
                break;
 
        case SECONDARY_MI2S_TX:
+               codec_dai_fmt |= SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_I2S;
                if (++(data->sec_mi2s_clk_count) == 1) {
                        snd_soc_dai_set_sysclk(cpu_dai,
                                Q6AFE_LPASS_CLK_ID_SEC_MI2S_IBIT,
                                MI2S_BCLK_RATE, SNDRV_PCM_STREAM_CAPTURE);
                }
                snd_soc_dai_set_fmt(cpu_dai, fmt);
+               snd_soc_dai_set_fmt(codec_dai, codec_dai_fmt);
                break;
 
        case QUATERNARY_TDM_RX_0: