]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ASoC: SOF: ipc4-pcm: Combine the SOF_IPC4_PIPE_PAUSED cases in pcm_trigger
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Thu, 21 Mar 2024 13:08:09 +0000 (15:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:38:18 +0000 (16:38 +0200)
commit 55ca6ca227bfc5a8d0a0c2c5d6e239777226a604 upstream.

The SNDRV_PCM_TRIGGER_PAUSE_PUSH does not need to be a separate case, it
can be handled along with STOP and SUSPEND

Cc: stable@vger.kernel.org # 6.8
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240321130814.4412-13-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/sof/ipc4-pcm.c

index c1343f3af963658e8c935241971a235859a4d7b9..e28239b9f13c6d36e774e4a9dc084379d40681cb 100644 (file)
@@ -461,14 +461,12 @@ static int sof_ipc4_pcm_trigger(struct snd_soc_component *component,
 
        /* determine the pipeline state */
        switch (cmd) {
-       case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
-               state = SOF_IPC4_PIPE_PAUSED;
-               break;
        case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
        case SNDRV_PCM_TRIGGER_RESUME:
        case SNDRV_PCM_TRIGGER_START:
                state = SOF_IPC4_PIPE_RUNNING;
                break;
+       case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
        case SNDRV_PCM_TRIGGER_SUSPEND:
        case SNDRV_PCM_TRIGGER_STOP:
                state = SOF_IPC4_PIPE_PAUSED;