Skip to content

Commit

Permalink
ASoC: SOF: remove suport for TRIGGER_RESUME
Browse files Browse the repository at this point in the history
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

None of the SOF platforms support INFO_RESUME, and rely on the
indirect path used by the ALSA core with the prepare and TRIGGER_START
steps.

Let's remove the left-over dead code.
  • Loading branch information
Mark Brown committed Dec 17, 2021
2 parents f04b4fb + 35218cf commit f7c7eca
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 31 deletions.
10 changes: 0 additions & 10 deletions sound/soc/sof/intel/hda-dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,16 +342,6 @@ static int hda_link_pcm_trigger(struct snd_pcm_substream *substream,
w = snd_soc_dai_get_widget(dai, substream->stream);

switch (cmd) {
case SNDRV_PCM_TRIGGER_RESUME:
/* set up hw_params */
ret = hda_link_pcm_prepare(substream, dai);
if (ret < 0) {
dev_err(dai->dev,
"error: setting up hw_params during resume\n");
return ret;
}

fallthrough;
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
snd_hdac_ext_link_stream_start(link_dev);
Expand Down
1 change: 0 additions & 1 deletion sound/soc/sof/intel/hda-stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ int hda_dsp_stream_trigger(struct snd_sof_dev *sdev,

/* cmd must be for audio stream */
switch (cmd) {
case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
case SNDRV_PCM_TRIGGER_START:
snd_sof_dsp_update_bits(sdev, HDA_DSP_HDA_BAR, SOF_HDA_INTCTL,
Expand Down
20 changes: 0 additions & 20 deletions sound/soc/sof/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,26 +395,6 @@ static int sof_pcm_trigger(struct snd_soc_component *component,
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
stream.hdr.cmd |= SOF_IPC_STREAM_TRIG_RELEASE;
break;
case SNDRV_PCM_TRIGGER_RESUME:
if (spcm->stream[substream->stream].suspend_ignored) {
/*
* this case will be triggered when INFO_RESUME is
* supported, no need to resume streams that remained
* enabled in D0ix.
*/
spcm->stream[substream->stream].suspend_ignored = false;
return 0;
}

/* set up hw_params */
ret = sof_pcm_prepare(component, substream);
if (ret < 0) {
dev_err(component->dev,
"error: failed to set up hw_params upon resume\n");
return ret;
}

fallthrough;
case SNDRV_PCM_TRIGGER_START:
if (spcm->stream[substream->stream].suspend_ignored) {
/*
Expand Down

0 comments on commit f7c7eca

Please sign in to comment.