]> git.alsa-project.org Git - alsa-lib.git/commitdiff
The format condition was wrong (dmix<->dsnoop)
authorJaroslav Kysela <perex@perex.cz>
Tue, 3 Feb 2004 14:44:48 +0000 (14:44 +0000)
committerJaroslav Kysela <perex@perex.cz>
Tue, 3 Feb 2004 14:44:48 +0000 (14:44 +0000)
src/pcm/pcm_dmix.c
src/pcm/pcm_dsnoop.c

index 8473d9c01356e9618033c6c2825cfa3de670cae1..ea810063440085c6eb88693944af0b2aefae920d 100644 (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;
 
index 0789667691e88914b3d614a3ac1bd7d962789297..63d3169e3ee81205761b08bc76a7f35091462ba9 100644 (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);