mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-12-21 08:56:52 -05:00
The format condition was wrong (dmix<->dsnoop)
This commit is contained in:
parent
62ad89e954
commit
a6ad2629e3
2 changed files with 8 additions and 8 deletions
|
|
@ -1215,6 +1215,14 @@ int _snd_pcm_dmix_open(snd_pcm_t **pcmp, const char *name,
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
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.period_size = psize;
|
||||||
params.buffer_size = bsize;
|
params.buffer_size = bsize;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -837,14 +837,6 @@ int _snd_pcm_dsnoop_open(snd_pcm_t **pcmp, const char *name,
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
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.period_size = psize;
|
||||||
params.buffer_size = bsize;
|
params.buffer_size = bsize;
|
||||||
err = snd_pcm_dsnoop_open(pcmp, name, ipc_key, ipc_perm, ¶ms, bindings, slowptr, root, sconf, stream, mode);
|
err = snd_pcm_dsnoop_open(pcmp, name, ipc_key, ipc_perm, ¶ms, bindings, slowptr, root, sconf, stream, mode);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue