Skip to content

Commit 4aee5ec

Browse files
ujfalusiplbossart
authored andcommitted
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>
1 parent 9cce2ad commit 4aee5ec

1 file changed

Lines changed: 5 additions & 18 deletions

File tree

sound/soc/sof/pcm.c

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,6 @@ static int create_page_table(struct snd_soc_component *component,
3636
spcm->stream[stream].page_table.area, size);
3737
}
3838

39-
static int sof_pcm_dsp_params(struct snd_sof_pcm *spcm, struct snd_pcm_substream *substream,
40-
const struct sof_ipc_pcm_params_reply *reply)
41-
{
42-
struct snd_soc_component *scomp = spcm->scomp;
43-
struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp);
44-
45-
/* validate offset */
46-
int ret = snd_sof_ipc_pcm_params(sdev, substream, reply);
47-
48-
if (ret < 0)
49-
dev_err(scomp->dev, "error: got wrong reply for PCM %d\n",
50-
spcm->pcm.pcm_id);
51-
52-
return ret;
53-
}
54-
5539
/*
5640
* sof pcm period elapse work
5741
*/
@@ -285,9 +269,12 @@ static int sof_pcm_hw_params(struct snd_soc_component *component,
285269
return ret;
286270
}
287271

288-
ret = sof_pcm_dsp_params(spcm, substream, &ipc_params_reply);
289-
if (ret < 0)
272+
ret = snd_sof_ipc_pcm_params(sdev, substream, &ipc_params_reply);
273+
if (ret < 0) {
274+
dev_err(component->dev, "%s: got wrong reply for PCM %d\n",
275+
__func__, spcm->pcm.pcm_id);
290276
return ret;
277+
}
291278

292279
spcm->prepared[substream->stream] = true;
293280

0 commit comments

Comments
 (0)