ASoC: SOF: Intel: hda-dai: Use the dai argument in ipc4_hda_dai_trigger
No need to define a new variable and look it up again. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230307140435.2808-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
b436ed8dd0
commit
be7f4f8d0b
@@ -426,14 +426,12 @@ static int ipc4_hda_dai_trigger(struct snd_pcm_substream *substream,
|
||||
struct snd_sof_widget *swidget;
|
||||
struct snd_soc_dapm_widget *w;
|
||||
struct snd_soc_dai *codec_dai;
|
||||
struct snd_soc_dai *cpu_dai;
|
||||
int ret;
|
||||
|
||||
dev_dbg(dai->dev, "cmd=%d dai %s direction %d\n", cmd,
|
||||
dai->name, substream->stream);
|
||||
|
||||
rtd = asoc_substream_to_rtd(substream);
|
||||
cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
|
||||
w = snd_soc_dai_get_widget(dai, substream->stream);
|
||||
@@ -478,7 +476,7 @@ static int ipc4_hda_dai_trigger(struct snd_pcm_substream *substream,
|
||||
|
||||
pipeline->state = SOF_IPC4_PIPE_RESET;
|
||||
|
||||
ret = hda_link_dma_cleanup(substream, hext_stream, cpu_dai, codec_dai);
|
||||
ret = hda_link_dma_cleanup(substream, hext_stream, dai, codec_dai);
|
||||
if (ret < 0) {
|
||||
dev_err(sdev->dev, "%s: failed to clean up link DMA\n", __func__);
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user