• Home
  • Raw
  • Download

Lines Matching full:plugin

26  *  struct plugin    struct instance
40 * That is, A connects to B, and B connects to C. If the plugin B is
49 struct plugin *plugin; /* the plugin corresponds to the instance */ member
50 int original_index; /* the port index in the plugin */
57 struct plugin *plugin; /* the plugin corresponds to the instance */ member
58 int original_index; /* the port index in the plugin */
65 /* An instance is a dynamic representation of a plugin. We only create
66 * an instance when a plugin is needed (data actually flows through it
68 * struct dsp_module, which is the implementation of the plugin */
70 /* The plugin this instance corresponds to */
71 struct plugin *plugin; member
74 * between this and the port array in a struct plugin is that
83 /* The implementation of the plugin */
148 struct plugin *plugin) in find_instance_by_plugin() argument
154 if (instance->plugin == plugin) in find_instance_by_plugin()
161 /* Finds out where the data sent to plugin:index come from. The issue
162 * we need to handle here is the previous plugin may be disabled, so
165 struct plugin *plugin, int index, in find_origin_port() argument
166 struct plugin **origin, int *origin_index) in find_origin_port()
175 port = ARRAY_ELEMENT(&plugin->ports, index); in find_origin_port()
182 /* move to the previous plugin */ in find_origin_port()
183 plugin = flow->from; in find_origin_port()
186 /* if the plugin is not disabled, it will be pointed by some instance */ in find_origin_port()
187 if (find_instance_by_plugin(instances, plugin)) { in find_origin_port()
188 *origin = plugin; in find_origin_port()
193 /* Now we know the previous plugin is disabled, we need to go in find_origin_port()
194 * upstream. We assume the k-th output port of the plugin in find_origin_port()
195 * corresponds to the k-th input port of the plugin (with the in find_origin_port()
200 FOR_ARRAY_ELEMENT(&plugin->ports, i, port) { in find_origin_port()
212 FOR_ARRAY_ELEMENT(&plugin->ports, i, port) { in find_origin_port()
224 return find_origin_port(ini, instances, plugin, index, origin, in find_origin_port()
229 struct plugin *plugin, in find_output_audio_port() argument
236 instance = find_instance_by_plugin(instances, plugin); in find_output_audio_port()
249 struct plugin *plugin, in find_output_control_port() argument
256 instance = find_instance_by_plugin(instances, plugin); in find_output_control_port()
268 static char is_disabled(struct plugin *plugin, struct cras_expr_env *env) in is_disabled() argument
271 return (plugin->disable_expr && in is_disabled()
273 plugin->disable_expr, env, &disabled) == 0 && in is_disabled()
279 struct plugin *plugin, char* visited) in topological_sort() argument
289 index = ARRAY_INDEX(&ini->plugins, plugin); in topological_sort()
294 FOR_ARRAY_ELEMENT(&plugin->ports, i, port) { in topological_sort()
300 syslog(LOG_ERR, "no plugin flows to %s:%d", in topological_sort()
301 plugin->title, i); in topological_sort()
308 /* if the plugin is disabled, we don't construct an instance for it */ in topological_sort()
309 if (is_disabled(plugin, env)) in topological_sort()
313 instance->plugin = plugin; in topological_sort()
316 FOR_ARRAY_ELEMENT(&plugin->ports, i, port) { in topological_sort()
319 struct plugin *origin = NULL; in topological_sort()
323 if (find_origin_port(ini, &pipeline->instances, plugin, in topological_sort()
335 audio_port->plugin = plugin; in topological_sort()
354 control_port->plugin = plugin; in topological_sort()
373 static struct plugin *find_enabled_builtin_plugin(struct ini *ini, in find_enabled_builtin_plugin()
379 struct plugin *plugin, *found = NULL; in find_enabled_builtin_plugin() local
381 FOR_ARRAY_ELEMENT(&ini->plugins, i, plugin) { in find_enabled_builtin_plugin()
382 if (strcmp(plugin->library, "builtin") != 0) in find_enabled_builtin_plugin()
384 if (strcmp(plugin->label, label) != 0) in find_enabled_builtin_plugin()
386 if (!plugin->purpose || strcmp(plugin->purpose, purpose) != 0) in find_enabled_builtin_plugin()
388 if (is_disabled(plugin, env)) in find_enabled_builtin_plugin()
392 label, found->title, plugin->title); in find_enabled_builtin_plugin()
395 found = plugin; in find_enabled_builtin_plugin()
409 struct plugin *source = find_enabled_builtin_plugin( in cras_dsp_pipeline_create()
411 struct plugin *sink = find_enabled_builtin_plugin( in cras_dsp_pipeline_create()
466 static int load_module(struct plugin *plugin, struct instance *instance) in load_module() argument
469 module = cras_dsp_module_load_builtin(plugin); in load_module()
471 module = cras_dsp_module_load_ladspa(plugin); in load_module()
574 * plugin B has the MODULE_INPLACE_BROKEN flag, then in allocate_buffers()
575 * peak_buf is 5 because plugin B cannot output to the in allocate_buffers()
602 struct plugin *plugin = instance->plugin; in cras_dsp_pipeline_load() local
603 if (load_module(plugin, instance) != 0) in cras_dsp_pipeline_load()
630 &pipeline->instances, audio_port->peer->plugin); in calculate_audio_delay()
648 syslog(LOG_DEBUG, "instantiate %s", instance->plugin->label); in cras_dsp_pipeline_instantiate()
670 audio_port->buf_index, instance->plugin->title, in cras_dsp_pipeline_instantiate()
679 audio_port->buf_index, instance->plugin->title, in cras_dsp_pipeline_instantiate()
697 control_port->value, instance->plugin->title, in cras_dsp_pipeline_instantiate()
706 control_port->value, instance->plugin->title, in cras_dsp_pipeline_instantiate()
887 instance->plugin = NULL; in cras_dsp_pipeline_free()
979 i, instance->plugin->title, module, in cras_dsp_pipeline_dump()