summaryrefslogtreecommitdiff
path: root/sound/soc/sof/sof-audio.h
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2021-10-06 14:16:51 +0300
committerMark Brown <broonie@kernel.org>2021-10-07 15:45:45 +0100
commitd8a15e5fcae132dc6a44847535ce355f6fba46f8 (patch)
tree71de0fea8aae2c0cb237408449bbb22a953ca11c /sound/soc/sof/sof-audio.h
parentec626334eaffe101df9ed79e161eba95124e64ad (diff)
downloadlwn-d8a15e5fcae132dc6a44847535ce355f6fba46f8.tar.gz
lwn-d8a15e5fcae132dc6a44847535ce355f6fba46f8.zip
ASoC: SOF: pipelines: Harmonize all functions to use struct snd_sof_dev
First thing the pipelines function which have "struct device *dev" as parameter do is: struct snd_sof_dev *sdev = dev_get_drvdata(dev); and in all cases the passed dev is actually coming from sdev->dev. Skip this steps and pass directly the sdev to all pipelines related functions as few of them already does this. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20211006111651.10027-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/sof-audio.h')
-rw-r--r--sound/soc/sof/sof-audio.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/sof/sof-audio.h b/sound/soc/sof/sof-audio.h
index 149b3dbcddd1..fe2ffe02fdfb 100644
--- a/sound/soc/sof/sof-audio.h
+++ b/sound/soc/sof/sof-audio.h
@@ -181,10 +181,10 @@ void snd_sof_control_notify(struct snd_sof_dev *sdev,
* be freed by snd_soc_unregister_component,
*/
int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file);
-int snd_sof_complete_pipeline(struct device *dev,
+int snd_sof_complete_pipeline(struct snd_sof_dev *sdev,
struct snd_sof_widget *swidget);
-int sof_load_pipeline_ipc(struct device *dev,
+int sof_load_pipeline_ipc(struct snd_sof_dev *sdev,
struct sof_ipc_pipe_new *pipeline,
struct sof_ipc_comp_reply *r);
int sof_pipeline_core_enable(struct snd_sof_dev *sdev,
@@ -246,8 +246,8 @@ int snd_sof_ipc_set_get_comp_data(struct snd_sof_control *scontrol,
int sof_pcm_dai_link_fixup(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params);
/* PM */
-int sof_set_up_pipelines(struct device *dev, bool verify);
-int sof_tear_down_pipelines(struct device *dev, bool verify);
+int sof_set_up_pipelines(struct snd_sof_dev *sdev, bool verify);
+int sof_tear_down_pipelines(struct snd_sof_dev *sdev, bool verify);
int sof_set_hw_params_upon_resume(struct device *dev);
bool snd_sof_stream_suspend_ignored(struct snd_sof_dev *sdev);
bool snd_sof_dsp_only_d0i3_compatible_stream_active(struct snd_sof_dev *sdev);