mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
Renamed ERR to SNDERR. Added s16 pseudo meter scope. Fixed plug hw_refine/params
This commit is contained in:
parent
84732560a9
commit
bbaeb29a74
26 changed files with 503 additions and 313 deletions
|
|
@ -620,26 +620,26 @@ int snd_pcm_open(snd_pcm_t **pcmp, const char *name,
|
|||
}
|
||||
if (strcmp(name, "null") == 0)
|
||||
return snd_pcm_null_open(pcmp, name, stream, mode);
|
||||
ERR("Unknown PCM %s", name);
|
||||
SNDERR("Unknown PCM %s", name);
|
||||
return -ENOENT;
|
||||
}
|
||||
if (snd_config_get_type(pcm_conf) != SND_CONFIG_TYPE_COMPOUND) {
|
||||
ERR("Invalid type for PCM %s definition", name);
|
||||
SNDERR("Invalid type for PCM %s definition", name);
|
||||
return -EINVAL;
|
||||
}
|
||||
err = snd_config_search(pcm_conf, "type", &conf);
|
||||
if (err < 0) {
|
||||
ERR("type is not defined");
|
||||
SNDERR("type is not defined");
|
||||
return err;
|
||||
}
|
||||
err = snd_config_get_string(conf, &str);
|
||||
if (err < 0) {
|
||||
ERR("Invalid type for %s", snd_config_get_id(conf));
|
||||
SNDERR("Invalid type for %s", snd_config_get_id(conf));
|
||||
return err;
|
||||
}
|
||||
err = snd_config_searchv(snd_config, &type_conf, "pcmtype", str, 0);
|
||||
if (err < 0) {
|
||||
ERR("Unknown PCM type %s", str);
|
||||
SNDERR("Unknown PCM type %s", str);
|
||||
return err;
|
||||
}
|
||||
snd_config_for_each(i, next, type_conf) {
|
||||
|
|
@ -650,7 +650,7 @@ int snd_pcm_open(snd_pcm_t **pcmp, const char *name,
|
|||
if (strcmp(id, "lib") == 0) {
|
||||
err = snd_config_get_string(n, &lib);
|
||||
if (err < 0) {
|
||||
ERR("Invalid type for %s", id);
|
||||
SNDERR("Invalid type for %s", id);
|
||||
return -EINVAL;
|
||||
}
|
||||
continue;
|
||||
|
|
@ -658,29 +658,29 @@ int snd_pcm_open(snd_pcm_t **pcmp, const char *name,
|
|||
if (strcmp(id, "open") == 0) {
|
||||
err = snd_config_get_string(n, &open);
|
||||
if (err < 0) {
|
||||
ERR("Invalid type for %s", id);
|
||||
SNDERR("Invalid type for %s", id);
|
||||
return -EINVAL;
|
||||
}
|
||||
continue;
|
||||
ERR("Unknown field %s", id);
|
||||
SNDERR("Unknown field %s", id);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
if (!open) {
|
||||
ERR("open is not defined");
|
||||
SNDERR("open is not defined");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!lib)
|
||||
lib = "libasound.so";
|
||||
h = dlopen(lib, RTLD_NOW);
|
||||
if (!h) {
|
||||
ERR("Cannot open shared library %s", lib);
|
||||
SNDERR("Cannot open shared library %s", lib);
|
||||
return -ENOENT;
|
||||
}
|
||||
open_func = dlsym(h, open);
|
||||
dlclose(h);
|
||||
if (!open_func) {
|
||||
ERR("symbol %s is not defined inside %s", open, lib);
|
||||
SNDERR("symbol %s is not defined inside %s", open, lib);
|
||||
return -ENXIO;
|
||||
}
|
||||
return open_func(pcmp, name, pcm_conf, stream, mode);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue