diff options
author | Ranjani Sridharan <ranjani.sridharan@linux.intel.com> | 2023-01-27 14:00:28 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-01-27 12:14:11 +0000 |
commit | 6bc4d1b714aafc0ee3c7649c36aa19998b4c11f9 (patch) | |
tree | 76a8fcb50ac732333ac9d78362312a4ec8687293 /sound/soc/sof/ipc4-priv.h | |
parent | 32c4b69872e5fe5fd9517826be31dbf2c3dd917a (diff) |
ASoC: SOF: ipc4-topology: Protect pipeline free with mutex
When starting/stopping multiple streams in parallel, pipeline triggers
and pipeline frees can get interleaved. So use the same mutex used for
pipeline trigger to protect the pipeline frees as well. Rename the
trigger_mutex to pipeline_state_mutex for more clarity.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230127120031.10709-16-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/ipc4-priv.h')
-rw-r--r-- | sound/soc/sof/ipc4-priv.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/sof/ipc4-priv.h b/sound/soc/sof/ipc4-priv.h index 0c0d48376045..38bb3d7df42e 100644 --- a/sound/soc/sof/ipc4-priv.h +++ b/sound/soc/sof/ipc4-priv.h @@ -70,7 +70,7 @@ struct sof_ipc4_fw_library { * base firmware * * @load_library: Callback function for platform dependent library loading - * @trigger_mutex: Mutex to protect pipeline triggers, ref counts and states + * @pipeline_state_mutex: Mutex to protect pipeline triggers, ref counts, states and deletion */ struct sof_ipc4_fw_data { u32 manifest_fw_hdr_offset; @@ -83,7 +83,7 @@ struct sof_ipc4_fw_data { int (*load_library)(struct snd_sof_dev *sdev, struct sof_ipc4_fw_library *fw_lib, bool reload); - struct mutex trigger_mutex; /* protect pipeline triggers, ref counts and states */ + struct mutex pipeline_state_mutex; /* protect pipeline triggers, ref counts and states */ }; extern const struct sof_ipc_fw_loader_ops ipc4_loader_ops; |