diff options
author | Ramesh Babu <ramesh.babu@intel.com> | 2016-07-26 08:36:47 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-08-08 06:54:59 -0400 |
commit | 20fb2fbdfc88abb8b6f102c75c27b6068cec2f69 (patch) | |
tree | 258a6c9cb07db600194109588ccfa976906db9b0 | |
parent | 0bdd6d8bedffdb33586455302b6543ca3f157cc1 (diff) |
ASoC: Intel: Skylake: Add library loading IPCs
DSP fw can have additional firmwares as libs. These libs can be
loaded using message IPC_GLB_LOAD_LIBRARY.
Signed-off-by: Ramesh Babu <ramesh.babu@intel.com>
Signed-off-by: Kranthi G <gudishax.kranthikumar@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/intel/skylake/skl-sst-ipc.c | 23 | ||||
-rw-r--r-- | sound/soc/intel/skylake/skl-sst-ipc.h | 3 |
2 files changed, 26 insertions, 0 deletions
diff --git a/sound/soc/intel/skylake/skl-sst-ipc.c b/sound/soc/intel/skylake/skl-sst-ipc.c index 96f2f6889b18..1544564c0ad1 100644 --- a/sound/soc/intel/skylake/skl-sst-ipc.c +++ b/sound/soc/intel/skylake/skl-sst-ipc.c | |||
@@ -190,6 +190,7 @@ enum skl_ipc_glb_type { | |||
190 | IPC_GLB_GET_PPL_CONTEXT_SIZE = 21, | 190 | IPC_GLB_GET_PPL_CONTEXT_SIZE = 21, |
191 | IPC_GLB_SAVE_PPL = 22, | 191 | IPC_GLB_SAVE_PPL = 22, |
192 | IPC_GLB_RESTORE_PPL = 23, | 192 | IPC_GLB_RESTORE_PPL = 23, |
193 | IPC_GLB_LOAD_LIBRARY = 24, | ||
193 | IPC_GLB_NOTIFY = 26, | 194 | IPC_GLB_NOTIFY = 26, |
194 | IPC_GLB_MAX_IPC_MSG_NUMBER = 31 /* Maximum message number */ | 195 | IPC_GLB_MAX_IPC_MSG_NUMBER = 31 /* Maximum message number */ |
195 | }; | 196 | }; |
@@ -902,3 +903,25 @@ int skl_ipc_get_large_config(struct sst_generic_ipc *ipc, | |||
902 | return ret; | 903 | return ret; |
903 | } | 904 | } |
904 | EXPORT_SYMBOL_GPL(skl_ipc_get_large_config); | 905 | EXPORT_SYMBOL_GPL(skl_ipc_get_large_config); |
906 | |||
907 | int skl_sst_ipc_load_library(struct sst_generic_ipc *ipc, | ||
908 | u8 dma_id, u8 table_id) | ||
909 | { | ||
910 | struct skl_ipc_header header = {0}; | ||
911 | u64 *ipc_header = (u64 *)(&header); | ||
912 | int ret = 0; | ||
913 | |||
914 | header.primary = IPC_MSG_TARGET(IPC_FW_GEN_MSG); | ||
915 | header.primary |= IPC_MSG_DIR(IPC_MSG_REQUEST); | ||
916 | header.primary |= IPC_GLB_TYPE(IPC_GLB_LOAD_LIBRARY); | ||
917 | header.primary |= IPC_MOD_INSTANCE_ID(table_id); | ||
918 | header.primary |= IPC_MOD_ID(dma_id); | ||
919 | |||
920 | ret = sst_ipc_tx_message_wait(ipc, *ipc_header, NULL, 0, NULL, 0); | ||
921 | |||
922 | if (ret < 0) | ||
923 | dev_err(ipc->dev, "ipc: load lib failed\n"); | ||
924 | |||
925 | return ret; | ||
926 | } | ||
927 | EXPORT_SYMBOL_GPL(skl_sst_ipc_load_library); | ||
diff --git a/sound/soc/intel/skylake/skl-sst-ipc.h b/sound/soc/intel/skylake/skl-sst-ipc.h index 31e5bc356aa2..fc46779f80c3 100644 --- a/sound/soc/intel/skylake/skl-sst-ipc.h +++ b/sound/soc/intel/skylake/skl-sst-ipc.h | |||
@@ -151,6 +151,9 @@ int skl_ipc_set_large_config(struct sst_generic_ipc *ipc, | |||
151 | int skl_ipc_get_large_config(struct sst_generic_ipc *ipc, | 151 | int skl_ipc_get_large_config(struct sst_generic_ipc *ipc, |
152 | struct skl_ipc_large_config_msg *msg, u32 *param); | 152 | struct skl_ipc_large_config_msg *msg, u32 *param); |
153 | 153 | ||
154 | int skl_sst_ipc_load_library(struct sst_generic_ipc *ipc, | ||
155 | u8 dma_id, u8 table_id); | ||
156 | |||
154 | void skl_ipc_int_enable(struct sst_dsp *dsp); | 157 | void skl_ipc_int_enable(struct sst_dsp *dsp); |
155 | void skl_ipc_op_int_enable(struct sst_dsp *ctx); | 158 | void skl_ipc_op_int_enable(struct sst_dsp *ctx); |
156 | void skl_ipc_op_int_disable(struct sst_dsp *ctx); | 159 | void skl_ipc_op_int_disable(struct sst_dsp *ctx); |