mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
Encapsulated hwdep. Converted all enums to type safety
This commit is contained in:
parent
a83b209df2
commit
5bf23ae9a1
32 changed files with 510 additions and 268 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue