diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-03-04 12:35:21 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-03-04 17:30:14 +0100 |
commit | 04a3b4d1d426200ba3fb8122a6350ce78ef0ec8a (patch) | |
tree | d8ae16ea4f959da8a7235cf9be764c620d28363a | |
parent | 78183e1bb4c80f89da2b908dbf6a2e496f9c844a (diff) | |
download | alsa-driver-build-unstable-04a3b4d1d426200ba3fb8122a6350ce78ef0ec8a.tar.gz |
More fixes for kABI compatibility with older 2.6 kernels
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | acore/pcm_native.patch | 62 | ||||
-rw-r--r-- | include/sound/control.patch | 42 | ||||
-rw-r--r-- | include/sound/core.patch | 36 | ||||
-rw-r--r-- | include/sound/info.patch | 29 | ||||
-rw-r--r-- | include/sound/pcm.patch | 108 | ||||
-rw-r--r-- | include/sound/pcm_oss.patch | 15 | ||||
-rw-r--r-- | include/sound/rawmidi.patch | 21 |
7 files changed, 258 insertions, 55 deletions
diff --git a/acore/pcm_native.patch b/acore/pcm_native.patch index ac1e17ada..cbcf9ae01 100644 --- a/acore/pcm_native.patch +++ b/acore/pcm_native.patch @@ -1,5 +1,5 @@ ---- ../alsa-kernel/core/pcm_native.c 2010-11-24 06:14:14.945117050 +0100 -+++ pcm_native.c 2010-11-24 06:15:49.184964358 +0100 +--- ../alsa-kernel/core/pcm_native.c 2011-02-14 17:15:57.000000000 +0100 ++++ pcm_native.c 2011-03-04 17:20:54.000000000 +0100 @@ -1,3 +1,5 @@ +#define __NO_VERSION__ +#include "adriver.h" @@ -74,7 +74,19 @@ return result; } -@@ -1554,7 +1588,11 @@ +@@ -941,7 +975,11 @@ + * + * The state of each stream is then changed to the given state unconditionally. + */ ++#if defined(__GENKSYMS__) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 38) ++int snd_pcm_stop(struct snd_pcm_substream *substream, int state) ++#else + int snd_pcm_stop(struct snd_pcm_substream *substream, snd_pcm_state_t state) ++#endif + { + return snd_pcm_action(&snd_pcm_action_stop, substream, state); + } +@@ -1554,7 +1592,11 @@ file = fget(fd); if (!file) return NULL; @@ -86,7 +98,7 @@ if (!S_ISCHR(inode->i_mode) || imajor(inode) != snd_major) { fput(file); -@@ -1996,8 +2034,20 @@ +@@ -1996,8 +2038,20 @@ substream->ops->close(substream); substream->hw_opened = 0; } @@ -107,7 +119,7 @@ if (substream->pcm_release) { substream->pcm_release(substream); substream->pcm_release = NULL; -@@ -2813,25 +2863,50 @@ +@@ -2813,25 +2867,50 @@ struct snd_pcm_runtime *runtime; snd_pcm_sframes_t result; @@ -165,7 +177,7 @@ { struct snd_pcm_file *pcm_file; struct snd_pcm_substream *substream; -@@ -2841,7 +2916,11 @@ +@@ -2841,7 +2920,11 @@ void __user **bufs; snd_pcm_uframes_t frames; @@ -177,7 +189,7 @@ substream = pcm_file->substream; if (PCM_RUNTIME_CHECK(substream)) return -ENXIO; -@@ -2865,8 +2944,13 @@ +@@ -2865,8 +2948,13 @@ return result; } @@ -191,7 +203,7 @@ { struct snd_pcm_file *pcm_file; struct snd_pcm_substream *substream; -@@ -2876,7 +2960,11 @@ +@@ -2876,7 +2964,11 @@ void __user **bufs; snd_pcm_uframes_t frames; @@ -203,7 +215,7 @@ substream = pcm_file->substream; if (PCM_RUNTIME_CHECK(substream)) return -ENXIO; -@@ -2898,6 +2986,7 @@ +@@ -2898,6 +2990,7 @@ kfree(bufs); return result; } @@ -211,7 +223,7 @@ static unsigned int snd_pcm_playback_poll(struct file *file, poll_table * wait) { -@@ -2985,6 +3074,22 @@ +@@ -2985,6 +3078,22 @@ * mmap support */ @@ -234,7 +246,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... -@@ -2993,6 +3098,7 @@ +@@ -2993,6 +3102,7 @@ /* * mmap status record */ @@ -242,7 +254,7 @@ static int snd_pcm_mmap_status_fault(struct vm_area_struct *area, struct vm_fault *vmf) { -@@ -3006,10 +3112,49 @@ +@@ -3006,10 +3116,49 @@ get_page(vmf->page); return 0; } @@ -292,7 +304,7 @@ }; static int snd_pcm_mmap_status(struct snd_pcm_substream *substream, struct file *file, -@@ -3024,7 +3169,11 @@ +@@ -3024,7 +3173,11 @@ if (size != PAGE_ALIGN(sizeof(struct snd_pcm_mmap_status))) return -EINVAL; area->vm_ops = &snd_pcm_vm_ops_status; @@ -304,7 +316,7 @@ area->vm_flags |= VM_RESERVED; return 0; } -@@ -3032,6 +3181,7 @@ +@@ -3032,6 +3185,7 @@ /* * mmap control record */ @@ -312,7 +324,7 @@ static int snd_pcm_mmap_control_fault(struct vm_area_struct *area, struct vm_fault *vmf) { -@@ -3045,10 +3195,50 @@ +@@ -3045,10 +3199,50 @@ get_page(vmf->page); return 0; } @@ -363,7 +375,7 @@ }; static int snd_pcm_mmap_control(struct snd_pcm_substream *substream, struct file *file, -@@ -3063,7 +3253,11 @@ +@@ -3063,7 +3257,11 @@ if (size != PAGE_ALIGN(sizeof(struct snd_pcm_mmap_control))) return -EINVAL; area->vm_ops = &snd_pcm_vm_ops_control; @@ -375,7 +387,7 @@ area->vm_flags |= VM_RESERVED; return 0; } -@@ -3104,9 +3298,16 @@ +@@ -3104,9 +3302,16 @@ return virt_to_page(vaddr); } @@ -392,7 +404,7 @@ static int snd_pcm_mmap_data_fault(struct vm_area_struct *area, struct vm_fault *vmf) { -@@ -3133,6 +3334,59 @@ +@@ -3133,6 +3338,59 @@ vmf->page = page; return 0; } @@ -452,7 +464,7 @@ static const struct vm_operations_struct snd_pcm_vm_ops_data = { .open = snd_pcm_mmap_data_open, -@@ -3142,7 +3396,14 @@ +@@ -3142,7 +3400,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, @@ -467,7 +479,7 @@ }; #ifndef ARCH_HAS_DMA_MMAP_COHERENT -@@ -3190,11 +3451,26 @@ +@@ -3190,11 +3455,26 @@ area->vm_page_prot = pgprot_noncached(area->vm_page_prot); area->vm_flags |= VM_IO; size = area->vm_end - area->vm_start; @@ -495,7 +507,7 @@ return 0; } -@@ -3238,7 +3514,7 @@ +@@ -3238,7 +3518,7 @@ runtime->access == SNDRV_PCM_ACCESS_RW_NONINTERLEAVED) return -EINVAL; size = area->vm_end - area->vm_start; @@ -504,7 +516,7 @@ dma_bytes = PAGE_ALIGN(runtime->dma_bytes); if ((size_t)size > dma_bytes) return -EINVAL; -@@ -3246,7 +3522,11 @@ +@@ -3246,7 +3526,11 @@ return -EINVAL; area->vm_ops = &snd_pcm_vm_ops_data; @@ -516,7 +528,7 @@ if (substream->ops->mmap) err = substream->ops->mmap(substream, area); else -@@ -3269,7 +3549,7 @@ +@@ -3269,7 +3553,7 @@ if (PCM_RUNTIME_CHECK(substream)) return -ENXIO; @@ -525,7 +537,7 @@ switch (offset) { case SNDRV_PCM_MMAP_OFFSET_STATUS: if (pcm_file->no_compat_mmap) -@@ -3302,12 +3582,34 @@ +@@ -3302,12 +3586,34 @@ /* * ioctl32 compat */ @@ -561,7 +573,7 @@ /* * To be removed helpers to keep binary compatibility */ -@@ -3446,31 +3748,55 @@ +@@ -3446,31 +3752,55 @@ const struct file_operations snd_pcm_f_ops[2] = { { diff --git a/include/sound/control.patch b/include/sound/control.patch new file mode 100644 index 000000000..72a2c6419 --- /dev/null +++ b/include/sound/control.patch @@ -0,0 +1,42 @@ +--- ../../alsa-kernel/include/control.h 2011-01-10 16:50:14.000000000 +0100 ++++ control.h 2011-03-04 12:42:43.000000000 +0100 +@@ -56,6 +56,9 @@ + + struct snd_kcontrol_volatile { + struct snd_ctl_file *owner; /* locked */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) ++ pid_t owner_pid; /* just for kABI compatibility */ ++#endif + unsigned int access; /* access rights */ + }; + +@@ -91,7 +94,15 @@ + struct snd_ctl_file { + struct list_head list; /* list of all control files */ + struct snd_card *card; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) ++#ifdef __GENKSYMS__ ++ pid_t pid; ++#else ++ pid_t kabi_compat_pid; /* just for kABI compatibility */ ++#endif ++#else + struct pid *pid; ++#endif + int prefer_pcm_subdevice; + int prefer_rawmidi_subdevice; + wait_queue_head_t change_sleep; +@@ -99,6 +110,13 @@ + struct fasync_struct *fasync; + int subscribed; /* read interface is activated */ + struct list_head events; /* waiting events for read */ ++ ++ /* appended below for ABI compatibility */ ++#ifndef __GENKSYMS__ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) ++ struct pid *pid; ++#endif ++#endif + }; + + #define snd_ctl_file(n) list_entry(n, struct snd_ctl_file, list) diff --git a/include/sound/core.patch b/include/sound/core.patch index 874fb2fc5..293e4428d 100644 --- a/include/sound/core.patch +++ b/include/sound/core.patch @@ -1,11 +1,15 @@ ---- ../../alsa-kernel/include/core.h 2010-11-02 16:17:51.796016548 +0100 -+++ core.h 2010-11-03 09:27:19.656922316 +0100 -@@ -104,8 +104,12 @@ struct snd_card { +--- ../../alsa-kernel/include/core.h 2010-11-02 16:17:51.000000000 +0100 ++++ core.h 2011-03-04 15:42:18.000000000 +0100 +@@ -104,8 +104,16 @@ char shortname[32]; /* short name of this soundcard */ char longname[80]; /* name of this soundcard */ char mixername[80]; /* mixer name */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27) ++#ifdef __GENKSYMS__ ++ char components[80]; /* just for ABI compatibility */ ++#else + char old_components[80]; /* just for ABI compatibility */ ++#endif +#else char components[128]; /* card components delimited with space */ @@ -13,24 +17,39 @@ struct module *module; /* top-level module */ void *private_data; /* private data for soundcard */ -@@ -125,7 +129,11 @@ struct snd_card { +@@ -125,7 +133,15 @@ struct snd_info_entry *proc_id; /* the card id */ struct proc_dir_entry *proc_root_link; /* number link to real id */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) ++#ifdef __GENKSYMS__ ++ struct snd_monitor_file *files; /* just for ABI compatibility */ ++#else + void *old_monitor_file_next; /* just for ABI compatibility */ ++#endif +#else struct list_head files_list; /* all files associated to this card */ +#endif struct snd_shutdown_f_ops *s_f_ops; /* file operations in the shutdown state */ spinlock_t files_lock; /* lock the files for this card */ -@@ -145,6 +153,15 @@ struct snd_card { +@@ -133,7 +149,9 @@ + int free_on_last_close; /* free in context of file_release */ + wait_queue_head_t shutdown_sleep; + struct device *dev; /* device assigned to this card */ ++#ifndef CONFIG_SYSFS_DEPRECATED + struct device *card_dev; /* cardX object for sysfs */ ++#endif + + #ifdef CONFIG_PM + unsigned int power_state; /* power state */ +@@ -145,6 +163,17 @@ struct snd_mixer_oss *mixer_oss; int mixer_oss_change_count; #endif + + /* added in the tail */ ++#ifndef __GENKSYMS__ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27) + char components[128]; /* card components delimited with + space */ @@ -38,10 +57,11 @@ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) + struct list_head files_list; /* all files associated to this card */ +#endif ++#endif /* !__GENKSYMS__ */ }; #ifdef CONFIG_PM -@@ -194,7 +211,11 @@ struct snd_minor { +@@ -194,7 +223,11 @@ /* return a device pointer linked to each sound device as a parent */ static inline struct device *snd_card_get_device_link(struct snd_card *card) { @@ -53,7 +73,7 @@ } /* sound.c */ -@@ -296,7 +317,11 @@ int snd_component_add(struct snd_card *c +@@ -296,7 +329,11 @@ int snd_card_file_add(struct snd_card *card, struct file *file); int snd_card_file_remove(struct snd_card *card, struct file *file); @@ -65,7 +85,7 @@ /* device.c */ -@@ -411,12 +436,20 @@ static inline int __snd_bug_on(int cond) +@@ -411,12 +448,20 @@ /* for easier backward-porting */ #if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE) diff --git a/include/sound/info.patch b/include/sound/info.patch new file mode 100644 index 000000000..52aad1d54 --- /dev/null +++ b/include/sound/info.patch @@ -0,0 +1,29 @@ +--- ../../alsa-kernel/include/info.h 2010-05-20 11:57:33.000000000 +0200 ++++ info.h 2011-03-04 12:32:02.000000000 +0100 +@@ -51,6 +51,8 @@ + unsigned short mode, void **file_private_data); + int (*release)(struct snd_info_entry *entry, + unsigned short mode, void *file_private_data); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) || \ ++ !defined(__GENKSYMS__) + ssize_t (*read)(struct snd_info_entry *entry, void *file_private_data, + struct file *file, char __user *buf, + size_t count, loff_t pos); +@@ -60,6 +62,17 @@ + loff_t (*llseek)(struct snd_info_entry *entry, + void *file_private_data, struct file *file, + loff_t offset, int orig); ++#else ++ long (*read)(struct snd_info_entry *entry, void *file_private_data, ++ struct file *file, char __user *buf, ++ unsigned long count, unsigned long pos); ++ long (*write)(struct snd_info_entry *entry, void *file_private_data, ++ struct file *file, const char __user *buf, ++ unsigned long count, unsigned long pos); ++ long long (*llseek)(struct snd_info_entry *entry, ++ void *file_private_data, struct file *file, ++ long long offset, int orig); ++#endif + unsigned int (*poll)(struct snd_info_entry *entry, + void *file_private_data, struct file *file, + poll_table *wait); diff --git a/include/sound/pcm.patch b/include/sound/pcm.patch index 69dd6727c..f475d780d 100644 --- a/include/sound/pcm.patch +++ b/include/sound/pcm.patch @@ -1,6 +1,16 @@ ---- ../../alsa-kernel/include/pcm.h 2010-08-18 14:25:17.000000000 +0200 -+++ pcm.h 2010-08-18 14:34:35.000000000 +0200 -@@ -277,10 +277,15 @@ struct snd_pcm_runtime { +--- ../../alsa-kernel/include/pcm.h 2011-02-14 17:15:57.000000000 +0100 ++++ pcm.h 2011-03-04 17:20:48.000000000 +0100 +@@ -29,7 +29,9 @@ + #include <linux/poll.h> + #include <linux/mm.h> + #include <linux/bitops.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) + #include <linux/pm_qos_params.h> ++#endif + + #define snd_pcm_substream_chip(substream) ((substream)->private_data) + #define snd_pcm_chip(pcm) ((pcm)->private_data) +@@ -278,10 +280,15 @@ snd_pcm_uframes_t avail_max; snd_pcm_uframes_t hw_ptr_base; /* Position at buffer restart */ snd_pcm_uframes_t hw_ptr_interrupt; /* Position at interrupt time */ @@ -19,47 +29,58 @@ /* -- HW params -- */ snd_pcm_access_t access; /* access mode */ snd_pcm_format_t format; /* SNDRV_PCM_FORMAT_* */ -@@ -290,6 +295,9 @@ struct snd_pcm_runtime { +@@ -291,6 +298,9 @@ snd_pcm_uframes_t period_size; /* period size */ unsigned int periods; /* periods */ snd_pcm_uframes_t buffer_size; /* buffer size */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) -+ unsigned int old_tick_time; /* for ABI compatibility */ ++ unsigned int tick_time; /* for ABI compatibility */ +#endif snd_pcm_uframes_t min_align; /* Min alignment for the format */ size_t byte_align; unsigned int frame_bits; -@@ -301,6 +309,10 @@ struct snd_pcm_runtime { +@@ -298,11 +308,17 @@ + unsigned int info; + unsigned int rate_num; + unsigned int rate_den; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) + unsigned int no_period_wakeup: 1; ++#endif + /* -- SW params -- */ int tstamp_mode; /* mmap timestamp is updated */ unsigned int period_step; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) -+ unsigned int old_sleep_min; /* for ABI compatibility */ -+ snd_pcm_uframes_t old_xfer_align; /* for ABI compatibility */ ++ unsigned int sleep_min; /* for ABI compatibility */ ++ snd_pcm_uframes_t xfer_align; /* for ABI compatibility */ +#endif snd_pcm_uframes_t start_threshold; snd_pcm_uframes_t stop_threshold; snd_pcm_uframes_t silence_threshold; /* Silence filling happens when -@@ -318,9 +330,18 @@ struct snd_pcm_runtime { +@@ -320,9 +336,22 @@ struct snd_pcm_mmap_control *control; /* -- locking / scheduling -- */ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) snd_pcm_uframes_t twake; /* do transfer (!poll) wakeup if non-zero */ -+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) ++#ifdef __GENKSYMS__ ++ unsigned int twake: 1; /* for ABI compatibility */ ++#else + unsigned int old_twake: 1; /* for ABI compatibility */ +#endif ++#endif wait_queue_head_t sleep; /* poll sleep */ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) wait_queue_head_t tsleep; /* transfer sleep */ +#endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) -+ struct timer_list old_tick_timer; /* for ABI compatibility */ ++ struct timer_list tick_timer; /* for ABI compatibility */ +#endif struct fasync_struct *fasync; /* -- private section -- */ -@@ -337,8 +358,9 @@ struct snd_pcm_runtime { +@@ -339,8 +368,9 @@ /* -- timer -- */ unsigned int timer_resolution; /* timer resolution */ @@ -70,12 +91,16 @@ /* -- DMA -- */ unsigned char *dma_area; /* DMA area */ dma_addr_t dma_addr; /* physical bus address (not accessible from main CPU) */ -@@ -354,6 +376,27 @@ struct snd_pcm_runtime { +@@ -353,9 +383,34 @@ + struct snd_pcm_oss_runtime oss; + #endif + ++ /* appended below for ABI compatibility */ ++#ifndef __GENKSYMS__ #ifdef CONFIG_SND_PCM_XRUN_DEBUG struct snd_pcm_hwptr_log *hwptr_log; #endif + -+ /* appended below for ABI compatibility */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) + unsigned long hw_ptr_jiffies; /* Time when hw_ptr is updated */ +#endif @@ -85,20 +110,23 @@ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) + int tstamp_type; /* timestamp type */ +#endif -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) -+ unsigned int old_twake: 1; /* transfer (!poll) wakeup */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34) + wait_queue_head_t tsleep; /* transfer sleep */ +#endif -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) + snd_pcm_uframes_t twake; /* do transfer (!poll) wakeup if non-zero */ +#endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) + unsigned long hw_ptr_buffer_jiffies; /* buffer time in jiffies */ +#endif ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 38) ++ unsigned int no_period_wakeup: 1; ++#endif ++#endif /* !__GENKSYMS__ */ }; struct snd_pcm_group { /* keep linked substreams */ -@@ -371,7 +414,15 @@ struct snd_pcm_substream { +@@ -373,7 +428,15 @@ int number; char name[32]; /* substream name */ int stream; /* stream (direction) */ @@ -114,13 +142,49 @@ size_t buffer_bytes_max; /* limit ring buffer size */ struct snd_dma_buffer dma_buffer; unsigned int dma_buf_id; -@@ -383,6 +434,9 @@ struct snd_pcm_substream { +@@ -385,6 +448,9 @@ /* -- timer section -- */ struct snd_timer *timer; /* timer */ unsigned timer_running: 1; /* time is running */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) -+ spinlock_t already_dead_timer_lock; /* just place holder */ ++ spinlock_t timer_lock; /* just place holder */ +#endif /* -- next substream -- */ struct snd_pcm_substream *next; /* -- linked substreams -- */ +@@ -397,7 +463,9 @@ + atomic_t mmap_count; + unsigned int f_flags; + void (*pcm_release)(struct snd_pcm_substream *); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) + struct pid *pid; ++#endif + #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) + /* -- OSS things -- */ + struct snd_pcm_oss_substream oss; +@@ -413,6 +481,13 @@ + #endif + /* misc flags */ + unsigned int hw_opened: 1; ++ ++ /* appended below for ABI compatibility */ ++#ifndef __GENKSYMS__ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) ++ struct pid *pid; ++#endif ++#endif + }; + + #define SUBSTREAM_BUSY(substream) ((substream)->ref_count > 0) +@@ -491,7 +566,11 @@ + int snd_pcm_status(struct snd_pcm_substream *substream, + struct snd_pcm_status *status); + int snd_pcm_start(struct snd_pcm_substream *substream); ++#if defined(__GENKSYMS__) && LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 38) ++int snd_pcm_stop(struct snd_pcm_substream *substream, int status); ++#else + int snd_pcm_stop(struct snd_pcm_substream *substream, snd_pcm_state_t status); ++#endif + int snd_pcm_drain_done(struct snd_pcm_substream *substream); + #ifdef CONFIG_PM + int snd_pcm_suspend(struct snd_pcm_substream *substream); diff --git a/include/sound/pcm_oss.patch b/include/sound/pcm_oss.patch new file mode 100644 index 000000000..d7d4509da --- /dev/null +++ b/include/sound/pcm_oss.patch @@ -0,0 +1,15 @@ +--- ../../alsa-kernel/include/pcm_oss.h 2010-02-05 08:53:31.000000000 +0100 ++++ pcm_oss.h 2011-03-04 12:24:57.000000000 +0100 +@@ -61,7 +61,12 @@ + struct snd_pcm_plugin *plugin_first; + struct snd_pcm_plugin *plugin_last; + #endif ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) || \ ++ !defined(__GENKSYMS__) + unsigned int prev_hw_ptr_period; ++#else ++ unsigned int prev_hw_ptr_interrupt; ++#endif + }; + + struct snd_pcm_oss_file { diff --git a/include/sound/rawmidi.patch b/include/sound/rawmidi.patch new file mode 100644 index 000000000..6d938b051 --- /dev/null +++ b/include/sound/rawmidi.patch @@ -0,0 +1,21 @@ +--- ../../alsa-kernel/include/rawmidi.h 2009-12-18 14:00:10.000000000 +0100 ++++ rawmidi.h 2011-03-04 15:42:22.000000000 +0100 +@@ -98,9 +98,18 @@ + struct snd_rawmidi_str *pstr; + char name[32]; + struct snd_rawmidi_runtime *runtime; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) + struct pid *pid; ++#endif + /* hardware layer */ + struct snd_rawmidi_ops *ops; ++ ++ /* appended below for ABI compatibility */ ++#ifndef __GENKSYMS__ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) ++ struct pid *pid; ++#endif ++#endif + }; + + struct snd_rawmidi_file { |