diff options
author | Daniel Drake <dsd@gentoo.org> | 2006-01-20 13:54:10 +0000 |
---|---|---|
committer | Daniel Drake <dsd@gentoo.org> | 2006-01-20 13:54:10 +0000 |
commit | c6a91d56c9c4aa330ccc0e6b2d9556a985b511f9 (patch) | |
tree | 5576747c71f15b8598f5b55ce269e58105c9f421 /media-sound | |
parent | Porting to modular X (diff) | |
download | gentoo-2-c6a91d56c9c4aa330ccc0e6b2d9556a985b511f9.tar.gz gentoo-2-c6a91d56c9c4aa330ccc0e6b2d9556a985b511f9.tar.bz2 gentoo-2-c6a91d56c9c4aa330ccc0e6b2d9556a985b511f9.zip |
Adjust GFP allocation flags for kernel 2.6.15 and onwards, to fix page state crashes. Patch from Hugh Dickens. Fixes bug #111968.
(Portage version: 2.1_pre3-r1)
Diffstat (limited to 'media-sound')
-rw-r--r-- | media-sound/alsa-driver/ChangeLog | 9 | ||||
-rw-r--r-- | media-sound/alsa-driver/Manifest | 13 | ||||
-rw-r--r-- | media-sound/alsa-driver/alsa-driver-1.0.10-r2.ebuild | 168 | ||||
-rw-r--r-- | media-sound/alsa-driver/files/alsa-driver-1.0.10-gfp-flags.patch | 21 | ||||
-rw-r--r-- | media-sound/alsa-driver/files/digest-alsa-driver-1.0.10-r2 | 1 |
5 files changed, 201 insertions, 11 deletions
diff --git a/media-sound/alsa-driver/ChangeLog b/media-sound/alsa-driver/ChangeLog index 9d637916db27..325c0d8f919e 100644 --- a/media-sound/alsa-driver/ChangeLog +++ b/media-sound/alsa-driver/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for media-sound/alsa-driver # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-driver/ChangeLog,v 1.189 2006/01/15 15:52:20 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-driver/ChangeLog,v 1.190 2006/01/20 13:54:10 dsd Exp $ + +*alsa-driver-1.0.10-r2 (20 Jan 2006) + + 20 Jan 2006; Daniel Drake <dsd@gentoo.org> + +files/alsa-driver-1.0.10-gfp-flags.patch, +alsa-driver-1.0.10-r2.ebuild: + Adjust GFP allocation flags for kernel 2.6.15 and onwards, to fix page state + crashes. Patch from Hugh Dickens. Fixes bug #111968. 15 Jan 2006; Aron Griffis <agriffis@gentoo.org> -alsa-driver-1.0.3.ebuild, alsa-driver-1.0.10.ebuild: diff --git a/media-sound/alsa-driver/Manifest b/media-sound/alsa-driver/Manifest index af55e89d6505..327a82a751b5 100644 --- a/media-sound/alsa-driver/Manifest +++ b/media-sound/alsa-driver/Manifest @@ -1,25 +1,18 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - MD5 495ee0d6848d4c7291d13f9907d0e683 ChangeLog 32763 MD5 4d36586e82b663b31cef834a9fa0d38b alsa-driver-1.0.10-r1.ebuild 4720 +MD5 68744b540554d36de90a2664fe215c39 alsa-driver-1.0.10-r2.ebuild 4801 MD5 7bd2cc67889de8bcd4ff55490f1189c1 alsa-driver-1.0.10.ebuild 4619 MD5 05d84ba8681d1e857e581caf97e6db59 alsa-driver-1.0.10_rc3.ebuild 4675 MD5 6b7004043027c26fec7e40de8edcb77d alsa-driver-1.0.11_rc2.ebuild 4856 MD5 8c120f7730b91118d0a8148d2deb3a43 files/alsa-driver-0.9.8-au-fix.patch 1267 +MD5 075d7776dfb62176431e206a9cd5fc84 files/alsa-driver-1.0.10-gfp-flags.patch 955 MD5 11884fe8b770282d2470c5620622e379 files/alsa-driver-1.0.10-oops.patch 1388 MD5 ed352c464a295465543d8933c162f101 files/alsa-driver-1.0.10_rc1-include.patch 346 MD5 f6a0e5f4624041d23bbd60726331310e files/alsa-driver-1.0.10_rc3-ppc-unbreakage.patch 2957 MD5 5474546fa4977a1fa63fbab0a155fd15 files/digest-alsa-driver-1.0.10 72 MD5 5474546fa4977a1fa63fbab0a155fd15 files/digest-alsa-driver-1.0.10-r1 72 +MD5 5474546fa4977a1fa63fbab0a155fd15 files/digest-alsa-driver-1.0.10-r2 72 MD5 ad7631557a0317471d29e4c26cfb4cf2 files/digest-alsa-driver-1.0.10_rc3 75 MD5 855ac1fe064602102d683b3396a7c582 files/digest-alsa-driver-1.0.11_rc2 75 MD5 27ccbe36406f145c1d63725a53517233 files/makefile.patch 1122 MD5 a1eaeb2ae801daeb712c90c060e922dc metadata.xml 158 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.2 (GNU/Linux) - -iD8DBQFDym/BJrHF4yAQTrARAmEuAJ9VD4cm2a36q9tPXpFURTDgT9TtlwCfdGLR -UYQ0pqYO8kXeqfQQV6GkwNY= -=TaCs ------END PGP SIGNATURE----- diff --git a/media-sound/alsa-driver/alsa-driver-1.0.10-r2.ebuild b/media-sound/alsa-driver/alsa-driver-1.0.10-r2.ebuild new file mode 100644 index 000000000000..ac5c867abd04 --- /dev/null +++ b/media-sound/alsa-driver/alsa-driver-1.0.10-r2.ebuild @@ -0,0 +1,168 @@ +# Copyright 1999-2006 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-r2.ebuild,v 1.1 2006/01/20 13:54:10 dsd Exp $ + +inherit linux-mod flag-o-matic eutils + +MY_P="${P/_rc/rc}" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Advanced Linux Sound Architecture kernel modules" +HOMEPAGE="http://www.alsa-project.org/" +SRC_URI="mirror://alsaproject/driver/${MY_P}.tar.bz2" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" + +KEYWORDS="~alpha ~amd64 ~ia64 ~mips ~ppc ~ppc64 ~x86" +IUSE="oss doc debug" + +RDEPEND="virtual/modutils + ~media-sound/alsa-headers-${PV}" +DEPEND="${RDEPEND} + virtual/linux-sources + sparc? ( >=sys-devel/autoconf-2.50 ) + sys-apps/debianutils" + +PROVIDE="virtual/alsa" + +pkg_setup() { + # By default, drivers for all supported cards will be compiled. + # If you want to only compile for specific card(s), set ALSA_CARDS + # environment to a space-separated list of drivers that you want to build. + # For example: + # + # env ALSA_CARDS='emu10k1 intel8x0 ens1370' emerge alsa-driver + # + ALSA_CARDS=${ALSA_CARDS:-all} + + # Which drivers need PNP + local PNP_DRIVERS="interwave interwave-stb" + + CONFIG_CHECK="SOUND" + SND_ERROR="ALSA is already compiled into the kernel." + SOUND_ERROR="Your kernel doesn't have sound support enabled." + SOUND_PRIME_ERROR="Your kernel is configured to use the deprecated OSS drivers. Please disable them and re-emerge alsa-driver." + PNP_ERROR="Some of the drivers you selected require PNP in your kernel (${PNP_DRIVERS}). Either enable PNP in your kernel or trim which drivers get compiled using ALSA_CARDS in /etc/make.conf." + + if [[ "${ALSA_CARDS}" == "all" ]]; then + + # Ignore PNP checks for ppc architecture, as PNP can't be enabled there. + if [[ ${ARCH} != "ppc" ]]; then + CONFIG_CHECK="${CONFIG_CHECK} PNP" + fi + else + for pnpdriver in ${PNP_DRIVERS}; do + hasq ${pnpdriver} ${ALSA_CARDS} && CONFIG_CHECK="${CONFIG_CHECK} PNP" + done + fi + + linux-mod_pkg_setup + + if [[ ${PROFILE_ARCH} == "sparc64" ]] ; then + export CBUILD=${CBUILD-${CHOST}} + export CHOST="sparc64-unknown-linux-gnu" + fi +} + +src_unpack() { + unpack ${A} + + cd ${S} + + epatch "${FILESDIR}"/${PN}-1.0.10_rc1-include.patch + epatch "${FILESDIR}/${P}-oops.patch" + + if kernel_is ge 2 6 15 ; then + epatch "${FILESDIR}"/${P}-gfp-flags.patch + fi + + convert_to_m ${S}/Makefile + sed -i -e 's:\(.*depmod\):#\1:' ${S}/Makefile +} + +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) \ + $(use_with debug debug full) \ + --with-kernel="${KV_DIR}" \ + --with-build="${KV_OUT_DIR}" \ + --with-isapnp=yes \ + --with-sequencer=yes \ + --with-cards="${ALSA_CARDS}" || die "econf failed" + + # linux-mod_src_compile doesn't work well with alsa + + ARCH=$(tc-arch-kernel) + # -j1 : see bug #71028 + emake -j1 HOSTCC=$(tc-getBUILD_CC) CC=$(tc-getCC) || die "Make Failed" + ARCH=$(tc-arch) + + if use doc; + then + ebegin "Building Documentation" + cd ${S}/scripts + emake || die Failed making docs in ${S}/scripts + + cd ${S}/doc/DocBook + emake || die Failed making docs in ${S}/doc/DocBook + eend $? + fi +} + + +src_install() { + make DESTDIR=${D} install-modules || die "make install failed" + + dodoc CARDS-STATUS FAQ README WARNING TODO + + if use doc; then + docinto doc + dodoc doc/* + rm ${D}/usr/share/doc/${PF}/doc/Makefile.gz + + docinto DocBook + dodoc doc/DocBook/* + rm ${D}/usr/share/doc/${PF}/DocBook/Makefile.gz + + docinto Documentation + dodoc sound/Documentation/* + fi + + if kernel_is 2 6; then + # mv the drivers somewhere they won't be killed by the kernel's make modules_install + mv ${D}/lib/modules/${KV_FULL}/kernel/sound ${D}/lib/modules/${KV_FULL}/${PN} + rmdir ${D}/lib/modules/${KV_FULL}/kernel &> /dev/null + fi +} + +pkg_postinst() { + einfo + einfo "The alsasound initscript and modules.d/alsa have now moved to alsa-utils" + einfo + einfo "Also, remember that all mixer channels will be MUTED by default." + einfo "Use the 'alsamixer' program to unmute them." + einfo + einfo "Version 1.0.3 and above should work with version 2.6 kernels." + einfo "If you experience problems, please report bugs to http://bugs.gentoo.org." + einfo + + linux-mod_pkg_postinst + + einfo "Check out the ALSA installation guide availible at the following URL:" + einfo "http://www.gentoo.org/doc/en/alsa-guide.xml" + + if kernel_is 2 6 && [ -e ${ROOT}/lib/modules/${KV_FULL}/kernel/sound ]; then + # Cleanup if they had older alsa installed + for file in $(find ${ROOT}/lib/modules/${KV_FULL}/${PN} -type f); do + rm -f ${file//${KV_FULL}\/${PN}/${KV_FULL}\/kernel\/sound} + done + + for dir in $(find ${ROOT}/lib/modules/${KV_FULL}/kernel/sound -type d | tac); do + rmdir ${dir} &> /dev/null + done + fi +} diff --git a/media-sound/alsa-driver/files/alsa-driver-1.0.10-gfp-flags.patch b/media-sound/alsa-driver/files/alsa-driver-1.0.10-gfp-flags.patch new file mode 100644 index 000000000000..e210de89c69f --- /dev/null +++ b/media-sound/alsa-driver/files/alsa-driver-1.0.10-gfp-flags.patch @@ -0,0 +1,21 @@ +Hugh Dickins GFP flag changes to ALSA + +--- alsa-driver-1.0.10/alsa-kernel/core/memalloc.c.orig 2005-10-31 13:11:53.000000000 +0000 ++++ alsa-driver-1.0.10/alsa-kernel/core/memalloc.c 2005-12-04 06:48:20.000000000 +0000 +@@ -197,6 +197,7 @@ void *snd_malloc_pages(size_t size, gfp_ + + snd_assert(size > 0, return NULL); + snd_assert(gfp_flags != 0, return NULL); ++ gfp_flags |= __GFP_COMP; /* compound page lets parts be mapped */ + pg = get_order(size); + if ((res = (void *) __get_free_pages(gfp_flags, pg)) != NULL) { + mark_pages(virt_to_page(res), pg); +@@ -241,6 +242,7 @@ static void *snd_malloc_dev_pages(struct + snd_assert(dma != NULL, return NULL); + pg = get_order(size); + gfp_flags = GFP_KERNEL ++ | __GFP_COMP /* compound page lets parts be mapped */ + | __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); + diff --git a/media-sound/alsa-driver/files/digest-alsa-driver-1.0.10-r2 b/media-sound/alsa-driver/files/digest-alsa-driver-1.0.10-r2 new file mode 100644 index 000000000000..5d0bc883e3c8 --- /dev/null +++ b/media-sound/alsa-driver/files/digest-alsa-driver-1.0.10-r2 @@ -0,0 +1 @@ +MD5 e9e7c1ca664a14275d67185049f933f9 alsa-driver-1.0.10.tar.bz2 2194644 |