From: Pierre-Louis Bossart Date: Fri, 12 May 2023 18:16:59 +0000 (-0500) Subject: ASoC: SOF: Intel: hda-dai: move hda_dai_prepare() code X-Git-Tag: v6.5-rc1~154^2^2~132^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=caf7ad845e90f8ac29d7342bea6d9f1fc392c953;p=thirdparty%2Flinux.git ASoC: SOF: Intel: hda-dai: move hda_dai_prepare() code Before we change the Kconfig support, move code around. No functionality change with this commit in isolation. Signed-off-by: Pierre-Louis Bossart stream; - - return hda_dai_hw_params(substream, &rtd->dpcm[stream].hw_params, dai); -} - /* * In contrast to IPC3, the dai trigger in IPC4 mixes pipeline state changes * (over IPC channel) and DMA state change (direct host register changes). @@ -325,6 +317,14 @@ static int hda_dai_trigger(struct snd_pcm_substream *substream, int cmd, struct return 0; } +static int hda_dai_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) +{ + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); + int stream = substream->stream; + + return hda_dai_hw_params(substream, &rtd->dpcm[stream].hw_params, dai); +} + static const struct snd_soc_dai_ops hda_dai_ops = { .hw_params = hda_dai_hw_params, .hw_free = hda_dai_hw_free,