From: Vinod Koul <vinod.koul@intel.com>
To: alsa-devel@alsa-project.org
Cc: Kranthi G <gudishax.kranthikumar@intel.com>,
patches.audio@intel.com, Ramesh Babu <ramesh.babu@intel.com>,
liam.r.girdwood@linux.intel.com,
Vinod Koul <vinod.koul@intel.com>,
broonie@kernel.org
Subject: [PATCH 09/12] ASoC: Intel: Skylake: Add library loading IPCs
Date: Tue, 26 Jul 2016 18:06:47 +0530 [thread overview]
Message-ID: <1469536610-27606-10-git-send-email-vinod.koul@intel.com> (raw)
In-Reply-To: <1469536610-27606-1-git-send-email-vinod.koul@intel.com>
From: Ramesh Babu <ramesh.babu@intel.com>
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>
---
sound/soc/intel/skylake/skl-sst-ipc.c | 23 +++++++++++++++++++++++
sound/soc/intel/skylake/skl-sst-ipc.h | 3 +++
2 files changed, 26 insertions(+)
diff --git a/sound/soc/intel/skylake/skl-sst-ipc.c b/sound/soc/intel/skylake/skl-sst-ipc.c
index c141f24cae05..04c1b123aadf 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 {
IPC_GLB_GET_PPL_CONTEXT_SIZE = 21,
IPC_GLB_SAVE_PPL = 22,
IPC_GLB_RESTORE_PPL = 23,
+ IPC_GLB_LOAD_LIBRARY = 24,
IPC_GLB_NOTIFY = 26,
IPC_GLB_MAX_IPC_MSG_NUMBER = 31 /* Maximum message number */
};
@@ -902,3 +903,25 @@ int skl_ipc_get_large_config(struct sst_generic_ipc *ipc,
return ret;
}
EXPORT_SYMBOL_GPL(skl_ipc_get_large_config);
+
+int skl_sst_ipc_load_library(struct sst_generic_ipc *ipc,
+ u8 dma_id, u8 table_id)
+{
+ struct skl_ipc_header header = {0};
+ u64 *ipc_header = (u64 *)(&header);
+ int ret = 0;
+
+ header.primary = IPC_MSG_TARGET(IPC_FW_GEN_MSG);
+ header.primary |= IPC_MSG_DIR(IPC_MSG_REQUEST);
+ header.primary |= IPC_GLB_TYPE(IPC_GLB_LOAD_LIBRARY);
+ header.primary |= IPC_MOD_INSTANCE_ID(table_id);
+ header.primary |= IPC_MOD_ID(dma_id);
+
+ ret = sst_ipc_tx_message_wait(ipc, *ipc_header, NULL, 0, NULL, 0);
+
+ if (ret < 0)
+ dev_err(ipc->dev, "ipc: load lib failed\n");
+
+ return ret;
+}
+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,
int skl_ipc_get_large_config(struct sst_generic_ipc *ipc,
struct skl_ipc_large_config_msg *msg, u32 *param);
+int skl_sst_ipc_load_library(struct sst_generic_ipc *ipc,
+ u8 dma_id, u8 table_id);
+
void skl_ipc_int_enable(struct sst_dsp *dsp);
void skl_ipc_op_int_enable(struct sst_dsp *ctx);
void skl_ipc_op_int_disable(struct sst_dsp *ctx);
--
1.9.1
next prev parent reply other threads:[~2016-07-26 12:30 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-26 12:36 [PATCH 00/12] ASoC: Intel: Skylake: Add support for library load Vinod Koul
2016-07-26 12:36 ` [PATCH 01/12] ASoC: Intel: Skylake: Check list empty while getting module info Vinod Koul
2016-08-01 17:07 ` Applied "ASoC: Intel: Skylake: Check list empty while getting module info" to the asoc tree Mark Brown
2016-07-26 12:36 ` [PATCH 02/12] ASoC: Intel: Skylake: Move modules query to runtime Vinod Koul
2016-08-01 17:07 ` Applied "ASoC: Intel: Skylake: Move modules query to runtime" to the asoc tree Mark Brown
2016-07-26 12:36 ` [PATCH 03/12] ASoC: Intel: Skylake: modify skl_get_dsp_ops() Vinod Koul
2016-08-01 17:07 ` Applied "ASoC: Intel: Skylake: modify skl_get_dsp_ops()" to the asoc tree Mark Brown
2016-07-26 12:36 ` [PATCH 04/12] ASoC: Intel: Skylake: split fw and dsp initialization Vinod Koul
2016-08-01 17:07 ` Applied "ASoC: Intel: Skylake: split fw and dsp initialization" to the asoc tree Mark Brown
2016-07-26 12:36 ` [PATCH 05/12] ASoC: Intel: Skylake: add support for tplg manifest load Vinod Koul
2016-08-01 17:07 ` Applied "ASoC: Intel: Skylake: add support for tplg manifest load" to the asoc tree Mark Brown
2016-07-26 12:36 ` [PATCH 06/12] ASoC: Intel: Skylake: add additional args to module parsing Vinod Koul
2016-08-01 17:07 ` Applied "ASoC: Intel: Skylake: add additional args to module parsing" to the asoc tree Mark Brown
2016-07-26 12:36 ` [PATCH 07/12] ASoC: Intel: Skylake: Parse UUIDs once Vinod Koul
2016-08-01 17:07 ` Applied "ASoC: Intel: Skylake: Parse UUIDs once" to the asoc tree Mark Brown
2016-07-26 12:36 ` [PATCH 08/12] ASoC: Intel: Bxt: Parse UUIDs once Vinod Koul
2016-08-01 17:07 ` Applied "ASoC: Intel: Bxt: Parse UUIDs once" to the asoc tree Mark Brown
2016-07-26 12:36 ` Vinod Koul [this message]
2016-08-01 17:07 ` Applied "ASoC: Intel: Skylake: Add library loading IPCs" " Mark Brown
2016-07-26 12:36 ` [PATCH 10/12] ASoC: Intel: Skylake: Add library loading support Vinod Koul
2016-08-05 11:19 ` Applied "ASoC: Intel: Skylake: Add library loading support" to the asoc tree Mark Brown
2016-07-26 12:36 ` [PATCH 11/12] ASoC: Intel: Skylake: Fix a comment style Vinod Koul
2016-08-05 11:19 ` Applied "ASoC: Intel: Skylake: Fix a comment style" to the asoc tree Mark Brown
2016-07-26 12:36 ` [PATCH 12/12] ASoC: Intel: Skylake: Add module processing domain support Vinod Koul
2016-08-05 11:18 ` Applied "ASoC: Intel: Skylake: Add module processing domain support" to the asoc tree Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1469536610-27606-10-git-send-email-vinod.koul@intel.com \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=gudishax.kranthikumar@intel.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=patches.audio@intel.com \
--cc=ramesh.babu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).