Lines Matching defs:root
377 If the compound func.\<function_name\> is defined in the root node, then the
614 const char *root = snd_config_topdir();
615 char *path = malloc(strlen(root) + strlen(name) + 2);
618 sprintf(path, "%s/%s", root, name);
2661 * \param[in] root The id of the new node.
2697 int snd_config_make_path(snd_config_t **config, snd_config_t *root,
2707 err = _snd_config_search(root, key, p - key, &n);
2719 err = snd_config_add(root, n);
2723 root = n;
2726 err = _snd_config_search(root, key, -1, config);
2744 err = snd_config_add(root, n);
3410 * \param config Handle to the (root) configuration node.
3465 #define SND_CONFIG_SEARCHA(root, config, key, result, fcn, extra_code) \
3475 err = fcn(root, root, p, &config); \
3516 #define SND_CONFIG_SEARCHVA(root, config, result, fcn) \
3527 err = fcn(root, config, k, &n); \
3589 * \param[in] config Handle to the root of the configuration (sub)tree to search.
3634 * \param[in] root Handle to the root configuration node containing
3636 * \param[in] config Handle to the root of the configuration (sub)tree to search.
3646 * as the id of a compound node below \a root.
3648 * \a root must be a compound node.
3649 * \a root and \a config may be the same node.
3653 * snd_config_searcha(root, config, "a.b.c.d", &result);
3662 * root {
3682 int snd_config_searcha(snd_config_t *root, snd_config_t *config, const char *key, snd_config_t **result)
3684 SND_CONFIG_SEARCHA(root, config, key, result, snd_config_searcha, );
3689 * \param[in] config Handle to the root of the configuration (sub)tree to search.
3725 * \param[in] root Handle to the root configuration node containing
3727 * \param[in] config Handle to the root of the configuration (sub)tree to search.
3747 int snd_config_searchva(snd_config_t *root, snd_config_t *config, snd_config_t **result, ...)
3749 SND_CONFIG_SEARCHVA(root, config, result, snd_config_searcha);
3754 * \param[in] config Handle to the root of the configuration (sub)tree to search.
3764 * searched below \a config (there is no separate \a root parameter),
3790 * \param[in,out] config Handle to the root of the configuration
3821 * \param[in] root Handle to the root configuration node containing
3823 * \param[in,out] config Handle to the root of the configuration
3843 int snd_config_searcha_hooks(snd_config_t *root, snd_config_t *config, const char *key, snd_config_t **result)
3845 SND_CONFIG_SEARCHA(root, config, key, result,
3855 * \param[in] root Handle to the root configuration node containing
3857 * \param[in,out] config Handle to the root of the configuration
3879 int snd_config_searchva_hooks(snd_config_t *root, snd_config_t *config,
3882 SND_CONFIG_SEARCHVA(root, config, result, snd_config_searcha_hooks);
3887 * \param[in] config Handle to the root of the configuration (sub)tree
3960 static int snd_config_hooks_call(snd_config_t *root, snd_config_t *config, snd_config_t *private_data)
3967 int (*func)(snd_config_t *root, snd_config_t *config, snd_config_t **dst, snd_config_t *private_data) = NULL;
3981 err = snd_config_search_definition(root, "hook_func", str, &func_conf);
4040 err = func(root, config, &nroot, private_data);
4045 err = snd_config_substitute(root, nroot);
4110 static int config_file_open(snd_config_t *root, const char *filename)
4117 err = snd_config_load(root, in);
4127 static int config_file_load(snd_config_t *root, const char *fn, int errors)
4140 return config_file_open(root, fn);
4159 err = config_file_open(root, filename);
4171 static int config_file_load_user(snd_config_t *root, const char *fn, int errors)
4178 return config_file_load(root, fn, errors);
4179 err = config_file_load(root, fn2, errors);
4186 snd_config_t *file = _file, *root = _root, *n;
4195 if ((err = snd_config_search(_file, "root", &root)) >= 0) {
4196 err = snd_config_get_ascii(root, &rname);
4198 SNDERR("Field root is bad");
4201 err = snd_config_make_compound(&root, rname, 0);
4215 err = config_file_load_user(root, name2, errors);
4226 if (root != _root) {
4228 if (snd_config_get_type(root) == SND_CONFIG_TYPE_COMPOUND) {
4229 if (snd_config_is_empty(root))
4235 err = snd_config_substitute(n, root);
4240 snd_config_delete(root);
4250 * \param[in] root Handle to the root configuration node.
4260 int snd_config_hook_load(snd_config_t *root, snd_config_t *config, snd_config_t **dst, snd_config_t *private_data)
4266 assert(root && dst);
4278 if ((err = snd_config_expand(n, root, NULL, private_data, &n)) < 0) {
4299 err = config_file_load_user_all(root, n, errors);
4352 static int _snd_config_hook_table(snd_config_t *root, snd_config_t *config, snd_config_t *private_data)
4360 if ((err = snd_config_expand(n, root, NULL, private_data, &n)) < 0) {
4383 if ((err = snd_config_add(root, tn)) < 0) {
4393 * \param[in] root Handle to the root configuration node.
4405 int snd_config_hook_load_for_all_cards(snd_config_t *root, snd_config_t *config, snd_config_t **dst, snd_config_t *private_data ATTRIBUTE_UNUSED)
4425 if (snd_config_search(root, fdriver, &n) >= 0) {
4439 if (snd_config_search(root, driver, &n) >= 0)
4463 err = _snd_config_hook_table(root, config, private_data);
4467 err = snd_config_hook_load(root, config, &n, private_data);
4881 snd_config_t *root,
4889 snd_config_t *root,
4900 err = callback(src, root, dst, SND_CONFIG_WALK_PASS_PRE, fcn, private_data);
4907 err = snd_config_walk(s, root, (dst && *dst) ? &d : NULL,
4917 err = callback(src, root, dst, SND_CONFIG_WALK_PASS_POST, fcn, private_data);
4925 err = callback(src, root, dst, SND_CONFIG_WALK_PASS_LEAF, fcn, private_data);
4932 snd_config_t *root ATTRIBUTE_UNUSED,
5031 snd_config_t *root ATTRIBUTE_UNUSED,
5116 snd_config_t *root,
5127 int (*func)(snd_config_t **dst, snd_config_t *root,
5140 err = snd_config_search_definition(root, "func", str, &func_conf);
5202 err = func(&eval, root, src, private_data);
5221 * \param[in] root Handle to the root of the source configuration.
5229 int snd_config_evaluate(snd_config_t *config, snd_config_t *root,
5234 return snd_config_walk(config, root, result, _snd_config_evaluate, NULL, private_data);
5637 * \param[in] root Handle to the root configuration node.
5653 int snd_config_expand_custom(snd_config_t *config, snd_config_t *root,
5660 err = snd_config_walk(config, root, &res, _snd_config_expand, fcn, private_data);
5672 * \param[in] root Handle to the root configuration node.
5686 int snd_config_expand(snd_config_t *config, snd_config_t *root, const char *args,
5714 err = snd_config_evaluate(subs, root, private_data, NULL);
5719 err = snd_config_walk(config, root, &res, _snd_config_expand, _snd_config_expand_vars, subs);
5725 err = snd_config_evaluate(res, root, private_data, NULL);
5786 * and the key starts from root given by the 'config' parameter