Patch "ASoC: SOF: ipc3-topology: Make sure that only one cmd is sent in dai_config" has been added to the 6.3-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ASoC: SOF: ipc3-topology: Make sure that only one cmd is sent in dai_config

to the 6.3-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     asoc-sof-ipc3-topology-make-sure-that-only-one-cmd-i.patch
and it can be found in the queue-6.3 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 338042a4b54366e3fe7f80c8beb29a27f8ef7c42
Author: Peter Ujfalusi <peter.ujfalusi@xxxxxxxxxxxxxxx>
Date:   Fri May 12 14:03:17 2023 +0300

    ASoC: SOF: ipc3-topology: Make sure that only one cmd is sent in dai_config
    
    [ Upstream commit 4708449eafe60742334606168926985798c9c9b8 ]
    
    The commands in sof_ipc_dai_config.flags are encoded as bits:
    1 (bit0) - hw_params
    2 (bit1) - hw_free
    4 (bit2) - pause
    
    These are commands, they cannot be combined as one would assume, for
    example
    3 (bit0 | bit1) is invalid.
    
    This can happen right at the second start of a stream as at the end of the
    first stream we set the hw_free command (bit1) and on the second start we
    would OR on top of it the hw_params (bit0).
    
    Fixes: b66bfc3a9810 ("ASoC: SOF: sof-audio: Fix broken early bclk feature for SSP")
    Signed-off-by: Peter Ujfalusi <peter.ujfalusi@xxxxxxxxxxxxxxx
    Reviewed-by: Daniel Baluta <daniel.baluta@xxxxxxx
    Reviewed-by: Bard Liao <yung-chuan.liao@xxxxxxxxxxxxxxx
    Reviewed-by: Ranjani Sridharan <ranjani.sridharan@xxxxxxxxxxxxxxx
    Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx
    Link: https://lore.kernel.org/r/20230512110317.5180-1-peter.ujfalusi@xxxxxxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/soc/sof/ipc3-topology.c b/sound/soc/sof/ipc3-topology.c
index b1f425b39db94..ffa4c6dea752a 100644
--- a/sound/soc/sof/ipc3-topology.c
+++ b/sound/soc/sof/ipc3-topology.c
@@ -2111,10 +2111,13 @@ static int sof_ipc3_dai_config(struct snd_sof_dev *sdev, struct snd_sof_widget *
 	 * For the case of PAUSE/HW_FREE, since there are no quirks, flags can be used as is.
 	 */
 
-	if (flags & SOF_DAI_CONFIG_FLAGS_HW_PARAMS)
+	if (flags & SOF_DAI_CONFIG_FLAGS_HW_PARAMS) {
+		/* Clear stale command */
+		config->flags &= ~SOF_DAI_CONFIG_FLAGS_CMD_MASK;
 		config->flags |= flags;
-	else
+	} else {
 		config->flags = flags;
+	}
 
 	/* only send the IPC if the widget is set up in the DSP */
 	if (swidget->use_count > 0) {



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux