diff options
author | Peter Ujfalusi <peter.ujfalusi@linux.intel.com> | 2022-03-10 07:27:13 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-03-11 16:41:02 +0300 |
commit | d1b1146fc708eff661c2becb9bf78374adde6db7 (patch) | |
tree | 4d60eb6c855541cd200c0eaa41a792f5df523c77 | |
parent | 31f60a0c943d6a7e84b06686b1ed86ddadf484fa (diff) | |
download | linux-d1b1146fc708eff661c2becb9bf78374adde6db7.tar.xz |
ASoC: SOF: pcm: Remove sof_pcm_dsp_params() wrapper
Call directly for snd_sof_ipc_pcm_params() from sof_pcm_hw_params() and
remove the wrapper for it.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220310042720.976809-4-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/sof/pcm.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/sound/soc/sof/pcm.c b/sound/soc/sof/pcm.c index 0c595d94dfce..20459d489bfb 100644 --- a/sound/soc/sof/pcm.c +++ b/sound/soc/sof/pcm.c @@ -36,22 +36,6 @@ static int create_page_table(struct snd_soc_component *component, spcm->stream[stream].page_table.area, size); } -static int sof_pcm_dsp_params(struct snd_sof_pcm *spcm, struct snd_pcm_substream *substream, - const struct sof_ipc_pcm_params_reply *reply) -{ - struct snd_soc_component *scomp = spcm->scomp; - struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp); - - /* validate offset */ - int ret = snd_sof_ipc_pcm_params(sdev, substream, reply); - - if (ret < 0) - dev_err(scomp->dev, "error: got wrong reply for PCM %d\n", - spcm->pcm.pcm_id); - - return ret; -} - /* * sof pcm period elapse work */ @@ -285,9 +269,12 @@ static int sof_pcm_hw_params(struct snd_soc_component *component, return ret; } - ret = sof_pcm_dsp_params(spcm, substream, &ipc_params_reply); - if (ret < 0) + ret = snd_sof_ipc_pcm_params(sdev, substream, &ipc_params_reply); + if (ret < 0) { + dev_err(component->dev, "%s: got wrong reply for PCM %d\n", + __func__, spcm->pcm.pcm_id); return ret; + } spcm->prepared[substream->stream] = true; |