Skip to content

Commit 8bfb66c

Browse files
laklimovbroonie
authored andcommitted
ASoC: qcom: sdm845: add handling of secondary MI2S clock
Add handling of clock related to secondary MI2S_RX in startup, shutdown and hw params routines. The handing of MI2S_TX and SEC_MI2S clock is already there so this requires only placing SECONDARY_MI2S_RX in the correct switch-case choices. Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> Link: https://patch.msgid.link/20241205023344.2232529-3-alexey.klimov@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent a5dfca5 commit 8bfb66c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

sound/soc/qcom/sdm845.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ static int sdm845_snd_hw_params(struct snd_pcm_substream *substream,
215215
ret = sdm845_slim_snd_hw_params(substream, params);
216216
break;
217217
case QUATERNARY_MI2S_RX:
218+
case SECONDARY_MI2S_RX:
218219
break;
219220
default:
220221
pr_err("%s: invalid dai id 0x%x\n", __func__, cpu_dai->id);
@@ -356,6 +357,7 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream)
356357
snd_soc_dai_set_fmt(codec_dai, codec_dai_fmt);
357358
break;
358359

360+
case SECONDARY_MI2S_RX:
359361
case SECONDARY_MI2S_TX:
360362
codec_dai_fmt |= SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_I2S;
361363
if (++(data->sec_mi2s_clk_count) == 1) {
@@ -371,8 +373,6 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream)
371373
Q6AFE_LPASS_CLK_ID_QUAD_MI2S_IBIT,
372374
MI2S_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK);
373375
snd_soc_dai_set_fmt(cpu_dai, fmt);
374-
375-
376376
break;
377377

378378
case QUATERNARY_TDM_RX_0:
@@ -441,6 +441,7 @@ static void sdm845_snd_shutdown(struct snd_pcm_substream *substream)
441441
}
442442
break;
443443

444+
case SECONDARY_MI2S_RX:
444445
case SECONDARY_MI2S_TX:
445446
if (--(data->sec_mi2s_clk_count) == 0) {
446447
snd_soc_dai_set_sysclk(cpu_dai,

0 commit comments

Comments
 (0)