Workaround the moved headers in PPC's 2.6.14 kernel. Apply patch to rc3 to reverse...
authorDiego Elio Pettenò <flameeyes@gentoo.org>
Tue, 15 Nov 2005 11:22:45 +0000 (11:22 +0000)
committerDiego Elio Pettenò <flameeyes@gentoo.org>
Tue, 15 Nov 2005 11:22:45 +0000 (11:22 +0000)
Package-Manager: portage-2.0.53_rc7

media-sound/alsa-driver/ChangeLog
media-sound/alsa-driver/Manifest
media-sound/alsa-driver/alsa-driver-1.0.10_rc2.ebuild
media-sound/alsa-driver/alsa-driver-1.0.10_rc3.ebuild
media-sound/alsa-driver/files/alsa-driver-1.0.10_rc3-ppc-unbreakage.patch [new file with mode: 0644]

index 07a64f3d2438e46ae9a71cc8397bd3e51acabac6..adb84d1a5ec9e70edba8dd68dac779a002cc6983 100644 (file)
@@ -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:
index c4ee9422c5e6c267ac40ce22429897eae325d9fc..868a89bfc2135b8fafde048e427bfe1cf85d81c8 100644 (file)
@@ -1,6 +1,9 @@
-MD5 0dcb0c94273163972044560449f47626 ChangeLog 29002
-MD5 0f7e005dac23a8ce9a4c9d3e392b1a95 alsa-driver-1.0.10_rc2.ebuild 4493
-MD5 adb2dd1c66da70e9429ff9b8e92e5fd3 alsa-driver-1.0.10_rc3.ebuild 4451
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+MD5 c020d675a01e146604e690a9da02d1af ChangeLog 29327
+MD5 83e0d77659b142d24afa2a86d91b3c4d alsa-driver-1.0.10_rc2.ebuild 4555
+MD5 e0d45adb0049ff5a409e0345afcb5cda alsa-driver-1.0.10_rc3.ebuild 4561
 MD5 afcbb70f92f2785ee73a764383c47611 alsa-driver-1.0.3.ebuild 3349
 MD5 5f53d077d0ff6216fca0d50170172f0c alsa-driver-1.0.8.ebuild 4679
 MD5 79f7336e1fcbf3cd90de84db0283b03a alsa-driver-1.0.9b.ebuild 4552
@@ -8,6 +11,7 @@ MD5 5445a523e0e8aa31b9f293b1ac380b37 files/1.0.8-msi_audigyls.patch 1771
 MD5 8c120f7730b91118d0a8148d2deb3a43 files/alsa-driver-0.9.8-au-fix.patch 1267
 MD5 ed352c464a295465543d8933c162f101 files/alsa-driver-1.0.10_rc1-include.patch 346
 MD5 2f9a74cca5e78c63142073f0c90b9ff8 files/alsa-driver-1.0.10_rc2-audigy2zs.patch 460
+MD5 f6a0e5f4624041d23bbd60726331310e files/alsa-driver-1.0.10_rc3-ppc-unbreakage.patch 2957
 MD5 be4912a88e538a1f620b2fd422859ef6 files/alsa-driver-1.0.9b-sparc64-ioctl-detect.patch 513
 MD5 569ec84f258f90c508827a3040062f41 files/digest-alsa-driver-1.0.10_rc2 75
 MD5 ad7631557a0317471d29e4c26cfb4cf2 files/digest-alsa-driver-1.0.10_rc3 75
@@ -17,3 +21,10 @@ MD5 496627835733f8108e6b10dfc8ee9bf4 files/digest-alsa-driver-1.0.9b 72
 MD5 27ccbe36406f145c1d63725a53517233 files/makefile.patch 1122
 MD5 b2791ec892d9be6952fe139cc2309abf files/xbox-1.0.8.patch 1525
 MD5 a1eaeb2ae801daeb712c90c060e922dc metadata.xml 158
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.2 (GNU/Linux)
+
+iD8DBQFDecUeAiZjviIA2XgRAsU3AKCjmva6jR+3qfmbkeo7hvitLY2GcACfYBiY
+rJy4WdjgdVnEu2TEsYg04SI=
+=uk9H
+-----END PGP SIGNATURE-----
index 46715f7440300c6d687d87948b74fb8a36a175b6..791599fb54b4230c554b71d41f7bab0ef8386c9d 100644 (file)
@@ -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}" \
index 5ec74912be446fad3cebb208a862bfea461e67f1..5b9e0ae7fdfc5459d49c76672effb057dd4f66ca 100644 (file)
@@ -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 (file)
index 0000000..43a462a
--- /dev/null
@@ -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);