ASoC: SOF: ipc3: Remove the ipc3-ops.h header file
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Wed, 4 May 2022 10:28:31 +0000 (13:28 +0300)
committerMark Brown <broonie@kernel.org>
Wed, 4 May 2022 14:31:18 +0000 (15:31 +0100)
Only the main IPC ops struct should be visible outside of IPC3 code to make
sure that the code is correctly abstracted.

Instead of keeping the ipc3-ops.h with only the high level ops struct
declaration, put the ipc3_ops to sof-priv.h and move all other ops struct
declaration into ipc3-priv.h

New IPC implementation should follow this route: the main IPC ops should be
declared in sof-priv.h and no other IPC version related header be used
for generic code.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220504102831.10071-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc.c
sound/soc/sof/ipc3-control.c
sound/soc/sof/ipc3-loader.c
sound/soc/sof/ipc3-ops.h [deleted file]
sound/soc/sof/ipc3-pcm.c
sound/soc/sof/ipc3-priv.h
sound/soc/sof/ipc3-topology.c
sound/soc/sof/ipc3.c
sound/soc/sof/sof-priv.h

index a6ec4b5a4923d58358f894b7b757c98a5ac5346d..41f3a217be5d7bac5ea28ab0cdfb1eb753ba2fd3 100644 (file)
@@ -17,7 +17,6 @@
 #include "sof-priv.h"
 #include "sof-audio.h"
 #include "ops.h"
-#include "ipc3-ops.h"
 
 /**
  * sof_ipc_send_msg - generic function to prepare and send one IPC message
index 4347adcc6543adb8c7e6e1b3e52ae46055656786..3fdc0d854e65d128b4a9ab0767ebd6178e8bf21f 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "sof-priv.h"
 #include "sof-audio.h"
-#include "ipc3-ops.h"
+#include "ipc3-priv.h"
 
 /* IPC set()/get() for kcontrols. */
 static int sof_ipc3_set_get_kcontrol_data(struct snd_sof_control *scontrol, bool set)
index 14158c52a2b7754c8b6786ca0d7eead57595dc3a..f3c741b4951982516897ba0e94f27abe812a62fb 100644 (file)
@@ -9,7 +9,6 @@
 #include "sof-priv.h"
 #include "sof-audio.h"
 #include "ipc3-priv.h"
-#include "ipc3-ops.h"
 #include "ops.h"
 
 static int ipc3_fw_ext_man_get_version(struct snd_sof_dev *sdev,
diff --git a/sound/soc/sof/ipc3-ops.h b/sound/soc/sof/ipc3-ops.h
deleted file mode 100644 (file)
index a478462..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
-/*
- * This file is provided under a dual BSD/GPLv2 license.  When using or
- * redistributing this file, you may do so under either license.
- *
- * Copyright(c) 2021 Intel Corporation. All rights reserved.
- *
- * Author: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
- */
-
-#ifndef __SOUND_SOC_SOF_IPC3_OPS_H
-#define __SOUND_SOC_SOF_IPC3_OPS_H
-
-#include "sof-priv.h"
-
-extern const struct sof_ipc_tplg_ops ipc3_tplg_ops;
-extern const struct sof_ipc_ops ipc3_ops;
-extern const struct sof_ipc_tplg_control_ops tplg_ipc3_control_ops;
-extern const struct sof_ipc_pcm_ops ipc3_pcm_ops;
-
-#endif
index d7b6c67b218061a261a0a4df9ec0d1986a34c98a..c8774a891d6fae80626fce84ba028dac059fc10c 100644 (file)
@@ -8,7 +8,7 @@
 //
 
 #include <sound/pcm_params.h>
-#include "ipc3-ops.h"
+#include "ipc3-priv.h"
 #include "ops.h"
 #include "sof-priv.h"
 #include "sof-audio.h"
index a9b9201508a5e5b352c5bd97b7c0e209009870bf..82f9d0cbfb939194470e1ec10e1899fc57fa076e 100644 (file)
@@ -12,6 +12,9 @@
 #include "sof-priv.h"
 
 /* IPC3 specific ops */
+extern const struct sof_ipc_pcm_ops ipc3_pcm_ops;
+extern const struct sof_ipc_tplg_ops ipc3_tplg_ops;
+extern const struct sof_ipc_tplg_control_ops tplg_ipc3_control_ops;
 extern const struct sof_ipc_fw_loader_ops ipc3_loader_ops;
 
 /* helpers for fw_ready and ext_manifest parsing */
index 220ab6c6803fa9ad7f689abb9ab86fc34c5be36b..043554d7cb4a6ef044ede54560547b8fcbcdea1d 100644 (file)
@@ -11,7 +11,7 @@
 #include <sound/pcm_params.h>
 #include "sof-priv.h"
 #include "sof-audio.h"
-#include "ipc3-ops.h"
+#include "ipc3-priv.h"
 #include "ops.h"
 
 /* Full volume for default values */
index efcd201597fa94e9371602357ff2f9b8851f5aca..a8ffc4f99565060931c900dac300d933b7c5f319 100644 (file)
@@ -12,7 +12,6 @@
 #include "sof-priv.h"
 #include "sof-audio.h"
 #include "ipc3-priv.h"
-#include "ipc3-ops.h"
 #include "ops.h"
 
 typedef void (*ipc3_rx_callback)(struct snd_sof_dev *sdev, void *msg_buf);
index a1141ea8d907f336d9f68c8f7e3b893cf696bf90..4801849cb2ab369cc8a313ec8495ad68314407f8 100644 (file)
@@ -763,4 +763,7 @@ static inline int sof_resume_clients(struct snd_sof_dev *sdev)
 }
 #endif /* CONFIG_SND_SOC_SOF_CLIENT */
 
+/* Main ops for IPC implementations */
+extern const struct sof_ipc_ops ipc3_ops;
+
 #endif