The format condition was wrong (dmix<->dsnoop)

This commit is contained in:
Jaroslav Kysela 2004-02-03 14:44:48 +00:00
parent 62ad89e954
commit a6ad2629e3
2 changed files with 8 additions and 8 deletions

View file

@ -1215,6 +1215,14 @@ int _snd_pcm_dmix_open(snd_pcm_t **pcmp, const char *name,
if (err < 0)
return err;
/* sorry, limited features */
if (params.format != SND_PCM_FORMAT_S16 &&
params.format != SND_PCM_FORMAT_S32) {
SNDERR("invalid format, specify s16 or s32");
snd_config_delete(sconf);
return -EINVAL;
}
params.period_size = psize;
params.buffer_size = bsize;

View file

@ -837,14 +837,6 @@ int _snd_pcm_dsnoop_open(snd_pcm_t **pcmp, const char *name,
if (err < 0)
return err;
/* sorry, limited features */
if (params.format != SND_PCM_FORMAT_S16 &&
params.format != SND_PCM_FORMAT_S32) {
SNDERR("invalid format, specify s16 or s32");
snd_config_delete(sconf);
return -EINVAL;
}
params.period_size = psize;
params.buffer_size = bsize;
err = snd_pcm_dsnoop_open(pcmp, name, ipc_key, ipc_perm, &params, bindings, slowptr, root, sconf, stream, mode);