95 lines
3.7 KiB
Diff
95 lines
3.7 KiB
Diff
From 600fd7712fa8ecb5cd28d284b1215a332e4b160e Mon Sep 17 00:00:00 2001
|
|
From: "Mallikarjun, chippalkatti" <mallikarjunx.chippalkatti@intel.com>
|
|
Date: Mon, 24 Apr 2017 14:43:23 +0530
|
|
Subject: [PATCH 331/743] ASoC: Intel: CNL: Retrieve module id from GUID
|
|
|
|
This patch retrieves module id from GUID for copier module used
|
|
for SoundWire BRA feature.
|
|
|
|
Change-Id: Ib9453f929e4b0280535a2151851ac04c5098c806
|
|
Signed-off-by: Mallikarjun, chippalkatti <mallikarjunx.chippalkatti@intel.com>
|
|
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
|
|
Reviewed-on:
|
|
Reviewed-by: audio_build
|
|
Reviewed-by: Singh, Guneshwor O <guneshwor.o.singh@intel.com>
|
|
Reviewed-by: Prodduvaka, Leoni
|
|
Reviewed-by: Kp, Jeeja <jeeja.kp@intel.com>
|
|
Reviewed-by: Diwakar, Praveen <praveen.diwakar@intel.com>
|
|
Tested-by: Avati, Santosh Kumar <santosh.kumar.avati@intel.com>
|
|
---
|
|
sound/soc/intel/skylake/skl-messages.c | 14 ++++----------
|
|
sound/soc/intel/skylake/skl-sst-dsp.h | 1 +
|
|
sound/soc/intel/skylake/skl-topology.c | 3 ++-
|
|
3 files changed, 7 insertions(+), 11 deletions(-)
|
|
|
|
diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
|
|
index 54bd83eb55b5..2c0cf7a96128 100644
|
|
--- a/sound/soc/intel/skylake/skl-messages.c
|
|
+++ b/sound/soc/intel/skylake/skl-messages.c
|
|
@@ -385,12 +385,9 @@ static int cnl_sdw_bra_pipe_cfg_pb(struct skl_sst *ctx,
|
|
host_cpr_params.s_fmt = 32;
|
|
host_cpr_params.linktype = 0;
|
|
host_cpr_params.stream = 0;
|
|
+ host_cpr_cfg.id.module_id = skl_get_module_id(ctx,
|
|
+ (uuid_le *)host_cpr_cfg.guid);
|
|
|
|
-#if IS_ENABLED(CONFIG_SND_SOC_INTEL_CNL_FPGA)
|
|
- host_cpr_cfg.id.module_id = 3;
|
|
-#else
|
|
- host_cpr_cfg.id.module_id = 4;
|
|
-#endif
|
|
host_cpr_cfg.id.instance_id = 1;
|
|
host_cpr_cfg.id.pvt_id = skl_get_pvt_id(ctx,
|
|
(uuid_le *)host_cpr_cfg.guid, host_cpr_cfg.id.instance_id);
|
|
@@ -617,12 +614,9 @@ static int cnl_sdw_bra_pipe_cfg_cp(struct skl_sst *ctx,
|
|
link_cpr_params.s_fmt = 32;
|
|
link_cpr_params.linktype = 0;
|
|
link_cpr_params.stream = 0;
|
|
+ host_cpr_cfg.id.module_id = skl_get_module_id(ctx,
|
|
+ (uuid_le *)host_cpr_cfg.guid);
|
|
|
|
-#if IS_ENABLED(CONFIG_SND_SOC_INTEL_CNL_FPGA)
|
|
- link_cpr_cfg.id.module_id = 3;
|
|
-#else
|
|
- link_cpr_cfg.id.module_id = 4;
|
|
-#endif
|
|
link_cpr_cfg.id.instance_id = 3;
|
|
link_cpr_cfg.id.pvt_id = skl_get_pvt_id(ctx,
|
|
(uuid_le *)link_cpr_cfg.guid, link_cpr_cfg.id.instance_id);
|
|
diff --git a/sound/soc/intel/skylake/skl-sst-dsp.h b/sound/soc/intel/skylake/skl-sst-dsp.h
|
|
index 7be2cdeb85b6..402fb875272c 100644
|
|
--- a/sound/soc/intel/skylake/skl-sst-dsp.h
|
|
+++ b/sound/soc/intel/skylake/skl-sst-dsp.h
|
|
@@ -278,6 +278,7 @@ int bxt_load_library(struct sst_dsp *ctx, struct skl_lib_info *linfo, int lib_co
|
|
|
|
int snd_skl_parse_uuids(struct sst_dsp *ctx, const struct firmware *fw,
|
|
unsigned int offset, int index);
|
|
+int skl_get_module_id(struct skl_sst *ctx, uuid_le *uuid_mod);
|
|
int skl_get_pvt_id(struct skl_sst *ctx, uuid_le *uuid_mod, int instance_id);
|
|
int skl_put_pvt_id(struct skl_sst *ctx, uuid_le *uuid_mod, int *pvt_id);
|
|
int skl_get_pvt_instance_id_map(struct skl_sst *ctx,
|
|
diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
|
|
index 711629143aa3..2dfb454f7007 100644
|
|
--- a/sound/soc/intel/skylake/skl-topology.c
|
|
+++ b/sound/soc/intel/skylake/skl-topology.c
|
|
@@ -1040,7 +1040,7 @@ static int skl_tplg_set_module_bind_params(struct snd_soc_dapm_widget *w,
|
|
return 0;
|
|
}
|
|
|
|
-static int skl_get_module_id(struct skl_sst *ctx, uuid_le *uuid)
|
|
+int skl_get_module_id(struct skl_sst *ctx, uuid_le *uuid)
|
|
{
|
|
struct uuid_module *module;
|
|
|
|
@@ -1051,6 +1051,7 @@ static int skl_get_module_id(struct skl_sst *ctx, uuid_le *uuid)
|
|
|
|
return -EINVAL;
|
|
}
|
|
+EXPORT_SYMBOL_GPL(skl_get_module_id);
|
|
|
|
static int skl_tplg_find_moduleid_from_uuid(struct skl *skl,
|
|
const struct snd_kcontrol_new *k)
|
|
--
|
|
2.19.2
|
|
|