Renamed ERR to SNDERR. Added s16 pseudo meter scope. Fixed plug hw_refine/params

This commit is contained in:
Abramo Bagnara 2001-03-04 20:39:02 +00:00
parent 84732560a9
commit bbaeb29a74
26 changed files with 503 additions and 313 deletions

View file

@ -90,7 +90,7 @@ static int snd_pcm_shm_action(snd_pcm_t *pcm)
if (err != 1)
return -EBADFD;
if (ctrl->cmd) {
ERR("Server has not done the cmd");
SNDERR("Server has not done the cmd");
return -EBADFD;
}
return ctrl->result;
@ -109,7 +109,7 @@ static int snd_pcm_shm_action_fd(snd_pcm_t *pcm, int *fd)
if (err != 1)
return -EBADFD;
if (ctrl->cmd) {
ERR("Server has not done the cmd");
SNDERR("Server has not done the cmd");
return -EBADFD;
}
return ctrl->result;
@ -580,7 +580,7 @@ int snd_pcm_shm_open(snd_pcm_t **pcmp, const char *name, const char *socket, con
result = make_local_socket(socket);
if (result < 0) {
ERR("server for socket %s is not running", socket);
SNDERR("server for socket %s is not running", socket);
goto _err;
}
sock = result;
@ -600,7 +600,7 @@ int snd_pcm_shm_open(snd_pcm_t **pcmp, const char *name, const char *socket, con
goto _err;
}
if ((size_t) err != reqlen) {
ERR("write size error");
SNDERR("write size error");
result = -EINVAL;
goto _err;
}
@ -611,7 +611,7 @@ int snd_pcm_shm_open(snd_pcm_t **pcmp, const char *name, const char *socket, con
goto _err;
}
if (err != sizeof(ans)) {
ERR("read size error");
SNDERR("read size error");
result = -EINVAL;
goto _err;
}
@ -739,7 +739,7 @@ int _snd_pcm_shm_open(snd_pcm_t **pcmp, const char *name, snd_config_t *conf,
if (strcmp(id, "server") == 0) {
err = snd_config_get_string(n, &server);
if (err < 0) {
ERR("Invalid type for %s", id);
SNDERR("Invalid type for %s", id);
return -EINVAL;
}
continue;
@ -747,25 +747,25 @@ int _snd_pcm_shm_open(snd_pcm_t **pcmp, const char *name, snd_config_t *conf,
if (strcmp(id, "sname") == 0) {
err = snd_config_get_string(n, &sname);
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 (!sname) {
ERR("sname is not defined");
SNDERR("sname is not defined");
return -EINVAL;
}
if (!server) {
ERR("server is not defined");
SNDERR("server is not defined");
return -EINVAL;
}
err = snd_config_searchv(snd_config, &sconfig, "server", server, 0);
if (err < 0) {
ERR("Unknown server %s", server);
SNDERR("Unknown server %s", server);
return -EINVAL;
}
snd_config_for_each(i, next, sconfig) {
@ -776,7 +776,7 @@ int _snd_pcm_shm_open(snd_pcm_t **pcmp, const char *name, snd_config_t *conf,
if (strcmp(id, "host") == 0) {
err = snd_config_get_string(n, &host);
if (err < 0) {
ERR("Invalid type for %s", id);
SNDERR("Invalid type for %s", id);
return -EINVAL;
}
continue;
@ -784,7 +784,7 @@ int _snd_pcm_shm_open(snd_pcm_t **pcmp, const char *name, snd_config_t *conf,
if (strcmp(id, "socket") == 0) {
err = snd_config_get_string(n, &socket);
if (err < 0) {
ERR("Invalid type for %s", id);
SNDERR("Invalid type for %s", id);
return -EINVAL;
}
continue;
@ -792,31 +792,31 @@ int _snd_pcm_shm_open(snd_pcm_t **pcmp, const char *name, snd_config_t *conf,
if (strcmp(id, "port") == 0) {
err = snd_config_get_integer(n, &port);
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 (!host) {
ERR("host is not defined");
SNDERR("host is not defined");
return -EINVAL;
}
if (!socket) {
ERR("socket is not defined");
SNDERR("socket is not defined");
return -EINVAL;
}
h = gethostbyname(host);
if (!h) {
ERR("Cannot resolve %s", host);
SNDERR("Cannot resolve %s", host);
return -EINVAL;
}
local = is_local(h);
if (!local) {
ERR("%s is not the local host", host);
SNDERR("%s is not the local host", host);
return -EINVAL;
}
return snd_pcm_shm_open(pcmp, name, socket, sname, stream, mode);