1
0

ASoC: Intel: Skylake: Update to use instance ids generated

Post bind parameters of KPB module contains the instance id's of
neighbouring modules in the sink path

Now that module instance ids are generated dynamically we need to update
these parameters as well, so use the table created and update the ids

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Este cometimento está contido em:
Dharageswari R
2016-09-22 14:00:40 +05:30
cometido por Mark Brown
ascendente ef2a352cfb
cometimento 5e8f0ee46d
4 ficheiros modificados com 36 adições e 1 eliminações

Ver ficheiro

@@ -607,6 +607,26 @@ static int skl_tplg_mixer_dapm_pre_pmu_event(struct snd_soc_dapm_widget *w,
return 0;
}
static int skl_fill_sink_instance_id(struct skl_sst *ctx,
struct skl_algo_data *alg_data)
{
struct skl_kpb_params *params = (struct skl_kpb_params *)alg_data->params;
struct skl_mod_inst_map *inst;
int i, pvt_id;
inst = params->map;
for (i = 0; i < params->num_modules; i++) {
pvt_id = skl_get_pvt_instance_id_map(ctx,
inst->mod_id, inst->inst_id);
if (pvt_id < 0)
return -EINVAL;
inst->inst_id = pvt_id;
inst++;
}
return 0;
}
/*
* Some modules require params to be set after the module is bound to
* all pins connected.
@@ -655,6 +675,8 @@ static int skl_tplg_set_module_bind_params(struct snd_soc_dapm_widget *w,
bc = (struct skl_algo_data *)sb->dobj.private;
if (bc->set_params == SKL_PARAM_BIND) {
if (mconfig->m_type == SKL_MODULE_TYPE_KPB)
skl_fill_sink_instance_id(ctx, bc);
ret = skl_set_module_params(ctx,
(u32 *)bc->params, bc->max,
bc->param_id, mconfig);