Encapsulated hwdep. Converted all enums to type safety

This commit is contained in:
Abramo Bagnara 2001-02-05 15:44:42 +00:00
parent a83b209df2
commit 5bf23ae9a1
32 changed files with 510 additions and 268 deletions

View file

@ -473,7 +473,7 @@ int _snd_pcm_alaw_open(snd_pcm_t **pcmp, char *name,
char *sname = NULL;
int err;
snd_pcm_t *spcm;
snd_pcm_format_t sformat = SND_PCM_FORMAT_NONE;
snd_pcm_format_t sformat = SND_PCM_FORMAT_UNKNOWN;
snd_config_foreach(i, conf) {
snd_config_t *n = snd_config_entry(i);
if (strcmp(n->id, "comment") == 0)
@ -498,7 +498,7 @@ int _snd_pcm_alaw_open(snd_pcm_t **pcmp, char *name,
return -EINVAL;
}
sformat = snd_pcm_format_value(f);
if (sformat == SND_PCM_FORMAT_NONE) {
if (sformat == SND_PCM_FORMAT_UNKNOWN) {
ERR("Unknown sformat");
return -EINVAL;
}
@ -516,7 +516,7 @@ int _snd_pcm_alaw_open(snd_pcm_t **pcmp, char *name,
ERR("sname is not defined");
return -EINVAL;
}
if (sformat == SND_PCM_FORMAT_NONE) {
if (sformat == SND_PCM_FORMAT_UNKNOWN) {
ERR("sformat is not defined");
return -EINVAL;
}