[01/35] ASoC: Intel: Skylake: Put FW runtime params defs in one place
diff mbox series

Message ID 20190822190425.23001-2-cezary.rojewski@intel.com
State New
Headers show
Series
  • ASoC: Intel: Clenaup SST initialization
Related show

Commit Message

Cezary Rojewski Aug. 22, 2019, 7:03 p.m. UTC
From: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>

Change Runtime Parameters enum to have its own prefix and then reuse
those defines in all places where we actually use those parameters.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
---
 sound/soc/intel/skylake/skl-messages.c | 7 ++-----
 sound/soc/intel/skylake/skl-sst-ipc.h  | 5 +++++
 2 files changed, 7 insertions(+), 5 deletions(-)

Patch
diff mbox series

diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index d43496c5f29e..b6cefb1f9b12 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -34,13 +34,11 @@  static int skl_free_dma_buf(struct device *dev, struct snd_dma_buffer *dmab)
 	return 0;
 }
 
-#define SKL_ASTATE_PARAM_ID	4
-
 void skl_dsp_set_astate_cfg(struct skl_dev *skl, u32 cnt, void *data)
 {
 	struct skl_ipc_large_config_msg	msg = {0};
 
-	msg.large_param_id = SKL_ASTATE_PARAM_ID;
+	msg.large_param_id = SKL_BASEFW_ASTATE_TABLE;
 	msg.param_data_size = (cnt * sizeof(struct skl_astate_param) +
 				sizeof(cnt));
 
@@ -614,7 +612,6 @@  static void skl_setup_cpr_gateway_cfg(struct skl_dev *skl,
 	skl_copy_copier_caps(mconfig, cpr_mconfig);
 }
 
-#define DMA_CONTROL_ID 5
 #define DMA_I2S_BLOB_SIZE 21
 
 int skl_dsp_set_dma_control(struct skl_dev *skl, u32 *caps,
@@ -631,7 +628,7 @@  int skl_dsp_set_dma_control(struct skl_dev *skl, u32 *caps,
 	if (caps_size == 0)
 		return 0;
 
-	msg.large_param_id = DMA_CONTROL_ID;
+	msg.large_param_id = SKL_BASEFW_DMA_CONTROL;
 	msg.param_data_size = sizeof(struct skl_dma_control) + caps_size;
 
 	dma_ctrl = kzalloc(msg.param_data_size, GFP_KERNEL);
diff --git a/sound/soc/intel/skylake/skl-sst-ipc.h b/sound/soc/intel/skylake/skl-sst-ipc.h
index 08ac31778325..0058d82bd5a4 100644
--- a/sound/soc/intel/skylake/skl-sst-ipc.h
+++ b/sound/soc/intel/skylake/skl-sst-ipc.h
@@ -67,6 +67,11 @@  struct skl_lib_info {
 	const struct firmware *fw;
 };
 
+enum skl_basefw_runtime_param {
+	SKL_BASEFW_ASTATE_TABLE = 4,
+	SKL_BASEFW_DMA_CONTROL = 5,
+};
+
 struct skl_ipc_init_instance_msg {
 	u32 module_id;
 	u32 instance_id;