]> git.alsa-project.org Git - alsa-lib.git/commitdiff
mmap data in r/w mode
authorAbramo Bagnara <abramo@alsa-project.org>
Tue, 12 Sep 2000 12:38:40 +0000 (12:38 +0000)
committerAbramo Bagnara <abramo@alsa-project.org>
Tue, 12 Sep 2000 12:38:40 +0000 (12:38 +0000)
src/pcm/pcm_hw.c

index fa229af73af682b26fe0aaafe119a4fcd2452c48..01d9429131e17c1601c7e383deddf53d8b686ac9 100644 (file)
@@ -319,7 +319,11 @@ static int snd_pcm_hw_mmap_data(snd_pcm_t *pcm, void **buffer, size_t bsize)
        snd_pcm_hw_t *hw = pcm->private;
        void *ptr;
        int prot;
+#if 0
        prot = pcm->stream == SND_PCM_STREAM_PLAYBACK ? PROT_WRITE : PROT_READ;
+#else
+       prot = PROT_WRITE | PROT_READ;
+#endif
        ptr = mmap(NULL, bsize, prot, MAP_FILE|MAP_SHARED, 
                     hw->fd, SND_PCM_MMAP_OFFSET_DATA);
        if (ptr == MAP_FAILED || ptr == NULL)