aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/intel/skylake/skl-pcm.c41
-rw-r--r--sound/soc/intel/skylake/skl-topology.h1
2 files changed, 39 insertions, 3 deletions
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index a756882b9029..2b1e513b1680 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -1220,8 +1220,11 @@ static int skl_pcm_new(struct snd_soc_pcm_runtime *rtd)
1220static int skl_get_module_info(struct skl *skl, struct skl_module_cfg *mconfig) 1220static int skl_get_module_info(struct skl *skl, struct skl_module_cfg *mconfig)
1221{ 1221{
1222 struct skl_sst *ctx = skl->skl_sst; 1222 struct skl_sst *ctx = skl->skl_sst;
1223 struct skl_module_inst_id *pin_id;
1224 uuid_le *uuid_mod, *uuid_tplg;
1225 struct skl_module *skl_module;
1223 struct uuid_module *module; 1226 struct uuid_module *module;
1224 uuid_le *uuid_mod; 1227 int i, ret = -EIO;
1225 1228
1226 uuid_mod = (uuid_le *)mconfig->guid; 1229 uuid_mod = (uuid_le *)mconfig->guid;
1227 1230
@@ -1235,11 +1238,43 @@ static int skl_get_module_info(struct skl *skl, struct skl_module_cfg *mconfig)
1235 mconfig->id.module_id = module->id; 1238 mconfig->id.module_id = module->id;
1236 if (mconfig->module) 1239 if (mconfig->module)
1237 mconfig->module->loadable = module->is_loadable; 1240 mconfig->module->loadable = module->is_loadable;
1238 return 0; 1241 ret = 0;
1242 break;
1239 } 1243 }
1240 } 1244 }
1241 1245
1242 return -EIO; 1246 if (ret)
1247 return ret;
1248
1249 uuid_mod = &module->uuid;
1250 ret = -EIO;
1251 for (i = 0; i < skl->nr_modules; i++) {
1252 skl_module = skl->modules[i];
1253 uuid_tplg = &skl_module->uuid;
1254 if (!uuid_le_cmp(*uuid_mod, *uuid_tplg)) {
1255 mconfig->module = skl_module;
1256 ret = 0;
1257 break;
1258 }
1259 }
1260 if (skl->nr_modules && ret)
1261 return ret;
1262
1263 list_for_each_entry(module, &ctx->uuid_list, list) {
1264 for (i = 0; i < MAX_IN_QUEUE; i++) {
1265 pin_id = &mconfig->m_in_pin[i].id;
1266 if (!uuid_le_cmp(pin_id->mod_uuid, module->uuid))
1267 pin_id->module_id = module->id;
1268 }
1269
1270 for (i = 0; i < MAX_OUT_QUEUE; i++) {
1271 pin_id = &mconfig->m_out_pin[i].id;
1272 if (!uuid_le_cmp(pin_id->mod_uuid, module->uuid))
1273 pin_id->module_id = module->id;
1274 }
1275 }
1276
1277 return 0;
1243} 1278}
1244 1279
1245static int skl_populate_modules(struct skl *skl) 1280static int skl_populate_modules(struct skl *skl)
diff --git a/sound/soc/intel/skylake/skl-topology.h b/sound/soc/intel/skylake/skl-topology.h
index 90903a15fa1d..4975904480e9 100644
--- a/sound/soc/intel/skylake/skl-topology.h
+++ b/sound/soc/intel/skylake/skl-topology.h
@@ -221,6 +221,7 @@ struct skl_kpb_params {
221}; 221};
222 222
223struct skl_module_inst_id { 223struct skl_module_inst_id {
224 uuid_le mod_uuid;
224 int module_id; 225 int module_id;
225 u32 instance_id; 226 u32 instance_id;
226 int pvt_id; 227 int pvt_id;