From 856601e5a7ebe69b1c07adef7be80f9a03884329 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Thu, 14 Apr 2022 13:48:10 -0500 Subject: ASoC: SOF: remove const qualifier for 'struct snd_sof_dsp_ops' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that we start having multiple platforms with minor variants, the use of the const qualifier for 'dsp_ops' is starting to be sub-optimal: the structures are copied across platforms, with only a couple of members that differ. This patch removes the const qualifier without any functionality changes, and adds an optional initialization callback. In follow-up patches, the dsp_ops will revisited for Intel HDaudio platforms, with the differences added programmatically over a common baseline. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Kai Vehmanen Reviewed-by: Rander Wang Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20220414184817.362215-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- include/sound/sof.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/sound/sof.h b/include/sound/sof.h index 96997650be65..1a82a0db5e7f 100644 --- a/include/sound/sof.h +++ b/include/sound/sof.h @@ -16,6 +16,7 @@ #include struct snd_sof_dsp_ops; +struct snd_sof_dev; /** * enum sof_fw_state - DSP firmware state definitions @@ -135,7 +136,8 @@ struct sof_dev_desc { /* default firmware name */ const char *default_fw_filename[SOF_IPC_TYPE_COUNT]; - const struct snd_sof_dsp_ops *ops; + struct snd_sof_dsp_ops *ops; + int (*ops_init)(struct snd_sof_dev *sdev); }; int sof_dai_get_mclk(struct snd_soc_pcm_runtime *rtd); -- cgit v1.2.3