Lines Matching defs:mod
32 struct avs_path_module *mod;
34 list_for_each_entry(mod, &ppl->mod_list, node)
35 if (mod->template->id == template_id)
36 return mod;
144 static int avs_copier_create(struct avs_dev *adev, struct avs_path_module *mod)
147 struct avs_tplg_module *t = mod->template;
221 node_id.vindex = mod->owner->owner->dma_id;
227 mod->owner->owner->dma_id;
259 mod->gtw_attrs = cfg->gtw_cfg.config.attrs;
261 ret = avs_dsp_init_module(adev, mod->module_id, mod->owner->instance_id,
263 &mod->instance_id);
268 static struct avs_control_data *avs_get_module_control(struct avs_path_module *mod)
270 struct avs_tplg_module *t = mod->template;
291 static int avs_peakvol_create(struct avs_dev *adev, struct avs_path_module *mod)
293 struct avs_tplg_module *t = mod->template;
300 ctl_data = avs_get_module_control(mod);
320 ret = avs_dsp_init_module(adev, mod->module_id, mod->owner->instance_id, t->core_id,
321 t->domain, cfg, size, &mod->instance_id);
327 static int avs_updown_mix_create(struct avs_dev *adev, struct avs_path_module *mod)
329 struct avs_tplg_module *t = mod->template;
344 return avs_dsp_init_module(adev, mod->module_id, mod->owner->instance_id,
346 &mod->instance_id);
349 static int avs_src_create(struct avs_dev *adev, struct avs_path_module *mod)
351 struct avs_tplg_module *t = mod->template;
361 return avs_dsp_init_module(adev, mod->module_id, mod->owner->instance_id,
363 &mod->instance_id);
366 static int avs_asrc_create(struct avs_dev *adev, struct avs_path_module *mod)
368 struct avs_tplg_module *t = mod->template;
380 return avs_dsp_init_module(adev, mod->module_id, mod->owner->instance_id,
382 &mod->instance_id);
385 static int avs_aec_create(struct avs_dev *adev, struct avs_path_module *mod)
387 struct avs_tplg_module *t = mod->template;
399 return avs_dsp_init_module(adev, mod->module_id, mod->owner->instance_id,
401 &mod->instance_id);
404 static int avs_mux_create(struct avs_dev *adev, struct avs_path_module *mod)
406 struct avs_tplg_module *t = mod->template;
417 return avs_dsp_init_module(adev, mod->module_id, mod->owner->instance_id,
419 &mod->instance_id);
422 static int avs_wov_create(struct avs_dev *adev, struct avs_path_module *mod)
424 struct avs_tplg_module *t = mod->template;
434 return avs_dsp_init_module(adev, mod->module_id, mod->owner->instance_id,
436 &mod->instance_id);
439 static int avs_micsel_create(struct avs_dev *adev, struct avs_path_module *mod)
441 struct avs_tplg_module *t = mod->template;
451 return avs_dsp_init_module(adev, mod->module_id, mod->owner->instance_id,
453 &mod->instance_id);
456 static int avs_modbase_create(struct avs_dev *adev, struct avs_path_module *mod)
458 struct avs_tplg_module *t = mod->template;
467 return avs_dsp_init_module(adev, mod->module_id, mod->owner->instance_id,
469 &mod->instance_id);
472 static int avs_modext_create(struct avs_dev *adev, struct avs_path_module *mod)
474 struct avs_tplg_module *t = mod->template;
505 ret = avs_dsp_init_module(adev, mod->module_id, mod->owner->instance_id,
507 &mod->instance_id);
512 static int avs_probe_create(struct avs_dev *adev, struct avs_path_module *mod)
520 int (*create)(struct avs_dev *adev, struct avs_path_module *mod);
540 static int avs_path_module_type_create(struct avs_dev *adev, struct avs_path_module *mod)
542 const guid_t *type = &mod->template->cfg_ext->type;
546 return avs_module_create[i].create(adev, mod);
548 return avs_modext_create(adev, mod);
551 static void avs_path_module_free(struct avs_dev *adev, struct avs_path_module *mod)
553 kfree(mod);
561 struct avs_path_module *mod;
568 mod = kzalloc(sizeof(*mod), GFP_KERNEL);
569 if (!mod)
572 mod->template = template;
573 mod->module_id = module_id;
574 mod->owner = owner;
575 INIT_LIST_HEAD(&mod->node);
577 ret = avs_path_module_type_create(adev, mod);
580 kfree(mod);
584 return mod;
598 dev_err(adev->dev, "path mod %d not found\n", t->mod_id);
620 dev_err(adev->dev, "target mod %d not found\n", t->target_mod_id);
664 struct avs_path_module *mod;
666 list_for_each_entry(mod, &ppl->mod_list, node) {
674 if (mod == list_last_entry(&ppl->mod_list,
679 source = mod;
680 sink = list_next_entry(mod, node);
697 struct avs_path_module *mod, *save;
707 list_for_each_entry_safe(mod, save, &ppl->mod_list, node) {
708 avs_dsp_delete_module(adev, mod->module_id, mod->instance_id,
709 mod->owner->instance_id,
710 mod->template->core_id);
711 avs_path_module_free(adev, mod);
747 struct avs_path_module *mod;
749 mod = avs_path_module_create(adev, ppl, tmod);
750 if (IS_ERR(mod)) {
751 ret = PTR_ERR(mod);
756 list_add_tail(&mod->node, &ppl->mod_list);