Skip to content

Commit 0f8843c

Browse files
crojewsk-intelbroonie
authored andcommitted
ASoC: Intel: avs: Remove redundancy around DAI prepare
Drop unused arguments in the avs_dai_prepare() function. With the function updated, it matches its template in snd_soc_dai_ops and can be referenced throughout the pcm.c file without need of any wrappers. Signed-off-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 3a48d14 commit 0f8843c

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

sound/soc/intel/avs/pcm.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,7 @@ static int avs_dai_be_hw_params(struct snd_pcm_substream *substream,
151151
return avs_dai_hw_params(substream, fe_hw_params, be_hw_params, dai, dma_id);
152152
}
153153

154-
static int avs_dai_prepare(struct avs_dev *adev, struct snd_pcm_substream *substream,
155-
struct snd_soc_dai *dai)
154+
static int avs_dai_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
156155
{
157156
struct avs_dma_data *data;
158157
int ret;
@@ -201,11 +200,6 @@ static int avs_dai_nonhda_be_hw_free(struct snd_pcm_substream *substream, struct
201200
return 0;
202201
}
203202

204-
static int avs_dai_nonhda_be_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
205-
{
206-
return avs_dai_prepare(to_avs_dev(dai->dev), substream, dai);
207-
}
208-
209203
static int avs_dai_nonhda_be_trigger(struct snd_pcm_substream *substream, int cmd,
210204
struct snd_soc_dai *dai)
211205
{
@@ -261,7 +255,7 @@ static const struct snd_soc_dai_ops avs_dai_nonhda_be_ops = {
261255
.shutdown = avs_dai_shutdown,
262256
.hw_params = avs_dai_nonhda_be_hw_params,
263257
.hw_free = avs_dai_nonhda_be_hw_free,
264-
.prepare = avs_dai_nonhda_be_prepare,
258+
.prepare = avs_dai_prepare,
265259
.trigger = avs_dai_nonhda_be_trigger,
266260
};
267261

@@ -381,7 +375,7 @@ static int avs_dai_hda_be_prepare(struct snd_pcm_substream *substream, struct sn
381375
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
382376
snd_hdac_ext_bus_link_set_stream_id(link, hdac_stream(link_stream)->stream_tag);
383377

384-
ret = avs_dai_prepare(to_avs_dev(dai->dev), substream, dai);
378+
ret = avs_dai_prepare(substream, dai);
385379
if (ret)
386380
return ret;
387381

@@ -672,7 +666,7 @@ static int avs_dai_fe_prepare(struct snd_pcm_substream *substream, struct snd_so
672666
if (ret < 0)
673667
return ret;
674668

675-
ret = avs_dai_prepare(data->adev, substream, dai);
669+
ret = avs_dai_prepare(substream, dai);
676670
if (ret)
677671
return ret;
678672

0 commit comments

Comments
 (0)