ASoC: Intel: Skylake: Add module processing domain support
authorSenthilnathan Veppur <senthilnathanx.veppur@intel.com>
Tue, 26 Jul 2016 12:36:50 +0000 (18:06 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 8 Aug 2016 10:54:59 +0000 (11:54 +0100)
A module can be scheduled in deferent processing domains in DSP. Topology
specifies the module domain.

Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-messages.c
sound/soc/intel/skylake/skl-sst-ipc.c
sound/soc/intel/skylake/skl-sst-ipc.h
sound/soc/intel/skylake/skl-topology.c
sound/soc/intel/skylake/skl-tplg-interface.h

index 2199a91d90d68ec2fd8cd810817f96ba8354a41f..8a750b67273f4239a62ea49863e36bef6738754d 100644 (file)
@@ -870,6 +870,7 @@ int skl_init_module(struct skl_sst *ctx,
        msg.ppl_instance_id = mconfig->pipe->ppl_id;
        msg.param_data_size = module_config_size;
        msg.core_id = mconfig->core_id;
+       msg.domain = mconfig->domain;
 
        ret = skl_ipc_init_instance(&ctx->ipc, &msg, param_data);
        if (ret < 0) {
index 1544564c0ad1f0ae3bc2eabb7e7187b3f9830fbf..74dbecc3afaab7b41b9202c502b6c3be5cd4ccf9 100644 (file)
 #define IPC_CORE_ID(x)                 (((x) & IPC_CORE_ID_MASK) \
                                        << IPC_CORE_ID_SHIFT)
 
+#define IPC_DOMAIN_SHIFT                28
+#define IPC_DOMAIN_MASK                 0x1
+#define IPC_DOMAIN(x)                   (((x) & IPC_DOMAIN_MASK) \
+                                       << IPC_DOMAIN_SHIFT)
+
 /* Bind/Unbind message extension register */
 #define IPC_DST_MOD_ID_SHIFT           0
 #define IPC_DST_MOD_ID(x)              (((x) & IPC_MOD_ID_MASK) \
@@ -705,6 +710,7 @@ int skl_ipc_init_instance(struct sst_generic_ipc *ipc,
        header.extension = IPC_CORE_ID(msg->core_id);
        header.extension |= IPC_PPL_INSTANCE_ID(msg->ppl_instance_id);
        header.extension |= IPC_PARAM_BLOCK_SIZE(param_block_size);
+       header.extension |= IPC_DOMAIN(msg->domain);
 
        dev_dbg(ipc->dev, "In %s primary =%x ext=%x\n", __func__,
                         header.primary, header.extension);
index aad527d5fc523d3b5ac4ae0ee58b7336b5a77c01..0334ed4af0312a89eef15a09f05a67c88465272b 100644 (file)
@@ -91,6 +91,7 @@ struct skl_ipc_init_instance_msg {
        u16 param_data_size;
        u8 ppl_instance_id;
        u8 core_id;
+       u8 domain;
 };
 
 struct skl_ipc_bind_unbind_msg {
index 1300e4b9e7d12c6b63e7f631668151e889a29d91..c13fbefe6abf15526ea42c232b8ffce93e4bb154 100644 (file)
@@ -1656,6 +1656,7 @@ static int skl_tplg_widget_load(struct snd_soc_component *cmpnt,
        mconfig->max_in_queue = dfw_config->max_in_queue;
        mconfig->max_out_queue = dfw_config->max_out_queue;
        mconfig->is_loadable = dfw_config->is_loadable;
+       mconfig->domain = dfw_config->proc_domain;
        skl_tplg_fill_fmt(mconfig->in_fmt, dfw_config->in_fmt,
                                                MODULE_MAX_IN_PINS);
        skl_tplg_fill_fmt(mconfig->out_fmt, dfw_config->out_fmt,
index 1b531c165a9151d9fc4a6a9ba96b437f0fc70d6f..bd8b4ae43557d7c0be7c42dac0ac9b62f03f4449 100644 (file)
@@ -210,7 +210,8 @@ struct skl_dfw_module {
        u32 is_dynamic_in_pin:1;
        u32 is_dynamic_out_pin:1;
        u32 is_loadable:1;
-       u32 rsvd3:11;
+       u32 proc_domain:1;
+       u32 rsvd3:10;
 
        struct skl_dfw_pipe pipe;
        struct skl_dfw_module_fmt in_fmt[MAX_IN_QUEUE];