summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heim <phreak@gentoo.org>2007-10-03 18:02:38 +0000
committerChristian Heim <phreak@gentoo.org>2007-10-03 18:02:38 +0000
commit10994818a2154863fb0e4e1d613007d8747bd6c3 (patch)
tree923c7593c418c41bfba2ac86979ef453843a87d8 /media-sound
parentFix some quoting issues (diff)
downloadgentoo-2-10994818a2154863fb0e4e1d613007d8747bd6c3.tar.gz
gentoo-2-10994818a2154863fb0e4e1d613007d8747bd6c3.tar.bz2
gentoo-2-10994818a2154863fb0e4e1d613007d8747bd6c3.zip
Fix compilation of alsa-driver-1.0.14-r1, somehow I missed some parts when creating the custom memalloc.patch (#194617 thanks to Doug).
(Portage version: 2.1.3.9)
Diffstat (limited to 'media-sound')
-rw-r--r--media-sound/alsa-driver/ChangeLog7
-rw-r--r--media-sound/alsa-driver/alsa-driver-1.0.14-r1.ebuild3
-rw-r--r--media-sound/alsa-driver/files/alsa-driver-1.0.14-seq_file.patch76
3 files changed, 59 insertions, 27 deletions
diff --git a/media-sound/alsa-driver/ChangeLog b/media-sound/alsa-driver/ChangeLog
index bf9cc9f278d5..468a012180ab 100644
--- a/media-sound/alsa-driver/ChangeLog
+++ b/media-sound/alsa-driver/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for media-sound/alsa-driver
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-driver/ChangeLog,v 1.276 2007/10/03 13:50:21 phreak Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-driver/ChangeLog,v 1.277 2007/10/03 18:02:37 phreak Exp $
+
+ 03 Oct 2007; Christian Heim <phreak@gentoo.org>
+ files/alsa-driver-1.0.14-seq_file.patch, alsa-driver-1.0.14-r1.ebuild:
+ Fix compilation of alsa-driver-1.0.14-r1, somehow I missed some parts when
+ creating the custom memalloc.patch (#194617 thanks to Doug).
*alsa-driver-1.0.14-r1 (03 Oct 2007)
diff --git a/media-sound/alsa-driver/alsa-driver-1.0.14-r1.ebuild b/media-sound/alsa-driver/alsa-driver-1.0.14-r1.ebuild
index 0234de192004..dd955d21fd11 100644
--- a/media-sound/alsa-driver/alsa-driver-1.0.14-r1.ebuild
+++ b/media-sound/alsa-driver/alsa-driver-1.0.14-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-driver/alsa-driver-1.0.14-r1.ebuild,v 1.1 2007/10/03 13:50:21 phreak Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-driver/alsa-driver-1.0.14-r1.ebuild,v 1.2 2007/10/03 18:02:37 phreak Exp $
inherit autotools linux-mod flag-o-matic eutils multilib
@@ -114,6 +114,7 @@ src_unpack() {
cd "${S}"
epatch "${FILESDIR}"/${P}-seq_file.patch
rm "${S}"/acore/memalloc.patch
+ touch "${S}"/acore/memalloc.patch
convert_to_m "${S}/Makefile"
sed -i -e 's:\(.*depmod\):#\1:' "${S}/Makefile"
diff --git a/media-sound/alsa-driver/files/alsa-driver-1.0.14-seq_file.patch b/media-sound/alsa-driver/files/alsa-driver-1.0.14-seq_file.patch
index 974f638a6a92..0dc6635eb1f6 100644
--- a/media-sound/alsa-driver/files/alsa-driver-1.0.14-seq_file.patch
+++ b/media-sound/alsa-driver/files/alsa-driver-1.0.14-seq_file.patch
@@ -1,12 +1,3 @@
---- a/acore/Makefile
-+++ b/acore/Makefile
-@@ -36,5 +36,5 @@ init.c: init.patch $(SND_TOPDIR)/alsa-ke
- rawmidi.c: rawmidi.patch $(SND_TOPDIR)/alsa-kernel/core/rawmidi.c
- sound.c: sound.patch $(SND_TOPDIR)/alsa-kernel/core/sound.c
- timer.c: timer.patch $(SND_TOPDIR)/alsa-kernel/core/timer.c
--memalloc.c: memalloc.patch memalloc.inc memalloc.inc1 $(SND_TOPDIR)/alsa-kernel/core/memalloc.c
-+memalloc.c: memalloc.inc memalloc.inc1 $(SND_TOPDIR)/alsa-kernel/core/memalloc.c
- misc.c: misc.patch $(SND_TOPDIR)/alsa-kernel/core/misc.c
--- a/alsa-kernel/core/memalloc.c
+++ b/alsa-kernel/core/memalloc.c
@@ -1,3 +1,4 @@
@@ -14,7 +5,15 @@
/*
* Copyright (c) by Jaroslav Kysela <perex@suse.cz>
* Takashi Iwai <tiwai@suse.de>
-@@ -82,7 +83,50 @@ struct snd_mem_list {
+@@ -27,6 +28,7 @@
+ #include <linux/pci.h>
+ #include <linux/slab.h>
+ #include <linux/mm.h>
++#include <linux/seq_file.h>
+ #include <asm/uaccess.h>
+ #include <linux/dma-mapping.h>
+ #include <linux/moduleparam.h>
+@@ -82,7 +84,50 @@ struct snd_mem_list {
* Hacks
*/
@@ -66,7 +65,7 @@
/*
* A hack to allocate large buffers via dma_alloc_coherent()
*
-@@ -99,6 +143,30 @@ struct snd_mem_list {
+@@ -99,6 +144,30 @@ struct snd_mem_list {
* so dma_mask doesn't have to be messed with.
*/
@@ -97,7 +96,7 @@
static void *snd_dma_hack_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle,
gfp_t flags)
-@@ -106,15 +174,15 @@ static void *snd_dma_hack_alloc_coherent
+@@ -106,15 +175,15 @@ static void *snd_dma_hack_alloc_coherent
void *ret;
u64 dma_mask, coherent_dma_mask;
@@ -120,7 +119,7 @@
if (ret) {
/* obtained address is out of range? */
if (((unsigned long)*dma_handle + size - 1) & ~dma_mask) {
-@@ -139,6 +207,8 @@ static void *snd_dma_hack_alloc_coherent
+@@ -139,6 +208,8 @@ static void *snd_dma_hack_alloc_coherent
#define dma_alloc_coherent snd_dma_hack_alloc_coherent
#endif /* arch */
@@ -129,7 +128,7 @@
/*
*
-@@ -158,6 +228,24 @@ static inline void dec_snd_pages(int ord
+@@ -158,6 +229,24 @@ static inline void dec_snd_pages(int ord
snd_allocated_pages -= 1 << order;
}
@@ -154,7 +153,7 @@
/**
* snd_malloc_pages - allocate pages with the given size
* @size: the size to allocate in bytes
-@@ -176,8 +264,10 @@ void *snd_malloc_pages(size_t size, gfp_
+@@ -176,8 +265,10 @@ void *snd_malloc_pages(size_t size, gfp_
snd_assert(gfp_flags != 0, return NULL);
gfp_flags |= __GFP_COMP; /* compound page lets parts be mapped */
pg = get_order(size);
@@ -166,7 +165,7 @@
return res;
}
-@@ -196,6 +286,7 @@ void snd_free_pages(void *ptr, size_t si
+@@ -196,6 +287,7 @@ void snd_free_pages(void *ptr, size_t si
return;
pg = get_order(size);
dec_snd_pages(pg);
@@ -174,7 +173,7 @@
free_pages((unsigned long) ptr, pg);
}
-@@ -220,8 +311,10 @@ static void *snd_malloc_dev_pages(struct
+@@ -220,8 +312,10 @@ static void *snd_malloc_dev_pages(struct
| __GFP_NORETRY /* don't trigger OOM-killer */
| __GFP_NOWARN; /* no stack trace print - this call is non-critical */
res = dma_alloc_coherent(dev, PAGE_SIZE << pg, dma, gfp_flags);
@@ -186,7 +185,7 @@
return res;
}
-@@ -236,6 +329,7 @@ static void snd_free_dev_pages(struct de
+@@ -236,6 +330,7 @@ static void snd_free_dev_pages(struct de
return;
pg = get_order(size);
dec_snd_pages(pg);
@@ -194,7 +193,7 @@
dma_free_coherent(dev, PAGE_SIZE << pg, ptr, dma);
}
-@@ -481,53 +575,55 @@ static void free_all_reserved_pages(void
+@@ -481,53 +576,55 @@ static void free_all_reserved_pages(void
#define SND_MEM_PROC_FILE "driver/snd-page-alloc"
static struct proc_dir_entry *snd_mem_proc;
@@ -208,12 +207,12 @@
int devno;
static char *types[] = { "UNKNOWN", "CONT", "DEV", "DEV-SG", "SBUS" };
-+ seq_printf(seq, "pages : %li bytes (%li pages per %likB)\n",
-+ pages * PAGE_SIZE, pages, PAGE_SIZE / 1024);
mutex_lock(&list_mutex);
- len += snprintf(page + len, count - len,
- "pages : %li bytes (%li pages per %likB)\n",
- pages * PAGE_SIZE, pages, PAGE_SIZE / 1024);
++ seq_printf(seq, "pages : %li bytes (%li pages per %likB)\n",
++ pages * PAGE_SIZE, pages, PAGE_SIZE / 1024);
devno = 0;
list_for_each_entry(mem, &mem_list_head, list) {
devno++;
@@ -269,7 +268,34 @@
if (strcmp(token, "add") == 0) {
char *endp;
int vendor, device, size, buffers;
-@@ -596,9 +692,22 @@ static int snd_mem_proc_write(struct fil
+@@ -548,7 +645,7 @@ static int snd_mem_proc_write(struct fil
+ (buffers = simple_strtol(token, NULL, 0)) <= 0 ||
+ buffers > 4) {
+ printk(KERN_ERR "snd-page-alloc: invalid proc write format\n");
+- return (int)count;
++ return count;
+ }
+ vendor &= 0xffff;
+ device &= 0xffff;
+@@ -560,7 +657,7 @@ static int snd_mem_proc_write(struct fil
+ if (pci_set_dma_mask(pci, mask) < 0 ||
+ pci_set_consistent_dma_mask(pci, mask) < 0) {
+ printk(KERN_ERR "snd-page-alloc: cannot set DMA mask %lx for pci %04x:%04x\n", mask, vendor, device);
+- return (int)count;
++ return count;
+ }
+ }
+ for (i = 0; i < buffers; i++) {
+@@ -570,7 +667,7 @@ static int snd_mem_proc_write(struct fil
+ size, &dmab) < 0) {
+ printk(KERN_ERR "snd-page-alloc: cannot allocate buffer pages (size = %d)\n", size);
+ pci_dev_put(pci);
+- return (int)count;
++ return count;
+ }
+ snd_dma_reserve_buf(&dmab, snd_dma_pci_buf_id(pci));
+ }
+@@ -596,9 +693,22 @@ static int snd_mem_proc_write(struct fil
free_all_reserved_pages();
else
printk(KERN_ERR "snd-page-alloc: invalid proc cmd\n");
@@ -293,7 +319,7 @@
#endif /* CONFIG_PROC_FS */
/*
-@@ -609,12 +718,8 @@ static int __init snd_mem_init(void)
+@@ -609,12 +719,8 @@ static int __init snd_mem_init(void)
{
#ifdef CONFIG_PROC_FS
snd_mem_proc = create_proc_entry(SND_MEM_PROC_FILE, 0644, NULL);
@@ -304,11 +330,11 @@
-#endif
- }
+ if (snd_mem_proc)
-+ snd_mem_proc->proc_fops = &snd_mem_proc_fops;
++ snd_mem_proc->proc_fops = &snd_mem_proc_fops;
#endif
return 0;
}
-@@ -644,3 +749,5 @@ EXPORT_SYMBOL(snd_dma_reserve_buf);
+@@ -644,3 +750,5 @@ EXPORT_SYMBOL(snd_dma_reserve_buf);
EXPORT_SYMBOL(snd_malloc_pages);
EXPORT_SYMBOL(snd_free_pages);