ucm: replace uc_error with snd_error calls

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2025-11-07 15:46:16 +01:00
parent 11235095bf
commit 9ab488b86c
9 changed files with 319 additions and 296 deletions

View file

@ -50,25 +50,25 @@ static int include_eval_one(snd_use_case_mgr_t *uc_mgr,
*result = NULL;
if (snd_config_get_type(inc) != SND_CONFIG_TYPE_COMPOUND) {
uc_error("compound type expected for Include.1");
snd_error(UCM, "compound type expected for Include.1");
return -EINVAL;
}
err = get_string(inc, "File", &file);
if (err < 0) {
uc_error("file expected (Include)");
snd_error(UCM, "file expected (Include)");
return -EINVAL;
}
err = snd_config_search(inc, "Before", before);
if (err < 0 && err != -ENOENT) {
uc_error("before block identifier error");
snd_error(UCM, "before block identifier error");
return -EINVAL;
}
err = snd_config_search(inc, "After", after);
if (err < 0 && err != -ENOENT) {
uc_error("before block identifier error");
snd_error(UCM, "before block identifier error");
return -EINVAL;
}
@ -144,7 +144,7 @@ static int compound_merge(snd_use_case_mgr_t *uc_mgr, const char *id,
int err, array, idx;
if (snd_config_get_type(src) != SND_CONFIG_TYPE_COMPOUND) {
uc_error("compound type expected for the merged block");
snd_error(UCM, "compound type expected for the merged block");
return -EINVAL;
}
@ -164,17 +164,17 @@ static int compound_merge(snd_use_case_mgr_t *uc_mgr, const char *id,
return snd_config_merge(dst, src, 0); /* merge / append mode */
if (_before && _after) {
uc_error("defined both before and after identifiers in the If or Include block");
snd_error(UCM, "defined both before and after identifiers in the If or Include block");
return -EINVAL;
}
array = snd_config_is_array(dst);
if (array < 0) {
uc_error("destination configuration node is not a compound");
snd_error(UCM, "destination configuration node is not a compound");
return array;
}
if (array && snd_config_is_array(src) <= 0) {
uc_error("source configuration node is not an array");
snd_error(UCM, "source configuration node is not an array");
return -EINVAL;
}
@ -287,12 +287,12 @@ int uc_mgr_evaluate_include(snd_use_case_mgr_t *uc_mgr,
int err;
if (uc_mgr->conf_format < 3) {
uc_error("in-place include is supported in v3+ syntax");
snd_error(UCM, "in-place include is supported in v3+ syntax");
return -EINVAL;
}
if (snd_config_get_type(inc) != SND_CONFIG_TYPE_COMPOUND) {
uc_error("compound type expected for Include");
snd_error(UCM, "compound type expected for Include");
return -EINVAL;
}