ASoC: Intel: Skylake: Add support for module GUIDs
authorHardik T Shah <hardik.t.shah@intel.com>
Tue, 27 Oct 2015 00:22:57 +0000 (09:22 +0900)
committerMark Brown <broonie@kernel.org>
Mon, 16 Nov 2015 10:08:09 +0000 (10:08 +0000)
The DSP FW specifies loadable modules using GUIDs so add support to
specify the GUIDs from topology

Signed-off-by: Hardik T Shah <hardik.t.shah@intel.com>
Signed-off-by: Omair M Abdullah <omair.m.abdullah@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-topology.c
sound/soc/intel/skylake/skl-topology.h
sound/soc/intel/skylake/skl-tplg-interface.h

index 37e5c4fc0f10f5035887882716c2564c810dc01d..3c5f06235889cb0e9b5eb77d2b438b03dcc444a7 100644 (file)
@@ -1164,6 +1164,10 @@ static int skl_tplg_widget_load(struct snd_soc_component *cmpnt,
        mconfig->time_slot = dfw_config->time_slot;
        mconfig->formats_config.caps_size = dfw_config->caps.caps_size;
 
+       if (dfw_config->is_loadable)
+               memcpy(mconfig->guid, dfw_config->uuid,
+                                       ARRAY_SIZE(dfw_config->uuid));
+
        mconfig->m_in_pin = devm_kzalloc(bus->dev, (mconfig->max_in_queue) *
                                                sizeof(*mconfig->m_in_pin),
                                                GFP_KERNEL);
index 4b0a598986761a80416bb9118b3f04d567d70c88..57cb7b8dd269f9ebb712642baa6aa2244630a4b4 100644 (file)
@@ -246,6 +246,7 @@ enum skl_module_state {
 };
 
 struct skl_module_cfg {
+       char guid[SKL_UUID_STR_SZ];
        struct skl_module_inst_id id;
        u8 domain;
        bool homogenous_inputs;
index aeb8f251675a5d524abe63fcf0f71578b39ebb51..20c068754d08206ee7b39c9ad37cbc7bf57de5ea 100644 (file)
@@ -32,6 +32,7 @@
 #define MAX_IN_QUEUE 8
 #define MAX_OUT_QUEUE 8
 
+#define SKL_UUID_STR_SZ 40
 /* Event types goes here */
 /* Reserve event type 0 for no event handlers */
 enum skl_event_types {
@@ -174,6 +175,8 @@ struct skl_dfw_pipe {
 } __packed;
 
 struct skl_dfw_module {
+       char uuid[SKL_UUID_STR_SZ];
+
        u16 module_id;
        u16 instance_id;
        u32 max_mcps;