Update of /cvsroot/alsa/alsa-driver/acore
In directory sc8-pr-cvs1:/tmp/cvs-serv14247

Modified Files:
        pcm_native.patch 
Log Message:
patched against get_page() fix

Index: pcm_native.patch
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/acore/pcm_native.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- pcm_native.patch    30 May 2003 13:16:08 -0000      1.1
+++ pcm_native.patch    31 Aug 2003 19:47:26 -0000      1.2
@@ -1,11 +1,11 @@
---- pcm_native.c       2003-05-30 14:57:55.000000000 +0200
-+++ pcm_native.c       2003-05-30 15:00:01.000000000 +0200
+--- pcm_native.c.old   2003-08-31 21:45:25.000000000 +0200
++++ pcm_native.c       2003-08-31 21:44:55.000000000 +0200
 @@ -1,3 +1,4 @@
 +#define __NO_VERSION__
  /*
   *  Digital Audio (PCM) abstract layer
   *  Copyright (c) by Jaroslav Kysela <[EMAIL PROTECTED]>
-@@ -2602,6 +2603,9 @@
+@@ -2608,6 +2609,9 @@
        snd_pcm_runtime_t *runtime;
        snd_pcm_sframes_t result;
  
@@ -15,7 +15,7 @@
        pcm_file = snd_magic_cast(snd_pcm_file_t, file->private_data, result = -ENXIO; 
goto end);
        substream = pcm_file->substream;
        snd_assert(substream != NULL, result = -ENXIO; goto end);
-@@ -2619,9 +2623,13 @@
+@@ -2625,9 +2629,13 @@
        if (result > 0)
                result = frames_to_bytes(runtime, result);
   end:
@@ -29,7 +29,7 @@
  static ssize_t snd_pcm_readv(struct file *file, const struct iovec *_vector,
                             unsigned long count, loff_t * offset)
  
-@@ -2668,6 +2676,9 @@
+@@ -2674,6 +2682,9 @@
        void **bufs;
        snd_pcm_uframes_t frames;
  
@@ -39,7 +39,7 @@
        pcm_file = snd_magic_cast(snd_pcm_file_t, file->private_data, result = -ENXIO; 
goto end);
        substream = pcm_file->substream;
        snd_assert(substream != NULL, result = -ENXIO; goto end);
-@@ -2692,8 +2703,12 @@
+@@ -2698,8 +2709,12 @@
                result = frames_to_bytes(runtime, result);
        kfree(bufs);
   end:
@@ -52,7 +52,7 @@
  
  unsigned int snd_pcm_playback_poll(struct file *file, poll_table * wait)
  {
-@@ -2775,7 +2790,22 @@
+@@ -2781,7 +2796,22 @@
        return mask;
  }
  
@@ -75,10 +75,10 @@
  {
        snd_pcm_substream_t *substream = (snd_pcm_substream_t *)area->vm_private_data;
        snd_pcm_runtime_t *runtime;
-@@ -2786,12 +2816,19 @@
-       runtime = substream->runtime;
+@@ -2793,12 +2823,19 @@
        page = virt_to_page(runtime->status);
-       get_page(page);
+       if (!PageReserved(page))
+               get_page(page);
 +#ifndef LINUX_2_2
        return page;
 +#else
@@ -95,7 +95,7 @@
  };
  
  int snd_pcm_mmap_status(snd_pcm_substream_t *substream, struct file *file,
-@@ -2807,12 +2844,22 @@
+@@ -2814,12 +2851,22 @@
        if (size != PAGE_ALIGN(sizeof(snd_pcm_mmap_status_t)))
                return -EINVAL;
        area->vm_ops = &snd_pcm_vm_ops_status;
@@ -118,10 +118,10 @@
  {
        snd_pcm_substream_t *substream = (snd_pcm_substream_t *)area->vm_private_data;
        snd_pcm_runtime_t *runtime;
-@@ -2823,12 +2870,19 @@
-       runtime = substream->runtime;
+@@ -2831,12 +2878,19 @@
        page = virt_to_page(runtime->control);
-       get_page(page);
+       if (!PageReserved(page))
+               get_page(page);
 +#ifndef LINUX_2_2
        return page;
 +#else
@@ -138,7 +138,7 @@
  };
  
  static int snd_pcm_mmap_control(snd_pcm_substream_t *substream, struct file *file,
-@@ -2844,8 +2898,14 @@
+@@ -2852,8 +2906,14 @@
        if (size != PAGE_ALIGN(sizeof(snd_pcm_mmap_control_t)))
                return -EINVAL;
        area->vm_ops = &snd_pcm_vm_ops_control;
@@ -153,7 +153,7 @@
        return 0;
  }
  
-@@ -2861,7 +2921,11 @@
+@@ -2869,7 +2929,11 @@
        atomic_dec(&substream->runtime->mmap_count);
  }
  
@@ -165,7 +165,7 @@
  {
        snd_pcm_substream_t *substream = (snd_pcm_substream_t *)area->vm_private_data;
        snd_pcm_runtime_t *runtime;
-@@ -2873,7 +2937,11 @@
+@@ -2881,7 +2945,11 @@
        if (substream == NULL)
                return NOPAGE_OOM;
        runtime = substream->runtime;
@@ -177,10 +177,10 @@
        offset += address - area->vm_start;
        snd_assert((offset % PAGE_SIZE) == 0, return NOPAGE_OOM);
        dma_bytes = PAGE_ALIGN(runtime->dma_bytes);
-@@ -2888,7 +2956,11 @@
-               page = virt_to_page(vaddr);
+@@ -2897,7 +2965,11 @@
        }
-       get_page(page);
+       if (!PageReserved(page))
+               get_page(page);
 +#ifndef LINUX_2_2
        return page;
 +#else
@@ -189,7 +189,7 @@
  }
  
  static struct vm_operations_struct snd_pcm_vm_ops_data =
-@@ -2896,6 +2968,9 @@
+@@ -2905,6 +2977,9 @@
        .open =         snd_pcm_mmap_data_open,
        .close =        snd_pcm_mmap_data_close,
        .nopage =       snd_pcm_mmap_data_nopage,
@@ -199,7 +199,7 @@
  };
  
  int snd_pcm_mmap_data(snd_pcm_substream_t *substream, struct file *file,
-@@ -2923,7 +2998,11 @@
+@@ -2932,7 +3007,11 @@
            runtime->access == SNDRV_PCM_ACCESS_RW_NONINTERLEAVED)
                return -EINVAL;
        size = area->vm_end - area->vm_start;
@@ -211,7 +211,7 @@
        dma_bytes = PAGE_ALIGN(runtime->dma_bytes);
        if ((size_t)size > dma_bytes)
                return -EINVAL;
-@@ -2931,8 +3010,14 @@
+@@ -2940,8 +3019,14 @@
                return -EINVAL;
  
        area->vm_ops = &snd_pcm_vm_ops_data;
@@ -226,7 +226,7 @@
        atomic_inc(&runtime->mmap_count);
        return 0;
  }
-@@ -2947,7 +3032,11 @@
+@@ -2956,7 +3041,11 @@
        substream = pcm_file->substream;
        snd_assert(substream != NULL, return -ENXIO);
  
@@ -238,7 +238,7 @@
        switch (offset) {
        case SNDRV_PCM_MMAP_OFFSET_STATUS:
                return snd_pcm_mmap_status(substream, file, area);
-@@ -3055,9 +3144,13 @@
+@@ -3064,9 +3153,13 @@
   */
  
  static struct file_operations snd_pcm_f_ops_playback = {
@@ -252,7 +252,7 @@
        .open =         snd_pcm_open,
        .release =      snd_pcm_release,
        .poll =         snd_pcm_playback_poll,
-@@ -3067,9 +3160,13 @@
+@@ -3076,9 +3169,13 @@
  };
  
  static struct file_operations snd_pcm_f_ops_capture = {



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to