diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2023-05-12 13:16:59 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-05-15 20:14:01 +0900 |
commit | caf7ad845e90f8ac29d7342bea6d9f1fc392c953 (patch) | |
tree | fde78dd9312c06d9e6c92f8fe69648b5a3897c5e /sound/soc/sof/intel/hda-dai.c | |
parent | 2dddff71e9ae973e46287c4e5a7d9206faa6c5e8 (diff) | |
download | linux-caf7ad845e90f8ac29d7342bea6d9f1fc392c953.tar.gz linux-caf7ad845e90f8ac29d7342bea6d9f1fc392c953.tar.bz2 linux-caf7ad845e90f8ac29d7342bea6d9f1fc392c953.zip |
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 <pierre-louis.bossart@linux.intel.com
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com
Reviewed-by: Rander Wang <rander.wang@intel.com
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
Link: https://lore.kernel.org/r/20230512181702.117483-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org
Diffstat (limited to 'sound/soc/sof/intel/hda-dai.c')
-rw-r--r-- | sound/soc/sof/intel/hda-dai.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/soc/sof/intel/hda-dai.c b/sound/soc/sof/intel/hda-dai.c index 7e71cce7f531..cdd842288811 100644 --- a/sound/soc/sof/intel/hda-dai.c +++ b/sound/soc/sof/intel/hda-dai.c @@ -259,14 +259,6 @@ static int hda_dai_hw_params(struct snd_pcm_substream *substream, return hda_dai_config(w, flags, &data); } -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); -} - /* * 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, |