mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-11 13:30:05 -05:00
Splitted rawmidi streams. Removed stream constraint on config files
This commit is contained in:
parent
3e091c8822
commit
66f13f6115
21 changed files with 142 additions and 233 deletions
|
|
@ -595,25 +595,6 @@ int snd_pcm_open(snd_pcm_t **pcmp, const char *name,
|
|||
ERR("Invalid type for PCM %s definition", name);
|
||||
return -EINVAL;
|
||||
}
|
||||
err = snd_config_search(pcm_conf, "stream", &conf);
|
||||
if (err >= 0) {
|
||||
const char *id = snd_config_get_id(conf);
|
||||
err = snd_config_get_string(conf, &str);
|
||||
if (err < 0) {
|
||||
ERR("Invalid type for %s", id);
|
||||
return err;
|
||||
}
|
||||
if (strcmp(str, "playback") == 0) {
|
||||
if (stream != SND_PCM_STREAM_PLAYBACK)
|
||||
return -EINVAL;
|
||||
} else if (strcmp(str, "capture") == 0) {
|
||||
if (stream != SND_PCM_STREAM_CAPTURE)
|
||||
return -EINVAL;
|
||||
} else {
|
||||
ERR("Invalid value for %s", id);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
err = snd_config_search(pcm_conf, "type", &conf);
|
||||
if (err < 0) {
|
||||
ERR("type is not defined");
|
||||
|
|
|
|||
|
|
@ -608,8 +608,6 @@ int _snd_pcm_adpcm_open(snd_pcm_t **pcmp, char *name,
|
|||
continue;
|
||||
if (strcmp(id, "type") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "stream") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "sname") == 0) {
|
||||
err = snd_config_get_string(n, &sname);
|
||||
if (err < 0) {
|
||||
|
|
|
|||
|
|
@ -481,8 +481,6 @@ int _snd_pcm_alaw_open(snd_pcm_t **pcmp, char *name,
|
|||
continue;
|
||||
if (strcmp(id, "type") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "stream") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "sname") == 0) {
|
||||
err = snd_config_get_string(n, &sname);
|
||||
if (err < 0) {
|
||||
|
|
|
|||
|
|
@ -238,8 +238,6 @@ int _snd_pcm_copy_open(snd_pcm_t **pcmp, char *name,
|
|||
continue;
|
||||
if (strcmp(id, "type") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "stream") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "sname") == 0) {
|
||||
err = snd_config_get_string(n, &sname);
|
||||
if (err < 0) {
|
||||
|
|
|
|||
|
|
@ -477,8 +477,6 @@ int _snd_pcm_file_open(snd_pcm_t **pcmp, char *name,
|
|||
continue;
|
||||
if (strcmp(id, "type") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "stream") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "sname") == 0) {
|
||||
err = snd_config_get_string(n, &sname);
|
||||
if (err < 0) {
|
||||
|
|
|
|||
|
|
@ -687,8 +687,6 @@ int _snd_pcm_hw_open(snd_pcm_t **pcmp, char *name, snd_config_t *conf,
|
|||
continue;
|
||||
if (strcmp(id, "type") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "stream") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "card") == 0) {
|
||||
err = snd_config_get_integer(n, &card);
|
||||
if (err < 0) {
|
||||
|
|
|
|||
|
|
@ -379,8 +379,6 @@ int _snd_pcm_linear_open(snd_pcm_t **pcmp, char *name,
|
|||
continue;
|
||||
if (strcmp(id, "type") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "stream") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "sname") == 0) {
|
||||
err = snd_config_get_string(n, &sname);
|
||||
if (err < 0) {
|
||||
|
|
|
|||
|
|
@ -496,8 +496,6 @@ int _snd_pcm_mulaw_open(snd_pcm_t **pcmp, char *name,
|
|||
continue;
|
||||
if (strcmp(id, "type") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "stream") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "sname") == 0) {
|
||||
err = snd_config_get_string(n, &sname);
|
||||
if (err < 0) {
|
||||
|
|
|
|||
|
|
@ -603,8 +603,6 @@ int _snd_pcm_multi_open(snd_pcm_t **pcmp, char *name, snd_config_t *conf,
|
|||
continue;
|
||||
if (strcmp(id, "type") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "stream") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "slave") == 0) {
|
||||
if (snd_config_get_type(n) != SND_CONFIG_TYPE_COMPOUND) {
|
||||
ERR("Invalid type for %s", id);
|
||||
|
|
|
|||
|
|
@ -382,8 +382,6 @@ int _snd_pcm_null_open(snd_pcm_t **pcmp, char *name,
|
|||
continue;
|
||||
if (strcmp(id, "type") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "stream") == 0)
|
||||
continue;
|
||||
ERR("Unknown field %s", id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -718,8 +718,6 @@ int _snd_pcm_plug_open(snd_pcm_t **pcmp, const char *name,
|
|||
continue;
|
||||
if (strcmp(id, "type") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "stream") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "sname") == 0) {
|
||||
err = snd_config_get_string(n, &sname);
|
||||
if (err < 0) {
|
||||
|
|
|
|||
|
|
@ -634,8 +634,6 @@ int _snd_pcm_rate_open(snd_pcm_t **pcmp, char *name,
|
|||
continue;
|
||||
if (strcmp(id, "type") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "stream") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "sname") == 0) {
|
||||
err = snd_config_get_string(n, &sname);
|
||||
if (err < 0) {
|
||||
|
|
|
|||
|
|
@ -899,8 +899,6 @@ int _snd_pcm_route_open(snd_pcm_t **pcmp, char *name,
|
|||
continue;
|
||||
if (strcmp(id, "type") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "stream") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "sname") == 0) {
|
||||
err = snd_config_get_string(n, &sname);
|
||||
if (err < 0) {
|
||||
|
|
|
|||
|
|
@ -1380,8 +1380,6 @@ int _snd_pcm_share_open(snd_pcm_t **pcmp, char *name, snd_config_t *conf,
|
|||
continue;
|
||||
if (strcmp(id, "type") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "stream") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "sname") == 0) {
|
||||
err = snd_config_get_string(n, &sname);
|
||||
if (err < 0) {
|
||||
|
|
|
|||
|
|
@ -736,8 +736,6 @@ int _snd_pcm_shm_open(snd_pcm_t **pcmp, char *name, snd_config_t *conf,
|
|||
continue;
|
||||
if (strcmp(id, "type") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "stream") == 0)
|
||||
continue;
|
||||
if (strcmp(id, "server") == 0) {
|
||||
err = snd_config_get_string(n, &server);
|
||||
if (err < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue