summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2005-11-15 11:22:45 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2005-11-15 11:22:45 +0000
commit7c3bac8b4bf4905ee7ef3d8e6b310c9b9825ca77 (patch)
tree9fe5441544425d13cab9aa8cecd2227f08ac927f /media-sound/alsa-driver
parentInitial import. See bugs #103470 and #109641. (diff)
downloadgentoo-2-7c3bac8b4bf4905ee7ef3d8e6b310c9b9825ca77.tar.gz
gentoo-2-7c3bac8b4bf4905ee7ef3d8e6b310c9b9825ca77.tar.bz2
gentoo-2-7c3bac8b4bf4905ee7ef3d8e6b310c9b9825ca77.zip
Workaround the moved headers in PPC's 2.6.14 kernel. Apply patch to rc3 to reverse a change that's in no official kernel yet and was breaking PPC.
(Portage version: 2.0.53_rc7)
Diffstat (limited to 'media-sound/alsa-driver')
-rw-r--r--media-sound/alsa-driver/ChangeLog8
-rw-r--r--media-sound/alsa-driver/alsa-driver-1.0.10_rc2.ebuild3
-rw-r--r--media-sound/alsa-driver/alsa-driver-1.0.10_rc3.ebuild7
-rw-r--r--media-sound/alsa-driver/files/alsa-driver-1.0.10_rc3-ppc-unbreakage.patch105
4 files changed, 119 insertions, 4 deletions
diff --git a/media-sound/alsa-driver/ChangeLog b/media-sound/alsa-driver/ChangeLog
index 07a64f3d2438..adb84d1a5ec9 100644
--- a/media-sound/alsa-driver/ChangeLog
+++ b/media-sound/alsa-driver/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-sound/alsa-driver
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-driver/ChangeLog,v 1.166 2005/11/14 15:49:03 lu_zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-driver/ChangeLog,v 1.167 2005/11/15 11:22:45 flameeyes Exp $
+
+ 15 Nov 2005; Diego Pettenò <flameeyes@gentoo.org>
+ +files/alsa-driver-1.0.10_rc3-ppc-unbreakage.patch,
+ alsa-driver-1.0.10_rc2.ebuild, alsa-driver-1.0.10_rc3.ebuild:
+ Workaround the moved headers in PPC's 2.6.14 kernel. Apply patch to rc3 to
+ reverse a change that's in no official kernel yet and was breaking PPC.
14 Nov 2005; Luca Barbato <lu_zero@gentoo.org>
alsa-driver-1.0.10_rc3.ebuild:
diff --git a/media-sound/alsa-driver/alsa-driver-1.0.10_rc2.ebuild b/media-sound/alsa-driver/alsa-driver-1.0.10_rc2.ebuild
index 46715f744030..791599fb54b4 100644
--- a/media-sound/alsa-driver/alsa-driver-1.0.10_rc2.ebuild
+++ b/media-sound/alsa-driver/alsa-driver-1.0.10_rc2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 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.10_rc2.ebuild,v 1.6 2005/11/13 03:53:25 soulse Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-driver/alsa-driver-1.0.10_rc2.ebuild,v 1.7 2005/11/15 11:22:45 flameeyes Exp $
inherit linux-mod flag-o-matic eutils
@@ -75,6 +75,7 @@ src_unpack() {
src_compile() {
# Should fix bug #46901
is-flag "-malign-double" && filter-flags "-fomit-frame-pointer"
+ append-flags "-I${KV_DIR}/arch/$(tc-arch-kernel)/include"
econf $(use_with oss) \
--with-kernel="${KV_DIR}" \
diff --git a/media-sound/alsa-driver/alsa-driver-1.0.10_rc3.ebuild b/media-sound/alsa-driver/alsa-driver-1.0.10_rc3.ebuild
index 5ec74912be44..5b9e0ae7fdfc 100644
--- a/media-sound/alsa-driver/alsa-driver-1.0.10_rc3.ebuild
+++ b/media-sound/alsa-driver/alsa-driver-1.0.10_rc3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 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.10_rc3.ebuild,v 1.2 2005/11/14 15:49:03 lu_zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-driver/alsa-driver-1.0.10_rc3.ebuild,v 1.3 2005/11/15 11:22:45 flameeyes Exp $
inherit linux-mod flag-o-matic eutils
@@ -67,6 +67,8 @@ src_unpack() {
cd ${S}
epatch "${FILESDIR}"/${PN}-1.0.10_rc1-include.patch
+ epatch "${FILESDIR}/${P}-ppc-unbreakage.patch"
+
convert_to_m ${S}/Makefile
sed -i -e 's:\(.*depmod\):#\1:' ${S}/Makefile
}
@@ -74,6 +76,7 @@ src_unpack() {
src_compile() {
# Should fix bug #46901
is-flag "-malign-double" && filter-flags "-fomit-frame-pointer"
+ append-flags "-I${KV_DIR}/arch/$(tc-arch-kernel)/include"
econf $(use_with oss) \
--with-kernel="${KV_DIR}" \
@@ -84,8 +87,8 @@ src_compile() {
# linux-mod_src_compile doesn't work well with alsa
- # -j1 : see bug #71028
ARCH=$(tc-arch-kernel)
+ # -j1 : see bug #71028
emake -j1 HOSTCC=$(tc-getBUILD_CC) CC=$(tc-getCC) || die "Make Failed"
ARCH=$(tc-arch)
diff --git a/media-sound/alsa-driver/files/alsa-driver-1.0.10_rc3-ppc-unbreakage.patch b/media-sound/alsa-driver/files/alsa-driver-1.0.10_rc3-ppc-unbreakage.patch
new file mode 100644
index 000000000000..43a462a004eb
--- /dev/null
+++ b/media-sound/alsa-driver/files/alsa-driver-1.0.10_rc3-ppc-unbreakage.patch
@@ -0,0 +1,105 @@
+Index: alsa-driver-1.0.10rc3/sound/ppc/beep.c
+===================================================================
+--- alsa-driver-1.0.10rc3.orig/sound/ppc/beep.c
++++ alsa-driver-1.0.10rc3/sound/ppc/beep.c
+@@ -31,14 +31,14 @@
+ #include "pmac.h"
+
+ struct snd_pmac_beep {
+- int running; /* boolean */
+- int volume; /* mixer volume: 0-100 */
++ int running; /* boolean */
++ int volume; /* mixer volume: 0-100 */
+ int volume_play; /* currently playing volume */
+ int hz;
+ int nsamples;
+ short *buf; /* allocated wave buffer */
+ dma_addr_t addr; /* physical address of buffer */
+- struct input_dev *dev;
++ struct input_dev dev;
+ };
+
+ /*
+@@ -210,55 +210,47 @@ static snd_kcontrol_new_t snd_pmac_beep_
+ int __init snd_pmac_attach_beep(pmac_t *chip)
+ {
+ pmac_beep_t *beep;
+- struct input_dev *input_dev;
+- void *dmabuf;
+- int err = -ENOMEM;
+-
+- beep = kzalloc(sizeof(*beep), GFP_KERNEL);
+- dmabuf = dma_alloc_coherent(&chip->pdev->dev, BEEP_BUFLEN * 4,
+- &beep->addr, GFP_KERNEL);
+- input_dev = input_allocate_device();
+- if (!beep || !dmabuf || !input_dev)
+- goto fail;
++ int err;
++
++ beep = kmalloc(sizeof(*beep), GFP_KERNEL);
++ if (! beep)
++ return -ENOMEM;
++
++ memset(beep, 0, sizeof(*beep));
++ beep->buf = dma_alloc_coherent(&chip->pdev->dev, BEEP_BUFLEN * 4,
++ &beep->addr, GFP_KERNEL);
++
++ beep->dev.evbit[0] = BIT(EV_SND);
++ beep->dev.sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE);
++ beep->dev.event = snd_pmac_beep_event;
++ beep->dev.private = chip;
+
+ /* FIXME: set more better values */
+- input_dev->name = "PowerMac Beep";
+- input_dev->phys = "powermac/beep";
+- input_dev->id.bustype = BUS_ADB;
+- input_dev->id.vendor = 0x001f;
+- input_dev->id.product = 0x0001;
+- input_dev->id.version = 0x0100;
+-
+- input_dev->evbit[0] = BIT(EV_SND);
+- input_dev->sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE);
+- input_dev->event = snd_pmac_beep_event;
+- input_dev->private = chip;
+- input_dev->cdev.dev = &chip->pdev->dev;
++ beep->dev.name = "PowerMac Beep";
++ beep->dev.phys = "powermac/beep";
++ beep->dev.id.bustype = BUS_ADB;
++ beep->dev.id.vendor = 0x001f;
++ beep->dev.id.product = 0x0001;
++ beep->dev.id.version = 0x0100;
+
+- beep->dev = input_dev;
+- beep->buf = dmabuf;
+ beep->volume = BEEP_VOLUME;
+ beep->running = 0;
+-
+- err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_pmac_beep_mixer, chip));
+- if (err < 0)
+- goto fail;
++ if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_pmac_beep_mixer, chip))) < 0) {
++ kfree(beep->buf);
++ kfree(beep);
++ return err;
++ }
+
+ chip->beep = beep;
+- input_register_device(beep->dev);
++ input_register_device(&beep->dev);
+
+ return 0;
+-
+- fail: input_free_device(input_dev);
+- kfree(dmabuf);
+- kfree(beep);
+- return err;
+ }
+
+ void snd_pmac_detach_beep(pmac_t *chip)
+ {
+ if (chip->beep) {
+- input_unregister_device(chip->beep->dev);
++ input_unregister_device(&chip->beep->dev);
+ dma_free_coherent(&chip->pdev->dev, BEEP_BUFLEN * 4,
+ chip->beep->buf, chip->beep->addr);
+ kfree(chip->beep);