aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-03-10 09:21:27 +0100
committerTakashi Iwai <tiwai@suse.de>2010-03-10 09:21:27 +0100
commit2e86e71e26549e748bf126f483b2837248368ad4 (patch)
treeb07671d57fc8dabb5e661a3bb7b29496cdb64446
parent63f682cd3ca18967acdb426de8548c050a16c6f3 (diff)
downloadalsa-driver-build-unstable-2e86e71e26549e748bf126f483b2837248368ad4.tar.gz
Refresh pcm_native.patch
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--acore/pcm_native.patch58
1 files changed, 29 insertions, 29 deletions
diff --git a/acore/pcm_native.patch b/acore/pcm_native.patch
index 99191ee36..acef0c95e 100644
--- a/acore/pcm_native.patch
+++ b/acore/pcm_native.patch
@@ -1,5 +1,5 @@
---- ../alsa-kernel/core/pcm_native.c 2009-11-27 11:25:09.000000000 +0100
-+++ pcm_native.c 2009-11-27 11:46:27.000000000 +0100
+--- ../alsa-kernel/core/pcm_native.c 2010-03-10 09:06:46.035772832 +0100
++++ pcm_native.c 2010-03-10 09:13:01.287272310 +0100
@@ -1,3 +1,5 @@
+#define __NO_VERSION__
+#include "adriver.h"
@@ -17,8 +17,8 @@
#include <linux/time.h>
#include <linux/pm_qos_params.h>
#include <linux/uio.h>
-@@ -366,7 +368,10 @@ static int period_to_usecs(struct snd_pc
- return usecs;
+@@ -399,7 +401,10 @@
+ return 0;
}
-static int snd_pcm_hw_params(struct snd_pcm_substream *substream,
@@ -29,7 +29,7 @@
struct snd_pcm_hw_params *params)
{
struct snd_pcm_runtime *runtime;
-@@ -1539,7 +1544,11 @@ static struct file *snd_pcm_file_fd(int
+@@ -1577,7 +1582,11 @@
file = fget(fd);
if (!file)
return NULL;
@@ -41,7 +41,7 @@
if (!S_ISCHR(inode->i_mode) ||
imajor(inode) != snd_major) {
fput(file);
-@@ -2792,25 +2801,50 @@ static ssize_t snd_pcm_write(struct file
+@@ -2830,25 +2839,50 @@
struct snd_pcm_runtime *runtime;
snd_pcm_sframes_t result;
@@ -99,7 +99,7 @@
{
struct snd_pcm_file *pcm_file;
struct snd_pcm_substream *substream;
-@@ -2820,7 +2854,11 @@ static ssize_t snd_pcm_aio_read(struct k
+@@ -2858,7 +2892,11 @@
void __user **bufs;
snd_pcm_uframes_t frames;
@@ -111,7 +111,7 @@
substream = pcm_file->substream;
if (PCM_RUNTIME_CHECK(substream))
return -ENXIO;
-@@ -2844,8 +2882,13 @@ static ssize_t snd_pcm_aio_read(struct k
+@@ -2882,8 +2920,13 @@
return result;
}
@@ -125,7 +125,7 @@
{
struct snd_pcm_file *pcm_file;
struct snd_pcm_substream *substream;
-@@ -2855,7 +2898,11 @@ static ssize_t snd_pcm_aio_write(struct
+@@ -2893,7 +2936,11 @@
void __user **bufs;
snd_pcm_uframes_t frames;
@@ -137,7 +137,7 @@
substream = pcm_file->substream;
if (PCM_RUNTIME_CHECK(substream))
return -ENXIO;
-@@ -2877,6 +2924,7 @@ static ssize_t snd_pcm_aio_write(struct
+@@ -2915,6 +2962,7 @@
kfree(bufs);
return result;
}
@@ -145,7 +145,7 @@
static unsigned int snd_pcm_playback_poll(struct file *file, poll_table * wait)
{
-@@ -2964,6 +3012,22 @@ static unsigned int snd_pcm_capture_poll
+@@ -3002,6 +3050,22 @@
* mmap support
*/
@@ -168,7 +168,7 @@
/*
* Only on coherent architectures, we can mmap the status and the control records
* for effcient data transfer. On others, we have to use HWSYNC ioctl...
-@@ -2972,6 +3036,7 @@ static unsigned int snd_pcm_capture_poll
+@@ -3010,6 +3074,7 @@
/*
* mmap status record
*/
@@ -176,7 +176,7 @@
static int snd_pcm_mmap_status_fault(struct vm_area_struct *area,
struct vm_fault *vmf)
{
-@@ -2985,10 +3050,49 @@ static int snd_pcm_mmap_status_fault(str
+@@ -3023,10 +3088,49 @@
get_page(vmf->page);
return 0;
}
@@ -226,7 +226,7 @@
};
static int snd_pcm_mmap_status(struct snd_pcm_substream *substream, struct file *file,
-@@ -3003,7 +3107,11 @@ static int snd_pcm_mmap_status(struct sn
+@@ -3041,7 +3145,11 @@
if (size != PAGE_ALIGN(sizeof(struct snd_pcm_mmap_status)))
return -EINVAL;
area->vm_ops = &snd_pcm_vm_ops_status;
@@ -238,7 +238,7 @@
area->vm_flags |= VM_RESERVED;
return 0;
}
-@@ -3011,6 +3119,7 @@ static int snd_pcm_mmap_status(struct sn
+@@ -3049,6 +3157,7 @@
/*
* mmap control record
*/
@@ -246,7 +246,7 @@
static int snd_pcm_mmap_control_fault(struct vm_area_struct *area,
struct vm_fault *vmf)
{
-@@ -3024,10 +3133,50 @@ static int snd_pcm_mmap_control_fault(st
+@@ -3062,10 +3171,50 @@
get_page(vmf->page);
return 0;
}
@@ -297,7 +297,7 @@
};
static int snd_pcm_mmap_control(struct snd_pcm_substream *substream, struct file *file,
-@@ -3042,7 +3191,11 @@ static int snd_pcm_mmap_control(struct s
+@@ -3080,7 +3229,11 @@
if (size != PAGE_ALIGN(sizeof(struct snd_pcm_mmap_control)))
return -EINVAL;
area->vm_ops = &snd_pcm_vm_ops_control;
@@ -309,7 +309,7 @@
area->vm_flags |= VM_RESERVED;
return 0;
}
-@@ -3083,9 +3236,16 @@ snd_pcm_default_page_ops(struct snd_pcm_
+@@ -3121,9 +3274,16 @@
return virt_to_page(vaddr);
}
@@ -326,7 +326,7 @@
static int snd_pcm_mmap_data_fault(struct vm_area_struct *area,
struct vm_fault *vmf)
{
-@@ -3112,6 +3272,59 @@ static int snd_pcm_mmap_data_fault(struc
+@@ -3150,6 +3310,59 @@
vmf->page = page;
return 0;
}
@@ -386,7 +386,7 @@
static const struct vm_operations_struct snd_pcm_vm_ops_data = {
.open = snd_pcm_mmap_data_open,
-@@ -3121,7 +3334,14 @@ static const struct vm_operations_struct
+@@ -3159,7 +3372,14 @@
static const struct vm_operations_struct snd_pcm_vm_ops_data_fault = {
.open = snd_pcm_mmap_data_open,
.close = snd_pcm_mmap_data_close,
@@ -401,8 +401,8 @@
};
#ifndef ARCH_HAS_DMA_MMAP_COHERENT
-@@ -3167,11 +3387,26 @@ int snd_pcm_lib_mmap_iomem(struct snd_pc
- #endif
+@@ -3203,11 +3423,26 @@
+ area->vm_page_prot = pgprot_noncached(area->vm_page_prot);
area->vm_flags |= VM_IO;
size = area->vm_end - area->vm_start;
- offset = area->vm_pgoff << PAGE_SHIFT;
@@ -429,7 +429,7 @@
return 0;
}
-@@ -3206,7 +3441,7 @@ int snd_pcm_mmap_data(struct snd_pcm_sub
+@@ -3251,7 +3486,7 @@
runtime->access == SNDRV_PCM_ACCESS_RW_NONINTERLEAVED)
return -EINVAL;
size = area->vm_end - area->vm_start;
@@ -438,7 +438,7 @@
dma_bytes = PAGE_ALIGN(runtime->dma_bytes);
if ((size_t)size > dma_bytes)
return -EINVAL;
-@@ -3214,7 +3449,11 @@ int snd_pcm_mmap_data(struct snd_pcm_sub
+@@ -3259,7 +3494,11 @@
return -EINVAL;
area->vm_ops = &snd_pcm_vm_ops_data;
@@ -450,7 +450,7 @@
if (substream->ops->mmap)
err = substream->ops->mmap(substream, area);
else
-@@ -3237,7 +3476,7 @@ static int snd_pcm_mmap(struct file *fil
+@@ -3282,7 +3521,7 @@
if (PCM_RUNTIME_CHECK(substream))
return -ENXIO;
@@ -459,7 +459,7 @@
switch (offset) {
case SNDRV_PCM_MMAP_OFFSET_STATUS:
if (pcm_file->no_compat_mmap)
-@@ -3275,12 +3514,34 @@ out:
+@@ -3320,12 +3559,34 @@
/*
* ioctl32 compat
*/
@@ -495,7 +495,7 @@
/*
* To be removed helpers to keep binary compatibility
*/
-@@ -3405,29 +3666,53 @@ unsigned long dummy_get_unmapped_area(st
+@@ -3464,29 +3725,53 @@
const struct file_operations snd_pcm_f_ops[2] = {
{
@@ -520,7 +520,7 @@
.mmap = snd_pcm_mmap,
.fasync = snd_pcm_fasync,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
- .get_unmapped_area = dummy_get_unmapped_area,
+ .get_unmapped_area = snd_pcm_get_unmapped_area,
+#endif
},
{
@@ -545,7 +545,7 @@
.mmap = snd_pcm_mmap,
.fasync = snd_pcm_fasync,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
- .get_unmapped_area = dummy_get_unmapped_area,
+ .get_unmapped_area = snd_pcm_get_unmapped_area,
+#endif
}
};