diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-06-06 17:05:56 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-06-06 17:05:56 +0200 |
commit | 2db108cc7201dc0421e3c50d81684ea05d04df30 (patch) | |
tree | b370d24509dbeeacd6bb9dc8681c5ca6a159b07e | |
parent | b6af5e182292f30cd001eeded65d56f4de4c9a9f (diff) |
pcm_mmap_emul: Fix invalid check
The check in snd_pcm_mmap_emul_refine() is bogus and buggy.
Since the changed access type is took back at snd_pcm_mmap_emul_refine
again, it has to check the availability of mmap at each time.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | src/pcm/pcm_mmap_emul.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/pcm/pcm_mmap_emul.c b/src/pcm/pcm_mmap_emul.c index 896e6326..30949255 100644 --- a/src/pcm/pcm_mmap_emul.c +++ b/src/pcm/pcm_mmap_emul.c @@ -62,11 +62,9 @@ static int snd_pcm_mmap_emul_hw_refine(snd_pcm_t *pcm, snd_mask_none(&mask); err = snd_pcm_hw_refine(map->gen.slave, params); if (err < 0) { - /* try to use RW_* */ snd_pcm_hw_params_t new = *params; - if (!(params->rmask & (1<<SND_PCM_HW_PARAM_ACCESS))) - return err; + /* try to use RW_* */ if (snd_pcm_access_mask_test(&oldmask, SND_PCM_ACCESS_MMAP_INTERLEAVED) && !snd_pcm_access_mask_test(&oldmask, |