summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <eradicator@gentoo.org>2004-12-02 22:36:01 +0000
committerJeremy Huddleston <eradicator@gentoo.org>2004-12-02 22:36:01 +0000
commit1e81527982e728d20d96d1970befb6811936667b (patch)
tree4c85591af450e874b8a7f314545a51d009836672 /media-sound
parentexcluding speakup patch which breaks some keyboards due to serio initializati... (diff)
downloadhistorical-1e81527982e728d20d96d1970befb6811936667b.tar.gz
historical-1e81527982e728d20d96d1970befb6811936667b.tar.bz2
historical-1e81527982e728d20d96d1970befb6811936667b.zip
Fixing the configure patch to match what was committed upstream as the patch we originally used had some problems.
Diffstat (limited to 'media-sound')
-rw-r--r--media-sound/alsa-driver/ChangeLog13
-rw-r--r--media-sound/alsa-driver/Manifest20
-rw-r--r--media-sound/alsa-driver/alsa-driver-1.0.7-r1.ebuild139
-rw-r--r--media-sound/alsa-driver/alsa-driver-1.0.7-r3.ebuild (renamed from media-sound/alsa-driver/alsa-driver-1.0.7-r2.ebuild)4
-rw-r--r--media-sound/alsa-driver/alsa-driver-1.0.7.ebuild155
-rw-r--r--media-sound/alsa-driver/files/alsa-driver-1.0.7-configure.patch1612
-rw-r--r--media-sound/alsa-driver/files/alsa-driver-1.0.7-ioctl32.patch329
-rw-r--r--media-sound/alsa-driver/files/alsa-driver-1.0.7-ioctl32.patch-r11372
-rw-r--r--media-sound/alsa-driver/files/digest-alsa-driver-1.0.7-r11
-rw-r--r--media-sound/alsa-driver/files/digest-alsa-driver-1.0.7-r21
-rw-r--r--media-sound/alsa-driver/files/digest-alsa-driver-1.0.7-r3 (renamed from media-sound/alsa-driver/files/digest-alsa-driver-1.0.7)0
11 files changed, 664 insertions, 2982 deletions
diff --git a/media-sound/alsa-driver/ChangeLog b/media-sound/alsa-driver/ChangeLog
index 051fdc22d239..6d238a57e7a1 100644
--- a/media-sound/alsa-driver/ChangeLog
+++ b/media-sound/alsa-driver/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for media-sound/alsa-driver
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-driver/ChangeLog,v 1.115 2004/12/01 00:48:27 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-driver/ChangeLog,v 1.116 2004/12/02 22:36:01 eradicator Exp $
+
+*alsa-driver-1.0.7-r3 (02 Dec 2004)
+
+ 02 Dec 2004; Jeremy Huddleston <eradicator@gentoo.org>
+ files/alsa-driver-1.0.7-configure.patch,
+ -files/alsa-driver-1.0.7-ioctl32.patch,
+ -files/alsa-driver-1.0.7-ioctl32.patch-r1, -alsa-driver-1.0.7-r1.ebuild,
+ -alsa-driver-1.0.7-r2.ebuild, +alsa-driver-1.0.7-r3.ebuild,
+ -alsa-driver-1.0.7.ebuild:
+ Fixing the configure patch to match what was committed upstream as the patch
+ we originally used had some problems.
30 Nov 2004; Jeremy Huddleston <eradicator@gentoo.org>
alsa-driver-1.0.7-r2.ebuild:
diff --git a/media-sound/alsa-driver/Manifest b/media-sound/alsa-driver/Manifest
index 6fcfbb2903d5..1643249b0bfe 100644
--- a/media-sound/alsa-driver/Manifest
+++ b/media-sound/alsa-driver/Manifest
@@ -1,23 +1,17 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-MD5 848a4d9ae99543d8d8e9e6211dbd8d59 ChangeLog 19652
-MD5 46f88ce4ab65513f63f868e186942482 alsa-driver-1.0.7.ebuild 4128
-MD5 a5f148f076f71d88e4128449ef38058c alsa-driver-1.0.7-r1.ebuild 3486
-MD5 e0650b0a1429abad33c26b1b7bde4913 alsa-driver-1.0.7-r2.ebuild 3520
+MD5 f4394c15f2a0e1df46e9894aaef5ad5a ChangeLog 20117
MD5 d388a1b0706024ddccccc99045b976f9 alsa-driver-0.9.8.ebuild 2341
+MD5 c90d709d2950c27a15371729fee82de8 alsa-driver-1.0.7-r3.ebuild 3433
MD5 e5de43659b629d1e9f0ee8d3f1864840 alsa-driver-1.0.3.ebuild 3363
MD5 a1eaeb2ae801daeb712c90c060e922dc metadata.xml 158
MD5 9f0283e4e9611766ad3110532d4976d7 alsa-driver-1.0.5a.ebuild 3603
MD5 45f95cf50aad5f544f0fa05dcf94d1ad alsa-driver-1.0.6a.ebuild 3501
-MD5 479ee887025f4ce7944adee1e4a6fdf3 files/digest-alsa-driver-1.0.7 71
-MD5 2d66a81aa4bef486ad5a40b392cac999 files/alsa-driver-1.0.7-configure.patch 31374
+MD5 0e3de515e49e01db460ca33e8cc55383 files/alsa-driver-1.0.7-configure.patch 21425
MD5 8c120f7730b91118d0a8148d2deb3a43 files/alsa-driver-0.9.8-au-fix.patch 1267
MD5 1d70561326ef89e94179634d92782610 files/alsa-driver-1.0.4-devfix.patch 2756
MD5 08af7cfec9cd33819c62880d6219f3a5 files/alsa-driver-1.0.5-devfix.patch 763
-MD5 034733ce45d34c261a5c9bb74679f77a files/alsa-driver-1.0.7-ioctl32.patch 8684
-MD5 076da8f043d1a5a5da1755af9cd78f8f files/alsa-driver-1.0.7-ioctl32.patch-r1 42290
-MD5 479ee887025f4ce7944adee1e4a6fdf3 files/digest-alsa-driver-1.0.7-r1 71
MD5 831a1a1097613c2444cc3e512ff09a01 files/alsa-driver-1.0.7-audigy71.patch 643
MD5 439dab13c036317c9b308b234ecf7290 files/digest-alsa-driver-0.9.8 71
MD5 e1b13905eac70fe728dcb85fcaac27a9 files/digest-alsa-driver-1.0.6a 72
@@ -26,14 +20,14 @@ MD5 27684bd356b1a43809d3f8c847a6abce files/alsa-driver-1.0.6a-kbuild.patch 575
MD5 f9d35aa6adca1137e05b1cb8852ff672 files/alsa-driver-1.0.6a-emu10k1-passthrough.patch 658
MD5 27ccbe36406f145c1d63725a53517233 files/makefile.patch 1122
MD5 deb0bfd8e2cfe0ba434fb5a820294502 files/digest-alsa-driver-1.0.5a 72
-MD5 479ee887025f4ce7944adee1e4a6fdf3 files/digest-alsa-driver-1.0.7-r2 71
MD5 a2ee6fa920bbac70835b4a58e5759e8c files/alsa-driver-1.0.5a-cs46xx-passthrough.patch 446
MD5 8bb31a005a1db2e306c51d017fd44e70 files/alsa-driver-1.0.5a-xbox-ac97.patch 721
MD5 4d7c4de4eaa3007e13360d7434ecb284 files/alsa-driver-1.0.7-ioctl32.patch-r2 44165
+MD5 479ee887025f4ce7944adee1e4a6fdf3 files/digest-alsa-driver-1.0.7-r3 71
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
-iD8DBQFBrSBUArHZZzCEUG0RAshzAJ40y4KtWJLEGTVuOGeX12t56IzQAACgiiIt
-+JSqQAmBFtkzR6knfoN2pZg=
-=HGkv
+iD8DBQFBr5jbArHZZzCEUG0RAnfJAJ9EW2Zq2V24x9kh1U3NqC2Zoams1gCdHEsP
+eDJn9dtRx+XTnwmc448Wdcc=
+=7Xmi
-----END PGP SIGNATURE-----
diff --git a/media-sound/alsa-driver/alsa-driver-1.0.7-r1.ebuild b/media-sound/alsa-driver/alsa-driver-1.0.7-r1.ebuild
deleted file mode 100644
index 1434423cd5e0..000000000000
--- a/media-sound/alsa-driver/alsa-driver-1.0.7-r1.ebuild
+++ /dev/null
@@ -1,139 +0,0 @@
-# Copyright 1999-2004 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.7-r1.ebuild,v 1.8 2004/11/29 13:57:34 eradicator Exp $
-
-IUSE="oss doc"
-
-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/${P}.tar.bz2"
-
-LICENSE="GPL-2 LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~ia64 ~mips ~ppc ~sparc ~x86"
-
-RDEPEND="virtual/modutils
- ~media-sound/alsa-headers-${PV}"
-
-DEPEND="${RDEPEND}
- sys-devel/patch
- virtual/linux-sources
- >=sys-devel/autoconf-2.50
- sys-apps/debianutils"
-
-PROVIDE="virtual/alsa"
-
-src_unpack() {
- unpack ${A}
-
- cd ${S}
- epatch ${FILESDIR}/${PN}-1.0.5-devfix.patch
- epatch ${FILESDIR}/${PN}-1.0.5a-cs46xx-passthrough.patch
-
- [ "${PROFILE_ARCH}" == "xbox" ] && \
- epatch ${FILESDIR}/${PN}-1.0.5a-xbox-ac97.patch
-
- convert_to_m ${S}/Makefile
-
- # Fix ioctl32 support
- epatch ${FILESDIR}/${P}-ioctl32.patch-r1
-
- # Fix audigy 7.1 detection on some cards... bug #72433
- epatch ${FILESDIR}/${P}-audigy71.patch
-
- # Fix order of configure operations so the kernel compiler isn't used
- # for tests.
- epatch ${FILESDIR}/${PN}-1.0.7-configure.patch
- export WANT_AUTOCONF=2.5
- autoconf
-}
-
-src_compile() {
- # Should fix bug #46901
- is-flag "-malign-double" && filter-flags "-fomit-frame-pointer"
-
- econf `use_with oss` \
- --with-kernel="${KV_DIR}" \
- --with-build="${KER_DIR}" \
- --with-isapnp=yes \
- --with-sequencer=yes \
- --with-cards="${ALSA_CARDS}" || die "econf failed"
-
- # linux-mod_src_compile doesn't work well with alsa
- unset ARCH
- # -j1 : see bug #71028
- emake -j1 || die "Parallel Make Failed"
-
- 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() {
- dodir /usr/include/sound
- make DESTDIR=${D} install || die
-
- # Provided by alsa-headers now
- rm -rf ${D}/usr/include/sound
-
- # We have our own scripts in alsa-utils
- test -e ${D}/etc/init.d/alsasound && rm ${D}/etc/init.d/alsasound
- test -e ${D}/etc/rc.d/init.d/alsasound && rm ${D}/etc/rc.d/init.d/alsasound
-
- dodoc CARDS-STATUS INSTALL 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
-}
-
-pkg_setup() {
- CONFIG_CHECK="CONFIG_SOUND !CONFIG_SND"
-
- linux-mod_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
- #
- [ -z "${ALSA_CARDS}" ] && ALSA_CARDS=all
-}
-
-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
-}
diff --git a/media-sound/alsa-driver/alsa-driver-1.0.7-r2.ebuild b/media-sound/alsa-driver/alsa-driver-1.0.7-r3.ebuild
index 7e143e41446f..1cca05b433ca 100644
--- a/media-sound/alsa-driver/alsa-driver-1.0.7-r2.ebuild
+++ b/media-sound/alsa-driver/alsa-driver-1.0.7-r3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 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.7-r2.ebuild,v 1.2 2004/12/01 00:48:27 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-driver/alsa-driver-1.0.7-r3.ebuild,v 1.1 2004/12/02 22:36:01 eradicator Exp $
IUSE="oss doc"
@@ -16,8 +16,6 @@ SRC_URI="mirror://alsaproject/driver/${P}.tar.bz2"
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
#KEYWORDS="~alpha ~amd64 ~ia64 ~mips ~ppc ~sparc ~x86"
-# 1.0.7-r2 just has more ioctl32 fixes from upstream cvs
-KEYWORDS="~amd64 ~mips sparc"
RDEPEND="virtual/modutils
~media-sound/alsa-headers-${PV}"
diff --git a/media-sound/alsa-driver/alsa-driver-1.0.7.ebuild b/media-sound/alsa-driver/alsa-driver-1.0.7.ebuild
deleted file mode 100644
index 6887e78d8039..000000000000
--- a/media-sound/alsa-driver/alsa-driver-1.0.7.ebuild
+++ /dev/null
@@ -1,155 +0,0 @@
-# Copyright 1999-2004 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.7.ebuild,v 1.11 2004/11/24 20:16:06 eradicator Exp $
-
-IUSE="oss doc"
-
-inherit kernel-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/${P}.tar.bz2"
-
-LICENSE="GPL-2 LGPL-2.1"
-SLOT="${KV}"
-KEYWORDS="~alpha ~amd64 ~ia64 ~mips ~ppc ~sparc ~x86"
-
-RDEPEND="virtual/modutils
- ~media-sound/alsa-headers-${PV}"
-
-DEPEND="${RDEPEND}
- sys-devel/patch
- virtual/linux-sources
- >=sys-devel/autoconf-2.50
- sys-apps/debianutils"
-
-PROVIDE="virtual/alsa"
-
-# 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
-#
-[ -z "${ALSA_CARDS}" ] && ALSA_CARDS=all
-
-src_unpack() {
- unpack ${A}
-
- cd ${S}
- epatch ${FILESDIR}/${PN}-1.0.5-devfix.patch
- epatch ${FILESDIR}/${PN}-1.0.5a-cs46xx-passthrough.patch
-
- if [ "${PROFILE_ARCH}" == "xbox" ]; then
- epatch ${FILESDIR}/${PN}-1.0.5a-xbox-ac97.patch
- fi
-
- if kernel-mod_is_2_5_kernel || (kernel-mod_is_2_6_kernel && [ ${KV_PATCH} -lt 6 ]); then
- FULL_KERNEL_PATH="${ROOT}/usr/src/${KV_DIR}"
-
- if ! [ -d "${FULL_KERNEL_PATH}" ]; then
- eerror "An error seems to have occurred. We looked in ${FULL_KERNEL_PATH} for your kernel sources, but we didn't see them."
- die "ALSA driver configuration failure."
- fi
-
- einfo "A 2.5 or 2.6 kernel was detected. We are copying the kernel source tree from"
- einfo "${FULL_KERNEL_PATH} to ${T}/linux"
- einfo "because the alsa-driver build process overwrites files in the 2.6.x kernel tree."
-
- # Copy everything over to our tmp dir...
- cp -a ${FULL_KERNEL_PATH} ${T}/linux
- else
- # SUBDIRS -> M
- epatch ${FILESDIR}/${PN}-1.0.6a-kbuild.patch
- fi
-
- # Fix ioctl32 support
- epatch ${FILESDIR}/${P}-ioctl32.patch
-
- # Fix order of configure operations so the kernel compiler isn't used
- # for tests.
- epatch ${FILESDIR}/${PN}-1.0.7-configure.patch
- export WANT_AUTOCONF=2.5
- autoconf
-}
-
-src_compile() {
- # Default ARCH & kernel path to set in compilation and make
- KER_DIR=${KERNEL_DIR}
-
- # If we're using a 2.5 or 2.6 kernel, use our copied kernel tree.
- if [ -d "${T}/linux" ]; then
- KER_DIR="${T}/linux"
- fi
-
- econf `use_with oss` \
- --with-kernel="${KER_DIR}" \
- --with-build="${KER_DIR}" \
- --with-isapnp=yes \
- --with-sequencer=yes \
- --with-cards="${ALSA_CARDS}" || die "econf failed"
-
- # Should fix bug #46901
- is-flag "-malign-double" && filter-flags "-fomit-frame-pointer"
-
- unset ARCH
- # -j1 : see bug #71028
- emake -j1 || die "Parallel Make Failed"
-
- if use doc; then
- cd ${S}/scripts
- emake || die
-
- cd ${S}/doc/DocBook
- emake || die
- fi
-}
-
-
-src_install() {
- dodir /usr/include/sound
- make DESTDIR=${D} install || die
-
- # Provided by alsa-headers now
- rm -rf ${D}/usr/include/sound
-
- # We have our own scripts in alsa-utils
- test -e ${D}/etc/init.d/alsasound && rm ${D}/etc/init.d/alsasound
- test -e ${D}/etc/rc.d/init.d/alsasound && rm ${D}/etc/rc.d/init.d/alsasound
-
- dodoc CARDS-STATUS INSTALL 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
-}
-
-pkg_postinst() {
- if [ "${ROOT}" = / ]
- then
- [ -x /usr/sbin/update-modules ] && /usr/sbin/update-modules
- fi
-
- 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
-}
diff --git a/media-sound/alsa-driver/files/alsa-driver-1.0.7-configure.patch b/media-sound/alsa-driver/files/alsa-driver-1.0.7-configure.patch
index 772b0d559fee..daeada8fac89 100644
--- a/media-sound/alsa-driver/files/alsa-driver-1.0.7-configure.patch
+++ b/media-sound/alsa-driver/files/alsa-driver-1.0.7-configure.patch
@@ -1,1019 +1,695 @@
---- configure.in.orig 2004-11-19 02:48:35.682952736 -0800
-+++ configure.in 2004-11-19 02:48:39.089434872 -0800
-@@ -734,366 +734,6 @@
- CONFIG_ISA=probe
+--- alsa-driver-1.0.7/configure.in 2004-11-11 10:28:34.000000000 -0800
++++ alsa/alsa-driver/configure.in 2004-12-01 07:45:56.000000000 -0800
+@@ -106,7 +106,14 @@
+ KERNEL_INC="-I$CONFIG_SND_KERNELDIR/include"
+ MAKE_ADDS=""
+ if test -n "$kernelbuild"; then
+- KERNEL_INC="-I$kernelbuild/include -I$kernelbuild/include2 $KERNEL_INC"
++ kpath=""
++ if test -d "$kernelbuild/include"; then
++ kpath="-I$kernelbuild/include"
++ fi
++ if test -d "$kernelbuild/include2"; then
++ kpath="$kpath -I$kernelbuild/include2"
++ fi
++ KERNEL_INC="$kpath $KERNEL_INC"
+ MAKE_ADDS="O=$kernelbuild"
fi
-
--dnl Check processor type...
--AC_MSG_CHECKING(for processor type)
--CONFIG_X86=
--CONFIG_ALPHA=
--CONFIG_L3=
--CONFIG_ARM=
--CONFIG_PPC=
--CONFIG_SPARC32=
--CONFIG_SPARC64=
--CONFIG_SBUS=
--CONFIG_SND_BIT32_EMUL=
--processor=""
--rm -f processor.id
--ac_save_CFLAGS="$CFLAGS"
--CFLAGS="$CFLAGS $KERNEL_INC $HACK_KERNEL_INC"
--if test -n "$kernelbuild" -a -f "$kernelbuild/include/linux/autoconf.h"; then
-- KERNDIR=$kernelbuild
--else
-- KERNDIR=$CONFIG_SND_KERNELDIR
--fi
--AC_TRY_RUN([
--#include <stdio.h>
--#include "$KERNDIR/include/linux/autoconf.h"
--int main(void) {
-- FILE *file = fopen("processor.id", "w+");
-- if (file == NULL)
-- exit(1);
--#if defined(CONFIG_M386)
-- fprintf(file, "i386");
--#elif defined(CONFIG_M486)
-- fprintf(file, "i486");
--#elif defined(CONFIG_M586)
-- fprintf(file, "i586");
--#elif defined(CONFIG_X86_64) /* this needs to be chcked before K8 */
-- fprintf(file, "x86_64");
--#elif defined(CONFIG_M586TSC)
-- fprintf(file, "i586tsc");
--#elif defined(CONFIG_M586MMX)
-- fprintf(file, "i586mmx");
--#elif defined(CONFIG_M686) || defined(CONFIG_MPENTIUMII) || defined(CONFIG_MPENTIUMIII) || defined(CONFIG_MPENTIUM4) || defined(CONFIG_MPENTIUMM)
-- fprintf(file, "i686");
--#elif defined(CONFIG_MK6)
-- fprintf(file, "k6");
--#elif defined(CONFIG_MK7)
-- fprintf(file, "k7");
--#elif defined(CONFIG_MK8)
-- fprintf(file, "k8");
--#elif defined(CONFIG_MCRUSOE)
-- fprintf(file, "crusoe");
--#elif defined(CONFIG_MWINCHIPC6) || defined(CONFIG_MWINCHIP2) || defined(CONFIG_MWINCHIP3D)
-- fprintf(file, "mwinchip");
--#elif defined(CONFIG_MCYRIXIII)
-- fprintf(file, "mcyrixiii");
--#elif defined(CONFIG_IA64)
-- fprintf(file, "ia64");
--#elif defined(CONFIG_ALPHA_GENERIC)
-- fprintf(file, "alpha_generic");
--#elif defined(CONFIG_ALPHA_SX164)
-- fprintf(file, "alpha_sx164");
--#elif defined(CONFIG_ALPHA_PYXIS)
-- fprintf(file, "alpha_pyxis");
--#elif defined(CONFIG_ALPHA_POLARIS)
-- fprintf(file, "alpha_polaris");
--#elif defined(CONFIG_EV4) || defined(CONFIG_ALPHA_EV4)
-- fprintf(file, "alpha_ev4");
--#elif defined(CONFIG_EV5) || defined(CONFIG_ALPHA_EV5)
-- fprintf(file, "alpha_ev5");
--#elif defined(CONFIG_EV6) || defined(CONFIG_ALPHA_EV6)
-- fprintf(file, "alpha_ev6");
--#elif defined(CONFIG_ALPHA_NONAME) || defined(CONFIG_ALPHA)
-- fprintf(file, "alpha_noname");
--#elif defined(CONFIG_PPC64)
-- fprintf(file, "ppc64");
--#elif defined(CONFIG_PPC)
-- fprintf(file, "ppc");
--#elif defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_R6000)
-- fprintf(file, "mips");
--#elif defined(CONFIG_CPU_R4300) || defined(CONFIG_CPU_R4X00)
-- fprintf(file, "mips");
--#elif defined(CONFIG_CPU_R5000) || defined(CONFIG_CPU_NEVADA)
-- fprintf(file, "mips");
--#elif defined(CONFIG_CPU_R8000) || defined(CONFIG_CPU_R10000)
-- fprintf(file, "mips");
--#elif defined(CONFIG_SPARC32)
-- fprintf(file, "sparc");
--#elif defined(CONFIG_SPARC64)
-- fprintf(file, "sparc64");
--#elif defined(CONFIG_ARCH_SA1100)
-- fprintf(file, "sa1100");
--#elif defined(CONFIG_ARCH_PXA)
-- fprintf(file, "pxa");
--#elif defined(CONFIG_PARISC)
-- fprintf(file, "parisc");
--#else
-- fclose(file);
-- exit(1);
--#endif
-- fclose(file);
-- exit(0);
--}
--],
-- processor=`cat processor.id`;AC_MSG_RESULT($processor),
-- AC_MSG_RESULT("unknown");processor="",
-- AC_MSG_RESULT("unknown");processor=""
--)
--CFLAGS="$ac_save_CFLAGS"
--rm -f processor.id
--c_opts=""
+ HACK_KERNEL_INC=""
+@@ -746,6 +753,7 @@
+ CONFIG_SBUS=
+ CONFIG_SND_BIT32_EMUL=
+ processor=""
++KCC=$CROSS_COMPILE$CC
+ rm -f processor.id
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $KERNEL_INC $HACK_KERNEL_INC"
+@@ -842,32 +850,39 @@
+ CFLAGS="$ac_save_CFLAGS"
+ rm -f processor.id
+ c_opts=""
-LD=ld
--case "$processor" in
-- i386*)
-- c_opts="-march=i386"
-- ;;
-- i486*)
-- c_opts="-march=i486"
-- ;;
-- i586* | mwinchip)
-- c_opts="-march=i586"
-- ;;
-- i686*)
-- c_opts="-march=i686"
-- ;;
-- k6)
++KLD=ld
++ARCH=
+ case "$processor" in
+ i386*)
++ ARCH=i386
+ c_opts="-march=i386"
+ ;;
+ i486*)
++ ARCH=i386
+ c_opts="-march=i486"
+ ;;
+ i586* | mwinchip)
++ ARCH=i386
+ c_opts="-march=i586"
+ ;;
+ i686*)
++ ARCH=i386
+ c_opts="-march=i686"
+ ;;
+ k6)
- if $CC -march=k6 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
-- c_opts="-march=k6"
-- else
-- c_opts="-march=i586"
-- fi
-- ;;
-- k7|k8)
++ ARCH=i386
++ if $KCC -march=k6 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
+ c_opts="-march=k6"
+ else
+ c_opts="-march=i586"
+ fi
+ ;;
+ k7|k8)
- if $CC -march=athlon -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
-- c_opts="-march=athlon"
-- else
++ ARCH=i386
++ if $KCC -march=athlon -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
+ c_opts="-march=athlon"
+ else
- if $CC -falign-functions=0 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
-- c_opts="-march=i686 -falign-functions=4"
-- else
-- c_opts="-march=i686 -malign-functions=4"
-- fi
-- fi
-- ;;
-- crusoe)
++ if $KCC -falign-functions=0 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
+ c_opts="-march=i686 -falign-functions=4"
+ else
+ c_opts="-march=i686 -malign-functions=4"
+@@ -875,35 +890,39 @@
+ fi
+ ;;
+ crusoe)
- if $CC -falign-functions=0 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
-- c_opts="-march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0"
-- else
-- c_opts="-march=i686 -malign-functions=0 -malign-jumps=0 -malign-loops=0"
-- fi
-- ;;
-- mcyrixiii)
++ ARCH=i386
++ if $KCC -falign-functions=0 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
+ c_opts="-march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0"
+ else
+ c_opts="-march=i686 -malign-functions=0 -malign-jumps=0 -malign-loops=0"
+ fi
+ ;;
+ mcyrixiii)
- if $CC -march=c3 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
-- c_opts="-march=c3"
-- else
-- c_opts="-march=i486"
-- fi
++ ARCH=i386
++ if $KCC -march=c3 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
+ c_opts="-march=c3"
+ else
+ c_opts="-march=i486"
+ fi
- if $CC -falign-functions=0 -falign-jumps=0 -falign-loops=0 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
-- c_opts="$c_opts -falign-functions=0 -falign-jumps=0 -falign-loops=0"
-- else
-- c_opts="$c_opts -malign-functions=0 -malign-jumps=0 -malign-loops=0"
-- fi
-- ;;
-- ia64)
-- c_opts="-Wa,-x -ffixed-r13 -mfixed-range=f10-f15,f32-f127 -funwind-tables -falign-functions=32"
-- test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-- CONFIG_IA64=y
-- ;;
-- alpha*)
-- c_opts="-mno-fp-regs -ffixed-8"
++ if $KCC -falign-functions=0 -falign-jumps=0 -falign-loops=0 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
+ c_opts="$c_opts -falign-functions=0 -falign-jumps=0 -falign-loops=0"
+ else
+ c_opts="$c_opts -malign-functions=0 -malign-jumps=0 -malign-loops=0"
+ fi
+ ;;
+ ia64)
++ ARCH=ia64
+ c_opts="-Wa,-x -ffixed-r13 -mfixed-range=f10-f15,f32-f127 -funwind-tables -falign-functions=32"
+ test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
+ CONFIG_IA64=y
+ ;;
+ alpha*)
++ ARCH=alpha
+ c_opts="-mno-fp-regs -ffixed-8"
- if $CC -mcpu=pca56 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then
-- have_pca56=yes
-- fi
++ if $KCC -mcpu=pca56 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then
+ have_pca56=yes
+ fi
- if $CC -mcpu=ev5 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then
-- case "$processor" in
-- alpha_generic)
-- c_opts="$c_opts -mcpu=ev5"
-- ;;
-- alpha_sx164|alpha_polaris)
-- if test x$have_pca56 = xyes; then
-- c_opts="$c_opts -mcpu=pca56"
-- else
-- c_opts="$c_opts -mcpu=ev56"
-- fi
-- ;;
-- alpha_pyxis)
-- c_opts="$c_opts -mcpu=ev56"
-- ;;
-- alpha_ev4)
-- c_opts="$c_opts -mcpu=ev4"
-- ;;
-- alpha_ev6)
++ if $KCC -mcpu=ev5 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then
+ case "$processor" in
+ alpha_generic)
+ c_opts="$c_opts -mcpu=ev5"
+@@ -922,7 +941,7 @@
+ c_opts="$c_opts -mcpu=ev4"
+ ;;
+ alpha_ev6)
- if $CC -mcpu=ev6 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then
-- c_opts="$c_opts -mcpu=ev6"
-- elif test x$have_pca56 = xyes; then
-- c_opts="$c_opts -mcpu=pca56"
-- else
-- c_opts="$c_opts -mcpu=ev56"
-- fi
-- ;;
-- esac
-- fi
-- c_opts="$c_opts -Wa,-mev6"
-- processor="alpha"
-- CONFIG_ALPHA=y
-- cat > $SRCDIR/include/asm/hack-current.h << EOF
--#ifndef _ALPHA_CURRENT_H
--#define _ALPHA_CURRENT_H
--
--extern struct task_struct *current;
--
--#endif /* !(_ALPHA_CURRENT_H) */
--EOF
-- HACK_KERNEL_INC="$HACK_KERNEL_INC --include $SRCDIR/include/asm/hack-current.h"
-- ;;
-- ppc)
-- c_opts="-D__powerpc__ -fsigned-char -fno-builtin -msoft-float -ffixed-r2 -Wno-uninitialized -mmultiple -mstring"
-- CONFIG_PPC=y
-- test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-- ;;
-- ppc64)
-- c_opts="-D__powerpc__ -fsigned-char -msoft-float -Wno-uninitialized -mminimal-toc -fno-builtin"
-- CONFIG_SND_BIT32_EMUL=m
-- test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-- ;;
-- mips*)
++ if $KCC -mcpu=ev6 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then
+ c_opts="$c_opts -mcpu=ev6"
+ elif test x$have_pca56 = xyes; then
+ c_opts="$c_opts -mcpu=pca56"
+@@ -946,22 +965,25 @@
+ HACK_KERNEL_INC="$HACK_KERNEL_INC --include $SRCDIR/include/asm/hack-current.h"
+ ;;
+ ppc)
++ ARCH=ppc
+ c_opts="-D__powerpc__ -fsigned-char -fno-builtin -msoft-float -ffixed-r2 -Wno-uninitialized -mmultiple -mstring"
+ CONFIG_PPC=y
+ test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
+ ;;
+ ppc64)
++ ARCH=ppc64
+ c_opts="-D__powerpc__ -fsigned-char -msoft-float -Wno-uninitialized -mminimal-toc -fno-builtin"
+ CONFIG_SND_BIT32_EMUL=m
+ test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
+ ;;
+ mips*)
- if $CC -mtune=mips32 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then
-- c_opts="-mtune=mips32"
-- else
-- c_opts="-mcpu=r4600"
-- fi
++ ARCH=mips
++ if $KCC -mtune=mips32 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then
+ c_opts="-mtune=mips32"
+ else
+ c_opts="-mcpu=r4600"
+ fi
- if $CC -mips32 -mabi=32 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then
-- c_opts="$c_opts -mips32 -mabi=32"
-- else
-- c_opts="$_opts -mips2"
-- fi
-- c_opts="$c_opts -G 0 -fno-pic -mno-abicalls -mlong-calls"
-- processor="mips"
-- test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-- ;;
-- sparc)
-- CONFIG_SPARC32=y
-- IS_EGCS=n
-- NEW_GAS=n
++ if $KCC -mips32 -mabi=32 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then
+ c_opts="$c_opts -mips32 -mabi=32"
+ else
+ c_opts="$_opts -mips2"
+@@ -971,13 +993,14 @@
+ test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
+ ;;
+ sparc)
++ ARCH=sparc
+ CONFIG_SPARC32=y
+ IS_EGCS=n
+ NEW_GAS=n
- test $CC -m32 -S -o /dev/null -xc /dev/null >/dev/null 2>&1 && IS_EGCS=y
- test $LD --version 2>&1 | grep 'elf64_sparc' > /dev/null && NEW_GAS=y
-- if test $NEW_GAS = y; then
++ $KCC -m32 -S -o /dev/null -xc /dev/null >/dev/null 2>&1 || IS_EGCS=y
++ $CROSS_COMPILE$KLD -V 2>&1 | grep 'elf64_sparc' > /dev/null && NEW_GAS=y
+ if test $NEW_GAS = y; then
- LD="$LD -m elf32_sparc"
-- fi
-- if test $IS_EGCS = y; then
-- c_opts="-mno-fpu -fcall-used-g5 -fcall-used-g7"
-- else
-- c_opts="-m32 -mno-fpu -fcall-used-g5 -fcall-used-g7"
-- fi
-- processor="sparc";
-- test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-- ;;
-- sparc64)
-- CONFIG_SPARC64=y
++ KLD="$KLD -m elf32_sparc"
+ fi
+ if test $IS_EGCS = y; then
+ c_opts="-mno-fpu -fcall-used-g5 -fcall-used-g7"
+@@ -988,19 +1011,19 @@
+ test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
+ ;;
+ sparc64)
++ ARCH=sparc64
+ CONFIG_SPARC64=y
- CC=gcc
- test gcc -m64 -S -o /dev/null -xc /dev/null >/dev/null 2>&1 || CC=sparc64-linux-gcc
-- NEW_GCC=n
-- NEW_GAS=n
-- CC_UNDECL=""
++ $KCC -m64 -S -o /dev/null -xc /dev/null >/dev/null 2>&1 || KCC=sparc64-linux-gcc
+ NEW_GCC=n
+ NEW_GAS=n
+ CC_UNDECL=""
- $CC -m64 -mcmodel=medlow -S -o /dev/null -xc /dev/null >/dev/null 2>&1 && NEW_GCC=y
- $LD --version 2>&1 | grep 'elf64_sparc' > /dev/null && NEW_GAS=y
- $CC -c -x assembler /dev/null -Wa,--help | grep undeclared-regs > /dev/null || CC_UNDECL="-Wa,--undeclared-regs"
-- if test $NEW_GAS != y; then
++ $KCC -m64 -mcmodel=medlow -S -o /dev/null -xc /dev/null >/dev/null 2>&1 && NEW_GCC=y
++ $CROSS_COMPILE$KLD -V 2>&1 | grep 'elf64_sparc' > /dev/null && NEW_GAS=y
++ $KCC -c -x assembler /dev/null -Wa,--help | grep undeclared-regs > /dev/null || CC_UNDECL="-Wa,--undeclared-regs"
+ if test $NEW_GAS != y; then
- LD=sparc64-linux-ld
-- else
++ KLD=sparc64-linux-ld
+ else
- LD="$LD -m elf64_sparc"
-- fi
-- if test $NEW_GCC=y; then
-- c_opts="-m64 -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare $CC_UNDECL"
-- else
-- c_opts="-mno-fpu -mtune=ultrasparc -mmedlow -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare"
-- fi
-- processor="sparc64"
-- CONFIG_SND_BIT32_EMUL=m
-- test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-- ;;
-- x86_64)
++ KLD="$KLD -m elf64_sparc"
+ fi
+ if test $NEW_GCC=y; then
+ c_opts="-m64 -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare $CC_UNDECL"
+@@ -1012,24 +1035,28 @@
+ test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
+ ;;
+ x86_64)
- LD="ld -m elf_x86_64 -e stext"
-- c_opts="-mno-red-zone -mcmodel=kernel -fno-reorder-blocks -fno-strength-reduce -finline-limit=2000"
-- CONFIG_SND_BIT32_EMUL=m
-- test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-- ;;
-- sa1100)
-- c_opts="-march=armv4 -mtune=strongarm1100 -msoft-float"
-- CONFIG_ARM=y
-- CONFIG_L3=y
-- test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-- ;;
-- pxa)
-- c_opts="-O2 -mapcs-32 -march=armv4 -Wa,-mxscale -mtune=strongarm -mshort-load-bytes -msoft-float"
-- CONFIG_ARM=y
-- CONFIG_L3=y
-- test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-- ;;
-- parisc)
-- c_opts="-mno-space-regs -mfast-indirect-calls -mschedule=7200 -mdisable-fpregs"
-- test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-- ;;
-- *)
-- processor="unknown"
-- test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-- ;;
--esac
--
--dnl set ia32 (X86)
--case "$processor" in
-- i?86*|k?|crusoe|mcyrixiii|mwinchip)
++ ARCH=x86_64
++ KLD="ld -m elf_x86_64 -e stext"
+ c_opts="-mno-red-zone -mcmodel=kernel -fno-reorder-blocks -fno-strength-reduce -finline-limit=2000"
+ CONFIG_SND_BIT32_EMUL=m
+ test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
+ ;;
+ sa1100)
++ ARCH=arm
+ c_opts="-march=armv4 -mtune=strongarm1100 -msoft-float"
+ CONFIG_ARM=y
+ CONFIG_L3=y
+ test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
+ ;;
+ pxa)
++ ARCH=arm
+ c_opts="-O2 -mapcs-32 -march=armv4 -Wa,-mxscale -mtune=strongarm -mshort-load-bytes -msoft-float"
+ CONFIG_ARM=y
+ CONFIG_L3=y
+ test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
+ ;;
+ parisc)
++ ARCH=parisc
+ c_opts="-mno-space-regs -mfast-indirect-calls -mschedule=7200 -mdisable-fpregs"
+ test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
+ ;;
+@@ -1042,15 +1069,23 @@
+ dnl set ia32 (X86)
+ case "$processor" in
+ i?86*|k?|crusoe|mcyrixiii|mwinchip)
- if $CC -mpreferred-stack-boundary=2 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
-- c_opts="-mpreferred-stack-boundary=2 $c_opts"
-- CONFIG_X86=y
-- fi
-- if test -d $CONFIG_SND_KERNELDIR/include/asm-i386/mach-default; then
-- AC_MSG_CHECKING(for i386 machine type)
-- machine="default"
-- ac_save_CFLAGS="$CFLAGS"
++ if $KCC -mpreferred-stack-boundary=2 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
+ c_opts="-mpreferred-stack-boundary=2 $c_opts"
+ CONFIG_X86=y
+ fi
++ mach_dir=""
+ if test -d $CONFIG_SND_KERNELDIR/include/asm-i386/mach-default; then
++ mach_dir="$CONFIG_SND_KERNELDIR/include/asm-i386"
++ elif test -n "$kernelbuild" -a -d $kernelbuild/include/asm-i386/mach-default; then
++ mach_dir="$kernelbuild/include/asm-i386"
++ elif test -n "$kernelbuild" -a -d $kernelbuild/include2/asm-i386/mach-default; then
++ mach_dir="$kernelbuild/include2/asm-i386"
++ fi
++ if test -n "$mach_dir"; then
+ AC_MSG_CHECKING(for i386 machine type)
+ machine="default"
+ ac_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -I$CONFIG_SND_KERNELDIR/include"
-- rm -f machine.id
-- if test -n "$kernelbuild" -a -f "$kernelbuild/include/linux/autoconf.h"; then
-- KERNDIR=$kernelbuild
-- else
-- KERNDIR=$CONFIG_SND_KERNELDIR
-- fi
-- AC_TRY_RUN([
--#include <stdio.h>
--#include "$KERNDIR/include/linux/autoconf.h"
--int main(void) {
-- FILE *file = fopen("machine.id", "w+");
-- if (file == NULL)
-- exit(1);
--#if defined(CONFIG_X86_VOYAGER)
-- fprintf(file, "voyager");
--#elif defined(CONFIG_X86_VISWS)
-- fprintf(file, "visws");
--#elif defined(CONFIG_X86_NUMAQ)
-- fprintf(file, "numaq");
--#elif defined(CONFIG_X86_BIGSMP)
-- fprintf(file, "bigsmp");
--#elif defined(CONFIG_X86_SUMMIT)
-- fprintf(file, "summit");
--#elif defined(CONFIG_X86_PC9800)
-- fprintf(file, "pc9800");
--#else
-- fprintf(file, "default");
--#endif
-- fclose(file);
-- exit(0);
--}
--],
-- machine=`cat machine.id`;AC_MSG_RESULT($machine))
-- CFLAGS="$ac_save_CFLAGS"
-- rm -f machine.id
++ CFLAGS="$CFLAGS $KERNEL_INC $HACK_KERNEL_INC"
+ rm -f machine.id
+ if test -n "$kernelbuild" -a -f "$kernelbuild/include/linux/autoconf.h"; then
+ KERNDIR=$kernelbuild
+@@ -1086,7 +1121,7 @@
+ machine=`cat machine.id`;AC_MSG_RESULT($machine))
+ CFLAGS="$ac_save_CFLAGS"
+ rm -f machine.id
- KERNEL_INC="$KERNEL_INC -I$CONFIG_SND_KERNELDIR/include/asm-i386/mach-$machine"
-- fi
-- ;;
--esac
--
--dnl ia32 and alpha
--test "$CONFIG_ISA" = "probe" && CONFIG_ISA=y
--
- dnl Check for SBUS support for sparc...
- if test -n "$CONFIG_SPARC32" -o -n "$CONFIG_SPARC64"; then
++ KERNEL_INC="$KERNEL_INC -I$mach_dir/mach-$machine"
+ fi
+ ;;
+ esac
+@@ -1099,9 +1134,19 @@
CHECK_KERNEL_CONFIG(CONFIG_SBUS, [SBUS support in kernel])
-@@ -1692,154 +1332,514 @@
- rm include/linux/pnp.h
- fi
- else
-- if test ! -f include/linux/pnp.h; then
-- echo "Symlinking <linux/pnp.h>..."
-- mkdir -p include/linux
-- ln -sf ../../support/pnp/pnp.h include/linux/pnp.h
-+ if test ! -f include/linux/pnp.h; then
-+ echo "Symlinking <linux/pnp.h>..."
-+ mkdir -p include/linux
-+ ln -sf ../../support/pnp/pnp.h include/linux/pnp.h
-+ fi
-+fi
-+
-+dnl Check for version...
-+AC_MSG_CHECKING(for driver version)
-+AC_DEFINE_UNQUOTED(CONFIG_SND_VERSION, "$CONFIG_SND_VERSION")
-+AC_SUBST(CONFIG_SND_VERSION)
-+CONFIG_SND_DATE=""
-+AC_DEFINE_UNQUOTED(CONFIG_SND_DATE, "$CONFIG_SND_DATE")
-+AC_SUBST(CONFIG_SND_DATE)
-+AC_MSG_RESULT($CONFIG_SND_VERSION)
-+
-+dnl Check for sequencer support...
-+AC_MSG_CHECKING(for sequencer support)
-+AC_ARG_WITH(sequencer,
-+ [ --with-sequencer=yes,no driver will (not) be compiled with sequencer support],
-+ sequencer="$withval", sequencer="yes")
-+CONFIG_SND_SEQUENCER=""
-+if test "$sequencer" = "yes"; then
-+ CONFIG_SND_SEQUENCER="m"
-+fi
-+AC_SUBST(CONFIG_SND_SEQUENCER)
-+if test "$CONFIG_SND_SEQUENCER" = "m"; then
-+ AC_DEFINE(CONFIG_SND_SEQUENCER_MODULE)
-+ AC_DEFINE(CONFIG_SND_SEQ_DUMMY_MODULE)
-+ AC_MSG_RESULT(yes)
-+else
-+ AC_MSG_RESULT(no)
-+fi
-+
-+dnl Check for OSS/Free emulation...
-+AC_MSG_CHECKING(for OSS/Free emulation)
-+AC_ARG_WITH(oss,
-+ [ --with-oss=no,yes driver will (not) be compiled with OSS/Free emulation],
-+ ossemul="$withval", ossemul="yes")
-+CONFIG_SND_OSSEMUL=""
-+if test "$ossemul" = "yes"; then
-+ CONFIG_SND_OSSEMUL="y"
-+fi
-+if test "$CONFIG_SND_OSSEMUL" = "y"; then
-+ AC_DEFINE(CONFIG_SND_OSSEMUL)
-+ AC_DEFINE(CONFIG_SND_MIXER_OSS_MODULE)
-+ AC_DEFINE(CONFIG_SND_PCM_OSS_MODULE)
-+ if test "$CONFIG_SND_SEQUENCER" = "m"; then
-+ AC_DEFINE(CONFIG_SND_SEQUENCER_OSS)
+ fi
+
++if test -n "$CONFIG_SND_BIT32_EMUL"; then
++ if test "$kversion.$kpatchlevel" = "2.6"; then
++ CHECK_KERNEL_CONFIG(CONFIG_COMPAT, [32bit compat support])
++ if test -z "$CONFIG_COMPAT"; then
++ CONFIG_SND_BIT32_EMUL=
++ fi
+ fi
-+ AC_MSG_RESULT(yes)
-+else
-+ AC_MSG_RESULT(no)
+fi
+
-+dnl Check for RTC timer support...
-+AC_MSG_CHECKING(for RTC callback support in kernel)
-+rtcsup="0"
+ c_opts="-O2 $c_opts"
+ AC_SUBST(processor)
+-AC_SUBST(LD)
++AC_SUBST(ARCH)
++AC_SUBST(KLD)
+ AC_SUBST(CONFIG_X86)
+ AC_SUBST(CONFIG_ALPHA)
+ AC_SUBST(CONFIG_L3)
+@@ -1207,7 +1252,9 @@
+ AC_MSG_CHECKING(for strlcpy)
+ strlcpy="0"
+ ac_save_CFLAGS="$CFLAGS"
++ac_save_CC="$CC"
+ CFLAGS="-Wall -Werror $CFLAGS $KERNEL_INC $HACK_KERNEL_INC -nostdinc -iwithprefix include"
++CC=$KCC
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/config.h>
+@@ -1222,6 +1269,7 @@
+ AC_MSG_RESULT("unknown");strlcpy="0"
+ )
+ CFLAGS=$ac_save_CFLAGS
++CC=$ac_save_CC
+ CONFIG_HAVE_STRLCPY=$strlcpy
+ dnl AC_SUBST(CONFIG_HAVE_STRLCPY)
+ if test "$CONFIG_HAVE_STRLCPY" = "1"; then
+@@ -1232,7 +1280,9 @@
+ AC_MSG_CHECKING(for snprintf)
+ snprintf="0"
+ ac_save_CFLAGS="$CFLAGS"
++ac_save_CC="$CC"
+ CFLAGS="-Wall -Werror $CFLAGS $KERNEL_INC $HACK_KERNEL_INC -nostdinc -iwithprefix include"
++CC=$KCC
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/config.h>
+@@ -1246,6 +1296,7 @@
+ AC_MSG_RESULT("unknown");snprintf="0"
+ )
+ CFLAGS=$ac_save_CFLAGS
++CC=$ac_save_CC
+ CONFIG_HAVE_SNPRINTF=$snprintf
+ dnl AC_SUBST(CONFIG_HAVE_SNPRINTF)
+ if test "$CONFIG_HAVE_SNPRINTF" = "1"; then
+@@ -1256,7 +1307,9 @@
+ AC_MSG_CHECKING(for scnprintf)
+ scnprintf="0"
+ ac_save_CFLAGS="$CFLAGS"
++ac_save_CC="$CC"
+ CFLAGS="-Wall -Werror $CFLAGS $KERNEL_INC $HACK_KERNEL_INC -nostdinc -iwithprefix include"
++CC=$KCC
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/config.h>
+@@ -1270,6 +1323,7 @@
+ AC_MSG_RESULT("unknown");scnprintf="0"
+ )
+ CFLAGS=$ac_save_CFLAGS
++CC=$ac_save_CC
+ CONFIG_HAVE_SCNPRINTF=$scnprintf
+ dnl AC_SUBST(CONFIG_HAVE_SCNPRINTF)
+ if test "$CONFIG_HAVE_SCNPRINTF" = "1"; then
+@@ -1280,7 +1334,9 @@
+ AC_MSG_CHECKING(for sscanf)
+ sscanf="0"
+ ac_save_CFLAGS="$CFLAGS"
++ac_save_CC="$CC"
+ CFLAGS="-Wall -Werror $CFLAGS $KERNEL_INC $HACK_KERNEL_INC -nostdinc -iwithprefix include"
++CC=$KCC
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/config.h>
+@@ -1294,6 +1350,7 @@
+ AC_MSG_RESULT("unknown");sscanf="0"
+ )
+ CFLAGS=$ac_save_CFLAGS
++CC=$ac_save_CC
+ CONFIG_HAVE_SSCANF=$sscanf
+ dnl AC_SUBST(CONFIG_HAVE_SSCANF)
+ if test "$CONFIG_HAVE_SSCANF" = "1"; then
+@@ -1304,7 +1361,9 @@
+ AC_MSG_CHECKING(for vmalloc_to_page)
+ vmalloc_to_page="0"
+ ac_save_CFLAGS="$CFLAGS"
++ac_save_CC="$CC"
+ CFLAGS="$CFLAGS $KERNEL_INC $HACK_KERNEL_INC -nostdinc -iwithprefix include"
++CC=$KCC
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/config.h>
+@@ -1319,6 +1378,7 @@
+ AC_MSG_RESULT("unknown");vmalloc_to_page="0"
+ )
+ CFLAGS=$ac_save_CFLAGS
++CC=$ac_save_CC
+ CONFIG_HAVE_VMALLOC_TO_PAGE=$vmalloc_to_page
+ dnl AC_SUBST(CONFIG_HAVE_VMALLOC_TO_PAGE)
+ if test "$CONFIG_HAVE_VMALLOC_TO_PAGE" = "1"; then
+@@ -1329,7 +1389,9 @@
+ AC_MSG_CHECKING(for old kmod)
+ old_kmod="0"
+ ac_save_CFLAGS="$CFLAGS"
++ac_save_CC="$CC"
+ CFLAGS="$CFLAGS -Wall $KERNEL_INC $HACK_KERNEL_INC -nostdinc -iwithprefix include"
++CC=$KCC
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/config.h>
+@@ -1342,6 +1404,7 @@
+ AC_MSG_RESULT("unknown");old_kmod="1"
+ )
+ CFLAGS=$ac_save_CFLAGS
++CC=$ac_save_CC
+ CONFIG_HAVE_OLD_REQUEST_MODULE=$old_kmod
+ dnl AC_SUBST(CONFIG_HAVE_OLD_REQUEST_MODULE)
+ if test "$CONFIG_HAVE_OLD_REQUEST_MODULE" = "1"; then
+@@ -1352,7 +1415,9 @@
+ AC_MSG_CHECKING(for PDE)
+ pde_defined="0"
+ ac_save_CFLAGS="$CFLAGS"
++ac_save_CC="$CC"
+ CFLAGS="$CFLAGS -Wall $KERNEL_INC $HACK_KERNEL_INC -nostdinc -iwithprefix include"
++CC=$KCC
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/config.h>
+@@ -1367,6 +1432,7 @@
+ AC_MSG_RESULT("unknown");pde_defined="0"
+ )
+ CFLAGS=$ac_save_CFLAGS
++CC=$ac_save_CC
+ CONFIG_HAVE_PDE=$pde_defined
+ dnl AC_SUBST(CONFIG_HAVE_PDE)
+ if test "$CONFIG_HAVE_PDE" = "1"; then
+@@ -1377,7 +1443,9 @@
+ AC_MSG_CHECKING(for pci_set_consistent_dma_mask)
+ pci_consistent_defined="0"
+ ac_save_CFLAGS="$CFLAGS"
++ac_save_CC="$CC"
+ CFLAGS="$CFLAGS -Wall $KERNEL_INC $HACK_KERNEL_INC -nostdinc -iwithprefix include"
++CC=$KCC
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/config.h>
+@@ -1391,16 +1459,45 @@
+ AC_MSG_RESULT("unknown");pci_consistent_defined="0"
+ )
+ CFLAGS=$ac_save_CFLAGS
++CC=$ac_save_CC
+ CONFIG_HAVE_PCI_CONSISTENT_DMA_MASK=$pci_consistent_defined
+ if test "$CONFIG_HAVE_PCI_CONSISTENT_DMA_MASK" = "1"; then
+ AC_DEFINE(CONFIG_HAVE_PCI_CONSISTENT_DMA_MASK)
+ fi
+
++dnl Check for pci_consistent_set_dma_mask()
++AC_MSG_CHECKING(for pci_dev_present)
++pci_consistent_defined="0"
+ac_save_CFLAGS="$CFLAGS"
-+CFLAGS="$CFLAGS $KERNEL_INC $HACK_KERNEL_INC -nostdinc -iwithprefix include"
-+AC_TRY_RUN([
-+#include <linux/autoconf.h>
-+#if defined(__alpha__) || (!defined(CONFIG_RTC) && !defined(CONFIG_RTC_MODULE))
-+int main(void) { exit(1); }
-+#else
++ac_save_CC="$CC"
++CFLAGS="$CFLAGS -Wall $KERNEL_INC $HACK_KERNEL_INC -nostdinc -iwithprefix include"
++CC=$KCC
++AC_TRY_COMPILE([
+#define __KERNEL__
-+#include <linux/version.h>
+#include <linux/config.h>
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 2, 12) /* FIXME: which 2.2.x kernel? */
-+#include <linux/rtc.h>
-+#else
-+#include <linux/mc146818rtc.h>
-+#endif
-+int main(void)
-+{
-+ rtc_task_t *cb = 0;
-+ exit(0);
-+}
-+#endif
++#include <linux/pci.h>
++],[
++ int (*func)();
++ func = pci_dev_present;
+],
-+ AC_MSG_RESULT("yes");rtcsup="m",
-+ AC_MSG_RESULT("no");rtcsup="",
-+ AC_MSG_RESULT("unknown");rtcsup=""
++ AC_MSG_RESULT("yes");pci_dev_present_defined="1",
++ AC_MSG_RESULT("no");pci_dev_present_defined="0",
++ AC_MSG_RESULT("unknown");pci_dev_present_defined="0"
+)
-+CFLAGS="$ac_save_CFLAGS"
-+CONFIG_SND_RTCTIMER=$rtcsup
-+AC_SUBST(CONFIG_SND_RTCTIMER)
-+test "$CONFIG_SND_RTCTIMER" = "m" && AC_DEFINE(CONFIG_SND_RTCTIMER_MODULE)
-+CONFIG_RTC=$CONFIG_SND_RTCTIMER
-+AC_SUBST(CONFIG_RTC)
-+
-+dnl Check for procfs
-+CHECK_KERNEL_CONFIG(CONFIG_PROC_FS, [Procfs support])
-+AC_SUBST(CONFIG_PROC_FS)
-+
-+dnl Check for USB
-+CHECK_KERNEL_CONFIG(CONFIG_USB, [USB support])
-+if test "$CONFIG_USB" != "y"; then
-+ CHECK_KERNEL_CONFIG(CONFIG_USB_MODULE, [USB module support])
-+ CONFIG_USB=$CONFIG_USB_MODULE
++CFLAGS=$ac_save_CFLAGS
++CC=$ac_save_CC
++CONFIG_HAVE_PCI_DEV_PRESENT=$pci_dev_present_defined
++if test "$CONFIG_HAVE_PCI_DEV_PRESENT" = "1"; then
++ AC_DEFINE(CONFIG_HAVE_PCI_DEV_PRESENT)
+fi
-+AC_SUBST(CONFIG_USB)
+
-+dnl PCMCIA stuff
-+AC_ARG_WITH(pcmcia,
-+ [ --with-pcmcia=kernel,external support kernel PCMCIA driver or external PCMCIA driver],
-+ pcmcia="$withval", pcmcia="kernel")
-+AC_ARG_WITH(pcmcia_root,
-+ [ --with-pcmcia-root=dir specify the root directory of external PCMCIA source-tree],
-+ pcmciaroot="$withval", pcmciaroot="")
-+EXTRA_INCLUDES=""
-+if test "$pcmcia" = "kernel"; then
-+ echo "checking for kernel PCMCIA"
-+ CHECK_KERNEL_CONFIG(CONFIG_PCMCIA, [PCMCIA support])
-+ if test "$CONFIG_PCMCIA" != "y"; then
-+ CHECK_KERNEL_CONFIG(CONFIG_PCMCIA_MODULE, [PCMCIA module support])
-+ CONFIG_PCMCIA=$CONFIG_PCMCIA_MODULE
-+ fi
-+else
-+ echo "checking for external PCMCIA"
-+ if test "$pcmciaroot" = ""; then
-+ AC_MSG_ERROR(Please set the PCMCIA root directory via --with-pcmcia-root option)
- fi
-+ if test ! -d "$pcmciaroot"; then
-+ AC_MSG_ERROR(PCMCIA root $pcmciaroot is not a directory)
-+ fi
-+ echo "PCMCIA root directory is $pcmciaroot"
-+ EXTRA_INCLUDES="-I$pcmciaroot/include"
-+ CONFIG_PCMCIA=y
+ dnl Check for tty->count is the atomic type
+ AC_MSG_CHECKING(for tty->count is the atomic type)
+ tty_count_atomic="0"
+ ac_save_CFLAGS="$CFLAGS"
++ac_save_CC="$CC"
+ CFLAGS="$CFLAGS -Wall $KERNEL_INC $HACK_KERNEL_INC -nostdinc -iwithprefix include"
++CC=$KCC
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/config.h>
+@@ -1414,6 +1511,7 @@
+ AC_MSG_RESULT("unknown");tty_count_atomic="0"
+ )
+ CFLAGS=$ac_save_CFLAGS
++CC=$ac_save_CC
+ CONFIG_HAVE_TTY_COUNT_ATOMIC=$tty_count_atomic
+ if test "$CONFIG_HAVE_TTY_COUNT_ATOMIC" = "1"; then
+ AC_DEFINE(CONFIG_HAVE_TTY_COUNT_ATOMIC)
+@@ -1424,7 +1522,9 @@
+ AC_MSG_CHECKING(for video_get_drvdata)
+ video_get_drvdata="0"
+ ac_save_CFLAGS="$CFLAGS"
++ac_save_CC="$CC"
+ CFLAGS="$CFLAGS $KERNEL_INC $HACK_KERNEL_INC -nostdinc -iwithprefix include"
++CC=$KCC
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/config.h>
+@@ -1438,6 +1538,7 @@
+ AC_MSG_RESULT("unknown");video_get_drvdata="0"
+ )
+ CFLAGS=$ac_save_CFLAGS
++CC=$ac_save_CC
+ CONFIG_HAVE_VIDEO_GET_DRVDATA=$video_get_drvdata
+ dnl AC_SUBST(CONFIG_HAVE_VIDEO_GET_DRVDATA)
+ if test "$CONFIG_HAVE_VIDEO_GET_DRVDATA" = "1"; then
+@@ -1449,7 +1550,9 @@
+ AC_MSG_CHECKING(for remap_pfn_range)
+ remap_pfn_range="0"
+ ac_save_CFLAGS="$CFLAGS"
++ac_save_CC="$CC"
+ CFLAGS="$CFLAGS $KERNEL_INC $HACK_KERNEL_INC -nostdinc -iwithprefix include"
++CC=$KCC
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/config.h>
+@@ -1465,6 +1568,7 @@
+ AC_MSG_RESULT("unknown");remap_pfn_range="0"
+ )
+ CFLAGS=$ac_save_CFLAGS
++CC=$ac_save_CC
+ if test "$remap_pfn_range" = "1"; then
+ AC_DEFINE(CONFIG_HAVE_REMAP_PFN_RANGE)
fi
-+
-+AC_SUBST(CONFIG_PCMCIA)
-
--dnl Check for version...
--AC_MSG_CHECKING(for driver version)
--AC_DEFINE_UNQUOTED(CONFIG_SND_VERSION, "$CONFIG_SND_VERSION")
--AC_SUBST(CONFIG_SND_VERSION)
--CONFIG_SND_DATE=""
--AC_DEFINE_UNQUOTED(CONFIG_SND_DATE, "$CONFIG_SND_DATE")
--AC_SUBST(CONFIG_SND_DATE)
--AC_MSG_RESULT($CONFIG_SND_VERSION)
-+dnl Check for PC98 architecture support...
-+CHECK_KERNEL_CONFIG(CONFIG_X86_PC9800, [PC9800 support in kernel])
-+AC_SUBST(CONFIG_X86_PC9800)
-
--dnl Check for sequencer support...
--AC_MSG_CHECKING(for sequencer support)
--AC_ARG_WITH(sequencer,
-- [ --with-sequencer=yes,no driver will (not) be compiled with sequencer support],
-- sequencer="$withval", sequencer="yes")
--CONFIG_SND_SEQUENCER=""
--if test "$sequencer" = "yes"; then
-- CONFIG_SND_SEQUENCER="m"
-+dnl Check for parallel port support
-+if test "$kversion.$kpatchlevel" = "2.2"; then
-+ CONFIG_PARPORT=""
-+else
-+ CHECK_KERNEL_CONFIG(CONFIG_PARPORT, [parallel port support])
-+ if test "$CONFIG_PARPORT" != "y"; then
-+ CHECK_KERNEL_CONFIG(CONFIG_PARPORT_MODULE, [parallel port module support])
-+ CONFIG_PARPORT=$CONFIG_PARPORT_MODULE
-+ fi
+@@ -1473,7 +1577,9 @@
+ AC_MSG_CHECKING(for new remap_page_range)
+ new_remap="0"
+ ac_save_CFLAGS="$CFLAGS"
++ac_save_CC="$CC"
+ CFLAGS="$CFLAGS $KERNEL_INC $HACK_KERNEL_INC -nostdinc -iwithprefix include"
++CC=$KCC
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/config.h>
+@@ -1489,6 +1595,7 @@
+ AC_MSG_RESULT("unknown");new_remap="0"
+ )
+ CFLAGS=$ac_save_CFLAGS
++CC=$ac_save_CC
+ if test "$new_remap" != "1"; then
+ AC_DEFINE(CONFIG_OLD_REMAP_PAGE_RANGE)
fi
--AC_SUBST(CONFIG_SND_SEQUENCER)
--if test "$CONFIG_SND_SEQUENCER" = "m"; then
-- AC_DEFINE(CONFIG_SND_SEQUENCER_MODULE)
-- AC_DEFINE(CONFIG_SND_SEQ_DUMMY_MODULE)
-- AC_MSG_RESULT(yes)
-+AC_SUBST(CONFIG_PARPORT)
-+
-+dnl Check processor type...
-+AC_MSG_CHECKING(for processor type)
-+CONFIG_X86=
-+CONFIG_ALPHA=
-+CONFIG_L3=
-+CONFIG_ARM=
-+CONFIG_PPC=
-+CONFIG_SPARC32=
-+CONFIG_SPARC64=
-+CONFIG_SBUS=
-+CONFIG_SND_BIT32_EMUL=
-+processor=""
-+rm -f processor.id
-+ac_save_CFLAGS="$CFLAGS"
-+CFLAGS="$CFLAGS $KERNEL_INC $HACK_KERNEL_INC"
-+if test -n "$kernelbuild" -a -f "$kernelbuild/include/linux/autoconf.h"; then
-+ KERNDIR=$kernelbuild
- else
-- AC_MSG_RESULT(no)
-+ KERNDIR=$CONFIG_SND_KERNELDIR
+@@ -1498,7 +1605,9 @@
+ AC_MSG_CHECKING(for kcalloc)
+ kcalloc="0"
+ ac_save_CFLAGS="$CFLAGS"
++ac_save_CC="$CC"
+ CFLAGS="$CFLAGS $KERNEL_INC $HACK_KERNEL_INC -nostdinc -iwithprefix include"
++CC=$KCC
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/config.h>
+@@ -1512,6 +1621,7 @@
+ AC_MSG_RESULT("unknown");kcalloc="0"
+ )
+ CFLAGS=$ac_save_CFLAGS
++CC=$ac_save_CC
+ CONFIG_HAVE_KCALLOC=$kcalloc
+ dnl AC_SUBST(CONFIG_HAVE_KCALLOC)
+ if test "$CONFIG_HAVE_KCALLOC" = "1"; then
+@@ -1522,7 +1632,9 @@
+ AC_MSG_CHECKING(for saved_config_space in pci_dev)
+ pci_saved_config="0"
+ ac_save_CFLAGS="$CFLAGS"
++ac_save_CC="$CC"
+ CFLAGS="$CFLAGS $KERNEL_INC $HACK_KERNEL_INC -nostdinc -iwithprefix include"
++CC=$KCC
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/config.h>
+@@ -1536,6 +1648,7 @@
+ AC_MSG_RESULT("unknown");pci_saved_config="0"
+ )
+ CFLAGS=$ac_save_CFLAGS
++CC=$ac_save_CC
+ CONFIG_HAVE_PCI_SAVED_CONFIG=$pci_saved_config
+ dnl AC_SUBST(CONFIG_HAVE_PCI_SAVED_CONFIG)
+ if test "$CONFIG_HAVE_PCI_SAVED_CONFIG" = "1"; then
+@@ -1547,7 +1660,9 @@
+ AC_MSG_CHECKING(for new pci_save_state)
+ new_pci_save_state="0"
+ ac_save_CFLAGS="$CFLAGS"
++ac_save_CC="$CC"
+ CFLAGS="$CFLAGS $KERNEL_INC $HACK_KERNEL_INC -nostdinc -iwithprefix include"
++CC=$KCC
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/config.h>
+@@ -1561,6 +1676,7 @@
+ AC_MSG_RESULT("unknown");new_pci_save_state="0"
+ )
+ CFLAGS=$ac_save_CFLAGS
++CC=$ac_save_CC
+ if test "$new_pci_save_state" = "1"; then
+ AC_DEFINE(CONFIG_HAVE_NEW_PCI_SAVE_STATE)
fi
-+AC_TRY_RUN([
-+#include <stdio.h>
-+#include "$KERNDIR/include/linux/autoconf.h"
-+int main(void) {
-+ FILE *file = fopen("processor.id", "w+");
-+ if (file == NULL)
-+ exit(1);
-+#if defined(CONFIG_M386)
-+ fprintf(file, "i386");
-+#elif defined(CONFIG_M486)
-+ fprintf(file, "i486");
-+#elif defined(CONFIG_M586)
-+ fprintf(file, "i586");
-+#elif defined(CONFIG_X86_64) /* this needs to be chcked before K8 */
-+ fprintf(file, "x86_64");
-+#elif defined(CONFIG_M586TSC)
-+ fprintf(file, "i586tsc");
-+#elif defined(CONFIG_M586MMX)
-+ fprintf(file, "i586mmx");
-+#elif defined(CONFIG_M686) || defined(CONFIG_MPENTIUMII) || defined(CONFIG_MPENTIUMIII) || defined(CONFIG_MPENTIUM4) || defined(CONFIG_MPENTIUMM)
-+ fprintf(file, "i686");
-+#elif defined(CONFIG_MK6)
-+ fprintf(file, "k6");
-+#elif defined(CONFIG_MK7)
-+ fprintf(file, "k7");
-+#elif defined(CONFIG_MK8)
-+ fprintf(file, "k8");
-+#elif defined(CONFIG_MCRUSOE)
-+ fprintf(file, "crusoe");
-+#elif defined(CONFIG_MWINCHIPC6) || defined(CONFIG_MWINCHIP2) || defined(CONFIG_MWINCHIP3D)
-+ fprintf(file, "mwinchip");
-+#elif defined(CONFIG_MCYRIXIII)
-+ fprintf(file, "mcyrixiii");
-+#elif defined(CONFIG_IA64)
-+ fprintf(file, "ia64");
-+#elif defined(CONFIG_ALPHA_GENERIC)
-+ fprintf(file, "alpha_generic");
-+#elif defined(CONFIG_ALPHA_SX164)
-+ fprintf(file, "alpha_sx164");
-+#elif defined(CONFIG_ALPHA_PYXIS)
-+ fprintf(file, "alpha_pyxis");
-+#elif defined(CONFIG_ALPHA_POLARIS)
-+ fprintf(file, "alpha_polaris");
-+#elif defined(CONFIG_EV4) || defined(CONFIG_ALPHA_EV4)
-+ fprintf(file, "alpha_ev4");
-+#elif defined(CONFIG_EV5) || defined(CONFIG_ALPHA_EV5)
-+ fprintf(file, "alpha_ev5");
-+#elif defined(CONFIG_EV6) || defined(CONFIG_ALPHA_EV6)
-+ fprintf(file, "alpha_ev6");
-+#elif defined(CONFIG_ALPHA_NONAME) || defined(CONFIG_ALPHA)
-+ fprintf(file, "alpha_noname");
-+#elif defined(CONFIG_PPC64)
-+ fprintf(file, "ppc64");
-+#elif defined(CONFIG_PPC)
-+ fprintf(file, "ppc");
-+#elif defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_R6000)
-+ fprintf(file, "mips");
-+#elif defined(CONFIG_CPU_R4300) || defined(CONFIG_CPU_R4X00)
-+ fprintf(file, "mips");
-+#elif defined(CONFIG_CPU_R5000) || defined(CONFIG_CPU_NEVADA)
-+ fprintf(file, "mips");
-+#elif defined(CONFIG_CPU_R8000) || defined(CONFIG_CPU_R10000)
-+ fprintf(file, "mips");
-+#elif defined(CONFIG_SPARC32)
-+ fprintf(file, "sparc");
-+#elif defined(CONFIG_SPARC64)
-+ fprintf(file, "sparc64");
-+#elif defined(CONFIG_ARCH_SA1100)
-+ fprintf(file, "sa1100");
-+#elif defined(CONFIG_ARCH_PXA)
-+ fprintf(file, "pxa");
-+#elif defined(CONFIG_PARISC)
-+ fprintf(file, "parisc");
-+#else
-+ fclose(file);
-+ exit(1);
-+#endif
-+ fclose(file);
-+ exit(0);
-+}
-+],
-+ processor=`cat processor.id`;AC_MSG_RESULT($processor),
-+ AC_MSG_RESULT("unknown");processor="",
-+ AC_MSG_RESULT("unknown");processor=""
-+)
-+CFLAGS="$ac_save_CFLAGS"
-+rm -f processor.id
-+c_opts=""
-+LD=ld
-+case "$processor" in
-+ i386*)
-+ c_opts="-march=i386"
-+ ;;
-+ i486*)
-+ c_opts="-march=i486"
-+ ;;
-+ i586* | mwinchip)
-+ c_opts="-march=i586"
-+ ;;
-+ i686*)
-+ c_opts="-march=i686"
-+ ;;
-+ k6)
-+ if $CC -march=k6 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
-+ c_opts="-march=k6"
-+ else
-+ c_opts="-march=i586"
-+ fi
-+ ;;
-+ k7|k8)
-+ if $CC -march=athlon -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
-+ c_opts="-march=athlon"
-+ else
-+ if $CC -falign-functions=0 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
-+ c_opts="-march=i686 -falign-functions=4"
-+ else
-+ c_opts="-march=i686 -malign-functions=4"
-+ fi
-+ fi
-+ ;;
-+ crusoe)
-+ if $CC -falign-functions=0 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
-+ c_opts="-march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0"
-+ else
-+ c_opts="-march=i686 -malign-functions=0 -malign-jumps=0 -malign-loops=0"
-+ fi
-+ ;;
-+ mcyrixiii)
-+ if $CC -march=c3 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
-+ c_opts="-march=c3"
-+ else
-+ c_opts="-march=i486"
-+ fi
-+ if $CC -falign-functions=0 -falign-jumps=0 -falign-loops=0 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
-+ c_opts="$c_opts -falign-functions=0 -falign-jumps=0 -falign-loops=0"
-+ else
-+ c_opts="$c_opts -malign-functions=0 -malign-jumps=0 -malign-loops=0"
-+ fi
-+ ;;
-+ ia64)
-+ c_opts="-Wa,-x -ffixed-r13 -mfixed-range=f10-f15,f32-f127 -funwind-tables -falign-functions=32"
-+ test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-+ CONFIG_IA64=y
-+ ;;
-+ alpha*)
-+ c_opts="-mno-fp-regs -ffixed-8"
-+ if $CC -mcpu=pca56 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then
-+ have_pca56=yes
-+ fi
-+ if $CC -mcpu=ev5 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then
-+ case "$processor" in
-+ alpha_generic)
-+ c_opts="$c_opts -mcpu=ev5"
-+ ;;
-+ alpha_sx164|alpha_polaris)
-+ if test x$have_pca56 = xyes; then
-+ c_opts="$c_opts -mcpu=pca56"
-+ else
-+ c_opts="$c_opts -mcpu=ev56"
-+ fi
-+ ;;
-+ alpha_pyxis)
-+ c_opts="$c_opts -mcpu=ev56"
-+ ;;
-+ alpha_ev4)
-+ c_opts="$c_opts -mcpu=ev4"
-+ ;;
-+ alpha_ev6)
-+ if $CC -mcpu=ev6 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then
-+ c_opts="$c_opts -mcpu=ev6"
-+ elif test x$have_pca56 = xyes; then
-+ c_opts="$c_opts -mcpu=pca56"
-+ else
-+ c_opts="$c_opts -mcpu=ev56"
-+ fi
-+ ;;
-+ esac
-+ fi
-+ c_opts="$c_opts -Wa,-mev6"
-+ processor="alpha"
-+ CONFIG_ALPHA=y
-+ cat > $SRCDIR/include/asm/hack-current.h << EOF
-+#ifndef _ALPHA_CURRENT_H
-+#define _ALPHA_CURRENT_H
-+
-+extern struct task_struct *current;
-
--dnl Check for OSS/Free emulation...
--AC_MSG_CHECKING(for OSS/Free emulation)
--AC_ARG_WITH(oss,
-- [ --with-oss=no,yes driver will (not) be compiled with OSS/Free emulation],
-- ossemul="$withval", ossemul="yes")
--CONFIG_SND_OSSEMUL=""
--if test "$ossemul" = "yes"; then
-- CONFIG_SND_OSSEMUL="y"
--fi
--if test "$CONFIG_SND_OSSEMUL" = "y"; then
-- AC_DEFINE(CONFIG_SND_OSSEMUL)
-- AC_DEFINE(CONFIG_SND_MIXER_OSS_MODULE)
-- AC_DEFINE(CONFIG_SND_PCM_OSS_MODULE)
-- if test "$CONFIG_SND_SEQUENCER" = "m"; then
-- AC_DEFINE(CONFIG_SND_SEQUENCER_OSS)
-- fi
-- AC_MSG_RESULT(yes)
--else
-- AC_MSG_RESULT(no)
--fi
-+#endif /* !(_ALPHA_CURRENT_H) */
-+EOF
-+ HACK_KERNEL_INC="$HACK_KERNEL_INC --include $SRCDIR/include/asm/hack-current.h"
-+ ;;
-+ ppc)
-+ c_opts="-D__powerpc__ -fsigned-char -fno-builtin -msoft-float -ffixed-r2 -Wno-uninitialized -mmultiple -mstring"
-+ CONFIG_PPC=y
-+ test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-+ ;;
-+ ppc64)
-+ c_opts="-D__powerpc__ -fsigned-char -msoft-float -Wno-uninitialized -mminimal-toc -fno-builtin"
-+ CONFIG_SND_BIT32_EMUL=m
-+ test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-+ ;;
-+ mips*)
-+ if $CC -mtune=mips32 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then
-+ c_opts="-mtune=mips32"
-+ else
-+ c_opts="-mcpu=r4600"
-+ fi
-+ if $CC -mips32 -mabi=32 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then
-+ c_opts="$c_opts -mips32 -mabi=32"
-+ else
-+ c_opts="$_opts -mips2"
-+ fi
-+ c_opts="$c_opts -G 0 -fno-pic -mno-abicalls -mlong-calls"
-+ processor="mips"
-+ test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-+ ;;
-+ sparc)
-+ CONFIG_SPARC32=y
-+ IS_EGCS=n
-+ NEW_GAS=n
-+ test $CC -m32 -S -o /dev/null -xc /dev/null >/dev/null 2>&1 && IS_EGCS=y
-+ test $LD --version 2>&1 | grep 'elf64_sparc' > /dev/null && NEW_GAS=y
-+ if test $NEW_GAS = y; then
-+ LD="$LD -m elf32_sparc"
-+ fi
-+ if test $IS_EGCS = y; then
-+ c_opts="-mno-fpu -fcall-used-g5 -fcall-used-g7"
-+ else
-+ c_opts="-m32 -mno-fpu -fcall-used-g5 -fcall-used-g7"
-+ fi
-+ processor="sparc";
-+ test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-+ ;;
-+ sparc64)
-+ CONFIG_SPARC64=y
-+ CC=gcc
-+ test gcc -m64 -S -o /dev/null -xc /dev/null >/dev/null 2>&1 || CC=sparc64-linux-gcc
-+ NEW_GCC=n
-+ NEW_GAS=n
-+ CC_UNDECL=""
-+ $CC -m64 -mcmodel=medlow -S -o /dev/null -xc /dev/null >/dev/null 2>&1 && NEW_GCC=y
-+ $LD --version 2>&1 | grep 'elf64_sparc' > /dev/null && NEW_GAS=y
-+ $CC -c -x assembler /dev/null -Wa,--help | grep undeclared-regs > /dev/null || CC_UNDECL="-Wa,--undeclared-regs"
-+ if test $NEW_GAS != y; then
-+ LD=sparc64-linux-ld
-+ else
-+ LD="$LD -m elf64_sparc"
-+ fi
-+ if test $NEW_GCC=y; then
-+ c_opts="-m64 -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare $CC_UNDECL"
-+ else
-+ c_opts="-mno-fpu -mtune=ultrasparc -mmedlow -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare"
-+ fi
-+ processor="sparc64"
-+ CONFIG_SND_BIT32_EMUL=m
-+ test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-+ ;;
-+ x86_64)
-+ LD="ld -m elf_x86_64 -e stext"
-+ c_opts="-mno-red-zone -mcmodel=kernel -fno-reorder-blocks -fno-strength-reduce -finline-limit=2000"
-+ CONFIG_SND_BIT32_EMUL=m
-+ test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-+ ;;
-+ sa1100)
-+ c_opts="-march=armv4 -mtune=strongarm1100 -msoft-float"
-+ CONFIG_ARM=y
-+ CONFIG_L3=y
-+ test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-+ ;;
-+ pxa)
-+ c_opts="-O2 -mapcs-32 -march=armv4 -Wa,-mxscale -mtune=strongarm -mshort-load-bytes -msoft-float"
-+ CONFIG_ARM=y
-+ CONFIG_L3=y
-+ test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-+ ;;
-+ parisc)
-+ c_opts="-mno-space-regs -mfast-indirect-calls -mschedule=7200 -mdisable-fpregs"
-+ test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-+ ;;
-+ *)
-+ processor="unknown"
-+ test "$CONFIG_ISA" = "probe" && CONFIG_ISA=
-+ ;;
-+esac
-
--dnl Check for RTC timer support...
--AC_MSG_CHECKING(for RTC callback support in kernel)
--rtcsup="0"
--ac_save_CFLAGS="$CFLAGS"
--CFLAGS="$CFLAGS $KERNEL_INC $HACK_KERNEL_INC -nostdinc -iwithprefix include"
+@@ -1570,7 +1686,9 @@
+ AC_MSG_CHECKING(for acpi_register_gsi)
+ acpi_register_gsi="0"
+ ac_save_CFLAGS="$CFLAGS"
++ac_save_CC="$CC"
+ CFLAGS="$CFLAGS $KERNEL_INC $HACK_KERNEL_INC -nostdinc -iwithprefix include"
++CC=$KCC
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/config.h>
+@@ -1584,6 +1702,7 @@
+ AC_MSG_RESULT("unknown");acpi_register_gsi="0"
+ )
+ CFLAGS=$ac_save_CFLAGS
++CC=$ac_save_CC
+ CONFIG_HAVE_ACPI_REGISTER_GSI=$acpi_register_gsi
+ dnl AC_SUBST(CONFIG_HAVE_ACPI_REGISTER_GSI)
+ if test "$CONFIG_HAVE_ACPI_REGISTER_GSI" = "1"; then
+@@ -1597,7 +1716,9 @@
+ AC_MSG_CHECKING(for old kill_fasync)
+ oldkfasync="0"
+ ac_save_CFLAGS="$CFLAGS"
++ac_save_CC="$CC"
+ CFLAGS="$CFLAGS $KERNEL_INC $HACK_KERNEL_INC"
++CC=$KCC
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include "$CONFIG_SND_KERNELDIR/include/linux/config.h"
+@@ -1615,6 +1736,7 @@
+ AC_MSG_RESULT("unknown");oldkfasync="0"
+ )
+ CFLAGS=$ac_save_CFLAGS
++CC=$ac_save_CC
+ CONFIG_OLD_KILL_FASYNC=$oldkfasync
+ dnl AC_SUBST(CONFIG_OLD_KILL_FASYNC)
+ if test "$CONFIG_OLD_KILL_FASYNC" = "1"; then
+@@ -1625,7 +1747,9 @@
+ AC_MSG_CHECKING(for dma_addr_t)
+ dma_addr_t="0"
+ ac_save_CFLAGS="$CFLAGS"
++ac_save_CC="$CC"
+ CFLAGS="$CFLAGS $KERNEL_INC $HACK_KERNEL_INC"
++CC=$KCC
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include "$CONFIG_SND_KERNELDIR/include/linux/config.h"
+@@ -1638,6 +1762,7 @@
+ AC_MSG_RESULT("unknown");dma_addr_t="0"
+ )
+ CFLAGS=$ac_save_CFLAGS
++CC=$ac_save_CC
+ CONFIG_HAVE_DMA_ADDR_T=$dma_addr_t
+ dnl AC_SUBST(CONFIG_HAVE_DMA_ADDR_T)
+ if test "$CONFIG_HAVE_DMA_ADDR_T" = "1"; then
+@@ -1648,7 +1773,9 @@
+ AC_MSG_CHECKING(for MUTEX macros)
+ have_mutex_macros="0"
+ ac_save_CFLAGS="$CFLAGS"
++ac_save_CC="$CC"
+ CFLAGS="$CFLAGS $KERNEL_INC $HACK_KERNEL_INC"
++CC=$KCC
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include "$CONFIG_SND_KERNELDIR/include/linux/config.h"
+@@ -1664,6 +1791,7 @@
+ AC_MSG_RESULT("unknown");have_mutex_macros="0"
+ )
+ CFLAGS=$ac_save_CFLAGS
++CC=$ac_save_CC
+ CONFIG_HAVE_MUTEX_MACROS=$have_mutex_macros
+ dnl AC_SUBST(CONFIG_HAVE_MUTEX_MACROS)
+ if test "$CONFIG_HAVE_MUTEX_MACROS" = "1"; then
+@@ -1751,25 +1879,20 @@
+ AC_MSG_CHECKING(for RTC callback support in kernel)
+ rtcsup="0"
+ ac_save_CFLAGS="$CFLAGS"
++ac_save_CC=$CC
+ CFLAGS="$CFLAGS $KERNEL_INC $HACK_KERNEL_INC -nostdinc -iwithprefix include"
-AC_TRY_RUN([
-#include <linux/autoconf.h>
-#if defined(__alpha__) || (!defined(CONFIG_RTC) && !defined(CONFIG_RTC_MODULE))
-int main(void) { exit(1); }
-#else
--#define __KERNEL__
++CC=$KCC
++AC_TRY_COMPILE([
+ #define __KERNEL__
-#include <linux/version.h>
--#include <linux/config.h>
+ #include <linux/config.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 2, 12) /* FIXME: which 2.2.x kernel? */
--#include <linux/rtc.h>
-+dnl set ia32 (X86)
-+case "$processor" in
-+ i?86*|k?|crusoe|mcyrixiii|mwinchip)
-+ if $CC -mpreferred-stack-boundary=2 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
-+ c_opts="-mpreferred-stack-boundary=2 $c_opts"
-+ CONFIG_X86=y
-+ fi
-+ if test -d $CONFIG_SND_KERNELDIR/include/asm-i386/mach-default; then
-+ AC_MSG_CHECKING(for i386 machine type)
-+ machine="default"
-+ ac_save_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS -I$CONFIG_SND_KERNELDIR/include"
-+ rm -f machine.id
-+ if test -n "$kernelbuild" -a -f "$kernelbuild/include/linux/autoconf.h"; then
-+ KERNDIR=$kernelbuild
-+ else
-+ KERNDIR=$CONFIG_SND_KERNELDIR
-+ fi
-+ AC_TRY_RUN([
-+#include <stdio.h>
-+#include "$KERNDIR/include/linux/autoconf.h"
-+int main(void) {
-+ FILE *file = fopen("machine.id", "w+");
-+ if (file == NULL)
-+ exit(1);
-+#if defined(CONFIG_X86_VOYAGER)
-+ fprintf(file, "voyager");
-+#elif defined(CONFIG_X86_VISWS)
-+ fprintf(file, "visws");
-+#elif defined(CONFIG_X86_NUMAQ)
-+ fprintf(file, "numaq");
-+#elif defined(CONFIG_X86_BIGSMP)
-+ fprintf(file, "bigsmp");
-+#elif defined(CONFIG_X86_SUMMIT)
-+ fprintf(file, "summit");
-+#elif defined(CONFIG_X86_PC9800)
-+ fprintf(file, "pc9800");
- #else
--#include <linux/mc146818rtc.h>
-+ fprintf(file, "default");
- #endif
++#include <linux/version.h>
+ #include <linux/rtc.h>
+-#else
+ #include <linux/mc146818rtc.h>
+-#endif
-int main(void)
-{
-- rtc_task_t *cb = 0;
++],[
++#ifdef RTC_IRQ
+ rtc_task_t *cb = 0;
- exit(0);
-+ fclose(file);
-+ exit(0);
- }
--#endif
--],
-- AC_MSG_RESULT("yes");rtcsup="m",
-- AC_MSG_RESULT("no");rtcsup="",
-- AC_MSG_RESULT("unknown");rtcsup=""
--)
--CFLAGS="$ac_save_CFLAGS"
--CONFIG_SND_RTCTIMER=$rtcsup
--AC_SUBST(CONFIG_SND_RTCTIMER)
--test "$CONFIG_SND_RTCTIMER" = "m" && AC_DEFINE(CONFIG_SND_RTCTIMER_MODULE)
--CONFIG_RTC=$CONFIG_SND_RTCTIMER
--AC_SUBST(CONFIG_RTC)
--
--dnl Check for procfs
--CHECK_KERNEL_CONFIG(CONFIG_PROC_FS, [Procfs support])
--AC_SUBST(CONFIG_PROC_FS)
--
--dnl Check for USB
--CHECK_KERNEL_CONFIG(CONFIG_USB, [USB support])
--if test "$CONFIG_USB" != "y"; then
-- CHECK_KERNEL_CONFIG(CONFIG_USB_MODULE, [USB module support])
-- CONFIG_USB=$CONFIG_USB_MODULE
--fi
--AC_SUBST(CONFIG_USB)
--
--dnl PCMCIA stuff
--AC_ARG_WITH(pcmcia,
-- [ --with-pcmcia=kernel,external support kernel PCMCIA driver or external PCMCIA driver],
-- pcmcia="$withval", pcmcia="kernel")
--AC_ARG_WITH(pcmcia_root,
-- [ --with-pcmcia-root=dir specify the root directory of external PCMCIA source-tree],
-- pcmciaroot="$withval", pcmciaroot="")
--EXTRA_INCLUDES=""
--if test "$pcmcia" = "kernel"; then
-- echo "checking for kernel PCMCIA"
-- CHECK_KERNEL_CONFIG(CONFIG_PCMCIA, [PCMCIA support])
-- if test "$CONFIG_PCMCIA" != "y"; then
-- CHECK_KERNEL_CONFIG(CONFIG_PCMCIA_MODULE, [PCMCIA module support])
-- CONFIG_PCMCIA=$CONFIG_PCMCIA_MODULE
-- fi
--else
-- echo "checking for external PCMCIA"
-- if test "$pcmciaroot" = ""; then
-- AC_MSG_ERROR(Please set the PCMCIA root directory via --with-pcmcia-root option)
-- fi
-- if test ! -d "$pcmciaroot"; then
-- AC_MSG_ERROR(PCMCIA root $pcmciaroot is not a directory)
-- fi
-- echo "PCMCIA root directory is $pcmciaroot"
-- EXTRA_INCLUDES="-I$pcmciaroot/include"
-- CONFIG_PCMCIA=y
--fi
--
--AC_SUBST(CONFIG_PCMCIA)
--
--dnl Check for PC98 architecture support...
--CHECK_KERNEL_CONFIG(CONFIG_X86_PC9800, [PC9800 support in kernel])
--AC_SUBST(CONFIG_X86_PC9800)
-+],
-+ machine=`cat machine.id`;AC_MSG_RESULT($machine))
-+ CFLAGS="$ac_save_CFLAGS"
-+ rm -f machine.id
-+ KERNEL_INC="$KERNEL_INC -I$CONFIG_SND_KERNELDIR/include/asm-i386/mach-$machine"
-+ fi
-+ ;;
-+esac
-
--dnl Check for parallel port support
--if test "$kversion.$kpatchlevel" = "2.2"; then
-- CONFIG_PARPORT=""
--else
-- CHECK_KERNEL_CONFIG(CONFIG_PARPORT, [parallel port support])
-- if test "$CONFIG_PARPORT" != "y"; then
-- CHECK_KERNEL_CONFIG(CONFIG_PARPORT_MODULE, [parallel port module support])
-- CONFIG_PARPORT=$CONFIG_PARPORT_MODULE
-- fi
--fi
--AC_SUBST(CONFIG_PARPORT)
-+dnl ia32 and alpha
-+test "$CONFIG_ISA" = "probe" && CONFIG_ISA=y
-
- dnl Check for HPK tree (for ASIHPI driver)
- CONFIG_ASIHPK=""
+-}
++#else
++#error
+ #endif
+ ],
+ AC_MSG_RESULT("yes");rtcsup="m",
+@@ -1777,6 +1900,7 @@
+ AC_MSG_RESULT("unknown");rtcsup=""
+ )
+ CFLAGS="$ac_save_CFLAGS"
++CC=$ac_save_CC
+ CONFIG_SND_RTCTIMER=$rtcsup
+ AC_SUBST(CONFIG_SND_RTCTIMER)
+ test "$CONFIG_SND_RTCTIMER" = "m" && AC_DEFINE(CONFIG_SND_RTCTIMER_MODULE)
diff --git a/media-sound/alsa-driver/files/alsa-driver-1.0.7-ioctl32.patch b/media-sound/alsa-driver/files/alsa-driver-1.0.7-ioctl32.patch
deleted file mode 100644
index e5ddc81776c7..000000000000
--- a/media-sound/alsa-driver/files/alsa-driver-1.0.7-ioctl32.patch
+++ /dev/null
@@ -1,329 +0,0 @@
-diff -Naur alsa-driver-1.0.7.orig/sound/core/ioctl32/hwdep32.c alsa-driver-1.0.7/sound/core/ioctl32/hwdep32.c
---- alsa-driver-1.0.7.orig/sound/core/ioctl32/hwdep32.c 2004-10-18 07:55:51.000000000 -0700
-+++ alsa-driver-1.0.7/sound/core/ioctl32/hwdep32.c 2004-11-21 15:03:41.306477719 -0800
-@@ -39,20 +39,26 @@
- struct sndrv_hwdep_dsp_image data;
- struct sndrv_hwdep_dsp_image32 data32;
- mm_segment_t oldseg;
-- int err;
-+ int err = 0;
-
-- if (copy_from_user(&data32, (void __user *)arg, sizeof(data32)))
-+ if (copy_from_user(&data32, (void __user *)arg, sizeof(data32))) {
- return -EFAULT;
-+ }
- memset(&data, 0, sizeof(data));
- data.index = data32.index;
- memcpy(data.name, data32.name, sizeof(data.name));
-- data.image = compat_ptr(data32.image);
-+ data.image = kmalloc(data32.length, GFP_KERNEL);
-+ if (data.image == NULL) {
-+ return -ENOMEM;
-+ }
- data.length = data32.length;
- data.driver_data = data32.driver_data;
- oldseg = get_fs();
- set_fs(KERNEL_DS);
- err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)&data);
- set_fs(oldseg);
-+
-+ kfree(data.image);
- return err;
- }
-
-diff -Naur alsa-driver-1.0.7.orig/sound/core/ioctl32/ioctl32.c alsa-driver-1.0.7/sound/core/ioctl32/ioctl32.c
---- alsa-driver-1.0.7.orig/sound/core/ioctl32/ioctl32.c 2004-10-18 07:55:51.000000000 -0700
-+++ alsa-driver-1.0.7/sound/core/ioctl32/ioctl32.c 2004-11-21 15:03:41.299478783 -0800
-@@ -93,45 +93,54 @@
- unsigned char reserved[50];
- } /* don't set packed attribute here */;
-
--#define CVT_sndrv_ctl_elem_list()\
--{\
-- COPY(offset);\
-- COPY(space);\
-- COPY(used);\
-- COPY(count);\
-- CPTR(pids);\
--}
--
- static inline int _snd_ioctl32_ctl_elem_list(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)
- {
- struct sndrv_ctl_elem_list32 data32;
- struct sndrv_ctl_elem_list data;
- mm_segment_t oldseg;
-- int err;
-+ int err = 0;
-
- if (copy_from_user(&data32, (void __user *)arg, sizeof(data32)))
- return -EFAULT;
- memset(&data, 0, sizeof(data));
-+
-+ /* Copy over W data */
- data.offset = data32.offset;
- data.space = data32.space;
-- data.used = data32.used;
-- data.count = data32.count;
-- data.pids = compat_ptr(data32.pids);
-+
-+ data.pids = kmalloc(sizeof(*data.pids) * data.space, GFP_KERNEL);
-+ if (data.pids == NULL) {
-+ err = -ENOMEM;
-+ goto __list_end;
-+ }
-+
-+ /* ioctl call */
- oldseg = get_fs();
- set_fs(KERNEL_DS);
- err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)&data);
- set_fs(oldseg);
-+
- if (err < 0)
-- return err;
-+ goto __list_end;
-+
- /* copy the result */
-- data32.offset = data.offset;
-- data32.space = data.space;
- data32.used = data.used;
- data32.count = data.count;
-- //data.pids = data.pids;
-+
-+ if (data.used > 0 &&
-+ copy_to_user((void __user *)compat_ptr(data32.pids), data.pids, sizeof(*data.pids) * data.used)) {
-+ err = -EFAULT;
-+ goto __list_end;
-+ }
-+
- if (copy_to_user((void __user *)arg, &data32, sizeof(data32)))
-- return -EFAULT;
-- return 0;
-+ err = -EFAULT;
-+
-+__list_end:
-+ if (data.pids) {
-+ kfree(data.pids);
-+ }
-+ return err;
- }
-
- DEFINE_ALSA_IOCTL_ENTRY(ctl_elem_list, ctl_elem_list, SNDRV_CTL_IOCTL_ELEM_LIST);
-@@ -298,8 +307,21 @@
- memset(data, 0, sizeof(*data));
- data->id = data32->id;
- data->indirect = data32->indirect;
-- if (data->indirect) /* FIXME: this is not correct for long arrays */
-+ if (data->indirect) { /* FIXME: this is not correct for long arrays */
-+#if defined(__sparc__)
-+ err = -EINVAL;
-+ goto __end;
-+
-+ /* Is this the correct way to handle indirect? */
-+ data->value.integer.value_ptr = kmalloc(sizeof(u32), GFP_KERNEL);
-+ if (data->value.integer.value_ptr == NULL) {
-+ err = -ENOMEM;
-+ goto __end;
-+ }
-+#else
- data->value.integer.value_ptr = compat_ptr(data32->value.integer.value_ptr);
-+#endif
-+ }
- type = get_ctl_type(file, &data->id);
- if (type < 0) {
- err = type;
-@@ -370,10 +392,16 @@
- if (copy_to_user((void __user *)arg, data32, sizeof(*data32)))
- err = -EFAULT;
- __end:
-+#if defined(__sparc__)
-+ if (data->indirect) {
-+ kfree(data->value.integer.value_ptr);
-+ }
-+#endif
- if (data32)
- kfree(data32);
- if (data)
- kfree(data);
-+
- return err;
- }
-
-diff -Naur alsa-driver-1.0.7.orig/sound/core/ioctl32/pcm32.c alsa-driver-1.0.7/sound/core/ioctl32/pcm32.c
---- alsa-driver-1.0.7.orig/sound/core/ioctl32/pcm32.c 2004-10-18 07:55:51.000000000 -0700
-+++ alsa-driver-1.0.7/sound/core/ioctl32/pcm32.c 2004-11-21 15:03:41.305477871 -0800
-@@ -169,6 +169,7 @@
-
- DEFINE_ALSA_IOCTL(pcm_uframes_str);
- DEFINE_ALSA_IOCTL(pcm_sframes_str);
-+DEFINE_ALSA_IOCTL_BIG(pcm_hw_params);
- DEFINE_ALSA_IOCTL(pcm_sw_params);
- DEFINE_ALSA_IOCTL(pcm_channel_info);
- DEFINE_ALSA_IOCTL(pcm_status);
-@@ -192,46 +193,6 @@
- runtime->boundary *= 2;
- }
-
--static inline int _snd_ioctl32_pcm_hw_params(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)
--{
-- struct sndrv_pcm_hw_params32 *data32;
-- struct sndrv_pcm_hw_params *data;
-- mm_segment_t oldseg;
-- int err;
--
-- data32 = kmalloc(sizeof(*data32), GFP_KERNEL);
-- data = kmalloc(sizeof(*data), GFP_KERNEL);
-- if (data32 == NULL || data == NULL) {
-- err = -ENOMEM;
-- goto __end;
-- }
-- if (copy_from_user(data32, (void __user *)arg, sizeof(*data32))) {
-- err = -EFAULT;
-- goto __end;
-- }
-- memset(data, 0, sizeof(*data));
-- convert_from_32(pcm_hw_params, data, data32);
-- oldseg = get_fs();
-- set_fs(KERNEL_DS);
-- err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)data);
-- set_fs(oldseg);
-- if (err < 0)
-- goto __end;
-- err = 0;
-- convert_to_32(pcm_hw_params, data32, data);
-- if (copy_to_user((void __user *)arg, data32, sizeof(*data32)))
-- err = -EFAULT;
-- else
-- recalculate_boundary(file);
-- __end:
-- if (data)
-- kfree(data);
-- if (data32)
-- kfree(data32);
-- return err;
--}
--
--
- /*
- */
- struct sndrv_xferi32 {
-@@ -245,25 +206,54 @@
- struct sndrv_xferi32 data32;
- struct sndrv_xferi data;
- mm_segment_t oldseg;
-- int err;
-+ int err = 0;
-+ size_t size;
-+
-+ snd_pcm_substream_t *substream;
-+ snd_pcm_runtime_t *runtime;
-+
-+ substream = ((snd_pcm_file_t *)file->private_data)->substream;
-+ snd_assert(substream != NULL, return -ENXIO);
-+ runtime = substream->runtime;
-
- if (copy_from_user(&data32, (void __user *)arg, sizeof(data32)))
- return -EFAULT;
- memset(&data, 0, sizeof(data));
-+
-+ size = frames_to_bytes(runtime, data32.frames);
-+ data.buf = kmalloc(size, GFP_KERNEL);
-+ if (data.buf == NULL) {
-+ return -ENOMEM;
-+ }
-+
-+ if (copy_from_user(data.buf, (void __user *)compat_ptr(data32.buf), size)) {
-+ err = -EFAULT;
-+ goto __xferi_end;
-+ }
- data.result = data32.result;
-- data.buf = compat_ptr(data32.buf);
- data.frames = data32.frames;
-+
- oldseg = get_fs();
- set_fs(KERNEL_DS);
- err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)&data);
- set_fs(oldseg);
- if (err < 0)
-- return err;
-+ goto __xferi_end;
-+
- /* copy the result */
- data32.result = data.result;
-+ data32.frames = data.frames;
-+ if (copy_to_user((void __user *)compat_ptr(data32.buf), data.buf, size)) {
-+ err = -EFAULT;
-+ goto __xferi_end;
-+ }
- if (copy_to_user((void __user *)arg, &data32, sizeof(data32)))
-- return -EFAULT;
-- return 0;
-+ err = -EFAULT;
-+
-+__xferi_end:
-+ if(data.buf)
-+ kfree(data.buf);
-+ return err;
- }
-
-
-@@ -287,12 +277,12 @@
- struct sndrv_xfern32 data32;
- struct sndrv_xfern32 __user *srcptr = (void __user *)arg;
- void __user **bufs = NULL;
-- int err = 0, ch, i;
-+ int err = 0, ch, i, cp = 0;
- u32 __user *bufptr;
- mm_segment_t oldseg;
-+ size_t size;
-
- /* FIXME: need to check whether fop->ioctl is sane */
--
- pcm_file = file->private_data;
- substream = pcm_file->substream;
- snd_assert(substream != NULL && substream->runtime, return -ENXIO);
-@@ -319,11 +309,27 @@
- bufs = kmalloc(sizeof(void *) * 128, GFP_KERNEL);
- if (bufs == NULL)
- return -ENOMEM;
-+ size = frames_to_bytes(substream->runtime , data32.frames);
- for (i = 0; i < ch; i++) {
- u32 ptr;
-- if (get_user(ptr, bufptr))
-- return -EFAULT;
-- bufs[ch] = compat_ptr(ptr);
-+ if (get_user(ptr, bufptr)) {
-+ err = -EFAULT;
-+ goto __xfern_out;
-+ }
-+
-+ bufs[i] = kmalloc(size, GFP_KERNEL);
-+ if (bufs[i] == NULL) {
-+ err = -ENOMEM;
-+ goto __xfern_out;
-+ }
-+
-+ cp++;
-+
-+ if (copy_from_user(bufs[i], (void __user *)compat_ptr(ptr), size)) {
-+ err = -EFAULT;
-+ goto __xfern_out;
-+ }
-+
- bufptr++;
- }
- oldseg = get_fs();
-@@ -341,8 +347,13 @@
- if (put_user(err, &srcptr->result))
- err = -EFAULT;
- }
-+
-+__xfern_out:
-+ for (i = 0; i < cp; i++) {
-+ kfree(bufs[i]);
-+ }
- kfree(bufs);
-- return 0;
-+ return err;
- }
-
-
diff --git a/media-sound/alsa-driver/files/alsa-driver-1.0.7-ioctl32.patch-r1 b/media-sound/alsa-driver/files/alsa-driver-1.0.7-ioctl32.patch-r1
deleted file mode 100644
index c8fbb767e216..000000000000
--- a/media-sound/alsa-driver/files/alsa-driver-1.0.7-ioctl32.patch-r1
+++ /dev/null
@@ -1,1372 +0,0 @@
-Index: alsa-kernel/core/control.c
-===================================================================
-RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/core/control.c,v
-retrieving revision 1.42
-diff -u -r1.42 control.c
---- alsa-kernel/core/control.c 16 Jul 2004 16:50:36 -0000 1.42
-+++ alsa-kernel/core/control.c 26 Nov 2004 14:05:44 -0000
-@@ -635,19 +635,13 @@
- return result;
- }
-
--static int snd_ctl_elem_read(snd_card_t *card, snd_ctl_elem_value_t __user *_control)
-+int snd_ctl_elem_read(snd_card_t *card, snd_ctl_elem_value_t *control)
- {
-- snd_ctl_elem_value_t *control;
- snd_kcontrol_t *kctl;
- snd_kcontrol_volatile_t *vd;
- unsigned int index_offset;
- int result, indirect;
--
-- control = kmalloc(sizeof(*control), GFP_KERNEL);
-- if (control == NULL)
-- return -ENOMEM;
-- if (copy_from_user(control, _control, sizeof(*control)))
-- return -EFAULT;
-+
- down_read(&card->controls_rwsem);
- kctl = snd_ctl_find_id(card, &control->id);
- if (kctl == NULL) {
-@@ -668,27 +662,37 @@
- }
- }
- up_read(&card->controls_rwsem);
-+ return result;
-+}
-+
-+static int snd_ctl_elem_read_user(snd_card_t *card, snd_ctl_elem_value_t __user *_control)
-+{
-+ snd_ctl_elem_value_t *control;
-+ int result;
-+
-+ control = kmalloc(sizeof(*control), GFP_KERNEL);
-+ if (control == NULL)
-+ return -ENOMEM;
-+ if (copy_from_user(control, _control, sizeof(*control))) {
-+ kfree(control);
-+ return -EFAULT;
-+ }
-+ result = snd_ctl_elem_read(card, control);
- if (result >= 0)
- if (copy_to_user(_control, control, sizeof(*control)))
-- return -EFAULT;
-+ result = -EFAULT;
- kfree(control);
- return result;
- }
-
--static int snd_ctl_elem_write(snd_ctl_file_t *file, snd_ctl_elem_value_t __user *_control)
-+int snd_ctl_elem_write(snd_ctl_file_t *file, snd_ctl_elem_value_t *control)
- {
- snd_card_t *card = file->card;
-- snd_ctl_elem_value_t *control;
- snd_kcontrol_t *kctl;
- snd_kcontrol_volatile_t *vd;
- unsigned int index_offset;
- int result, indirect;
-
-- control = kmalloc(sizeof(*control), GFP_KERNEL);
-- if (control == NULL)
-- return -ENOMEM;
-- if (copy_from_user(control, _control, sizeof(*control)))
-- return -EFAULT;
- down_read(&card->controls_rwsem);
- kctl = snd_ctl_find_id(card, &control->id);
- if (kctl == NULL) {
-@@ -711,16 +715,30 @@
- if (result > 0) {
- up_read(&card->controls_rwsem);
- snd_ctl_notify(card, SNDRV_CTL_EVENT_MASK_VALUE, &control->id);
-- result = 0;
-- goto __unlocked;
-+ return 0;
- }
- }
- }
- up_read(&card->controls_rwsem);
-- __unlocked:
-+ return result;
-+}
-+
-+static int snd_ctl_elem_write_user(snd_ctl_file_t *file, snd_ctl_elem_value_t __user *_control)
-+{
-+ snd_ctl_elem_value_t *control;
-+ int result;
-+
-+ control = kmalloc(sizeof(*control), GFP_KERNEL);
-+ if (control == NULL)
-+ return -ENOMEM;
-+ if (copy_from_user(control, _control, sizeof(*control))) {
-+ kfree(control);
-+ return -EFAULT;
-+ }
-+ result = snd_ctl_elem_write(file, control);
- if (result >= 0)
- if (copy_to_user(_control, control, sizeof(*control)))
-- return -EFAULT;
-+ result = -EFAULT;
- kfree(control);
- return result;
- }
-@@ -1045,9 +1063,9 @@
- case SNDRV_CTL_IOCTL_ELEM_INFO:
- return snd_ctl_elem_info(ctl, argp);
- case SNDRV_CTL_IOCTL_ELEM_READ:
-- return snd_ctl_elem_read(ctl->card, argp);
-+ return snd_ctl_elem_read_user(ctl->card, argp);
- case SNDRV_CTL_IOCTL_ELEM_WRITE:
-- return snd_ctl_elem_write(ctl, argp);
-+ return snd_ctl_elem_write_user(ctl, argp);
- case SNDRV_CTL_IOCTL_ELEM_LOCK:
- return snd_ctl_elem_lock(ctl, argp);
- case SNDRV_CTL_IOCTL_ELEM_UNLOCK:
-Index: alsa-kernel/core/pcm_lib.c
-===================================================================
-RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/core/pcm_lib.c,v
-retrieving revision 1.57
-diff -u -r1.57 pcm_lib.c
---- alsa-kernel/core/pcm_lib.c 24 Sep 2004 13:55:54 -0000 1.57
-+++ alsa-kernel/core/pcm_lib.c 26 Nov 2004 13:42:21 -0000
-@@ -2660,6 +2660,7 @@
- EXPORT_SYMBOL(snd_pcm_hw_param_near);
- EXPORT_SYMBOL(snd_pcm_hw_param_set);
- EXPORT_SYMBOL(snd_pcm_hw_refine);
-+EXPORT_SYMBOL(snd_pcm_hw_params);
- EXPORT_SYMBOL(snd_pcm_hw_constraints_init);
- EXPORT_SYMBOL(snd_pcm_hw_constraints_complete);
- EXPORT_SYMBOL(snd_pcm_hw_constraint_list);
-Index: alsa-kernel/core/pcm_native.c
-===================================================================
-RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/core/pcm_native.c,v
-retrieving revision 1.85
-diff -u -r1.85 pcm_native.c
---- alsa-kernel/core/pcm_native.c 16 Nov 2004 15:17:15 -0000 1.85
-+++ alsa-kernel/core/pcm_native.c 26 Nov 2004 13:34:12 -0000
-@@ -329,8 +329,8 @@
- return err;
- }
-
--static int snd_pcm_hw_params(snd_pcm_substream_t *substream,
-- snd_pcm_hw_params_t *params)
-+int snd_pcm_hw_params(snd_pcm_substream_t *substream,
-+ snd_pcm_hw_params_t *params)
- {
- snd_pcm_runtime_t *runtime;
- int err;
-Index: alsa-kernel/core/sound.c
-===================================================================
-RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/core/sound.c,v
-retrieving revision 1.62
-diff -u -r1.62 sound.c
---- alsa-kernel/core/sound.c 8 Nov 2004 11:37:34 -0000 1.62
-+++ alsa-kernel/core/sound.c 26 Nov 2004 14:06:50 -0000
-@@ -475,6 +475,10 @@
- EXPORT_SYMBOL(snd_ctl_notify);
- EXPORT_SYMBOL(snd_ctl_register_ioctl);
- EXPORT_SYMBOL(snd_ctl_unregister_ioctl);
-+#ifdef CONFIG_COMPAT
-+EXPORT_SYMBOL(snd_ctl_elem_read);
-+EXPORT_SYMBOL(snd_ctl_elem_write);
-+#endif
- /* misc.c */
- EXPORT_SYMBOL(snd_task_name);
- #ifdef CONFIG_SND_VERBOSE_PRINTK
-Index: alsa-kernel/core/ioctl32/hwdep32.c
-===================================================================
-RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/core/ioctl32/hwdep32.c,v
-retrieving revision 1.10
-diff -u -r1.10 hwdep32.c
---- alsa-kernel/core/ioctl32/hwdep32.c 18 Oct 2004 14:31:33 -0000 1.10
-+++ alsa-kernel/core/ioctl32/hwdep32.c 23 Nov 2004 14:22:41 -0000
-@@ -36,24 +36,24 @@
-
- static inline int _snd_ioctl32_hwdep_dsp_image(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)
- {
-- struct sndrv_hwdep_dsp_image data;
-- struct sndrv_hwdep_dsp_image32 data32;
-- mm_segment_t oldseg;
-- int err;
-+ struct sndrv_hwdep_dsp_image __user *data, *dst;
-+ struct sndrv_hwdep_dsp_image32 __user *data32, *src;
-+ compat_caddr_t ptr;
-
-- if (copy_from_user(&data32, (void __user *)arg, sizeof(data32)))
-+ data32 = compat_ptr(arg);
-+ data = compat_alloc_user_space(sizeof(*data));
-+
-+ /* index and name */
-+ if (copy_in_user(data, data32, 4 + 64))
-+ return -EFAULT;
-+ if (__get_user(ptr, &data32->image) ||
-+ __put_user(compat_ptr(ptr), &data->image))
- return -EFAULT;
-- memset(&data, 0, sizeof(data));
-- data.index = data32.index;
-- memcpy(data.name, data32.name, sizeof(data.name));
-- data.image = compat_ptr(data32.image);
-- data.length = data32.length;
-- data.driver_data = data32.driver_data;
-- oldseg = get_fs();
-- set_fs(KERNEL_DS);
-- err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)&data);
-- set_fs(oldseg);
-- return err;
-+ src = data32;
-+ dst = data;
-+ COPY_CVT(length);
-+ COPY_CVT(driver_data);
-+ return file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)data);
- }
-
- DEFINE_ALSA_IOCTL_ENTRY(hwdep_dsp_image, hwdep_dsp_image, SNDRV_HWDEP_IOCTL_DSP_LOAD);
-Index: alsa-kernel/core/ioctl32/ioctl32.c
-===================================================================
-RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/core/ioctl32/ioctl32.c,v
-retrieving revision 1.27
-diff -u -r1.27 ioctl32.c
---- alsa-kernel/core/ioctl32/ioctl32.c 18 Oct 2004 14:31:33 -0000 1.27
-+++ alsa-kernel/core/ioctl32/ioctl32.c 26 Nov 2004 14:11:08 -0000
-@@ -30,6 +30,23 @@
- #include <asm/uaccess.h>
- #include "ioctl32.h"
-
-+
-+#if defined(CONFIG_SPARC64) && LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 8)
-+size_t hack_copy_in_user(void __user *to, const void __user *from, size_t size)
-+{
-+ char tmp[64];
-+ while (size) {
-+ size_t s = sizeof(tmp) < size ? sizeof(tmp) : size;
-+ if (copy_from_user(tmp, from, s) || copy_to_user(to, tmp, s))
-+ break;
-+ size -= s;
-+ from += s;
-+ to += s;
-+ }
-+ return size;
-+}
-+#endif
-+
- /*
- * register/unregister mappers
- * exported for other modules
-@@ -93,43 +110,28 @@
- unsigned char reserved[50];
- } /* don't set packed attribute here */;
-
--#define CVT_sndrv_ctl_elem_list()\
--{\
-- COPY(offset);\
-- COPY(space);\
-- COPY(used);\
-- COPY(count);\
-- CPTR(pids);\
--}
--
- static inline int _snd_ioctl32_ctl_elem_list(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)
- {
-- struct sndrv_ctl_elem_list32 data32;
-- struct sndrv_ctl_elem_list data;
-- mm_segment_t oldseg;
-+ struct sndrv_ctl_elem_list32 __user *data32;
-+ struct sndrv_ctl_elem_list __user *data;
-+ compat_caddr_t ptr;
- int err;
-
-- if (copy_from_user(&data32, (void __user *)arg, sizeof(data32)))
-+ data32 = compat_ptr(arg);
-+ data = compat_alloc_user_space(sizeof(*data));
-+
-+ /* offset, space, used, count */
-+ if (copy_in_user(data, data32, 4 * sizeof(u32)))
- return -EFAULT;
-- memset(&data, 0, sizeof(data));
-- data.offset = data32.offset;
-- data.space = data32.space;
-- data.used = data32.used;
-- data.count = data32.count;
-- data.pids = compat_ptr(data32.pids);
-- oldseg = get_fs();
-- set_fs(KERNEL_DS);
-- err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)&data);
-- set_fs(oldseg);
-+ /* pids */
-+ if (__get_user(ptr, &data32->pids) ||
-+ __put_user(compat_ptr(ptr), &data->pids))
-+ return -EFAULT;
-+ err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)data);
- if (err < 0)
- return err;
- /* copy the result */
-- data32.offset = data.offset;
-- data32.space = data.space;
-- data32.used = data.used;
-- data32.count = data.count;
-- //data.pids = data.pids;
-- if (copy_to_user((void __user *)arg, &data32, sizeof(data32)))
-+ if (copy_in_user(data32, data, 4 * sizeof(u32)))
- return -EFAULT;
- return 0;
- }
-@@ -170,54 +172,59 @@
-
- static inline int _snd_ioctl32_ctl_elem_info(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)
- {
-- struct sndrv_ctl_elem_info data;
-- struct sndrv_ctl_elem_info32 data32;
-+ struct sndrv_ctl_elem_info __user *data, *src;
-+ struct sndrv_ctl_elem_info32 __user *data32, *dst;
-+ unsigned int type;
- int err;
-- mm_segment_t oldseg;
-
-- if (copy_from_user(&data32, (void __user *)arg, sizeof(data32)))
-+ data32 = compat_ptr(arg);
-+ data = compat_alloc_user_space(sizeof(*data));
-+
-+ /* copy id */
-+ if (copy_in_user(&data->id, &data32->id, sizeof(data->id)))
- return -EFAULT;
-- memset(&data, 0, sizeof(data));
-- data.id = data32.id;
- /* we need to copy the item index.
- * hope this doesn't break anything..
- */
-- data.value.enumerated.item = data32.value.enumerated.item;
-- oldseg = get_fs();
-- set_fs(KERNEL_DS);
-- err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)&data);
-- set_fs(oldseg);
-+ if (copy_in_user(&data->value.enumerated.item,
-+ &data32->value.enumerated.item,
-+ sizeof(data->value.enumerated.item)))
-+ return -EFAULT;
-+ err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)data);
- if (err < 0)
- return err;
- /* restore info to 32bit */
-- data32.id = data.id;
-- data32.type = data.type;
-- data32.access = data.access;
-- data32.count = data.count;
-- data32.owner = data.owner;
-- switch (data.type) {
-+ /* for COPY_CVT macro */
-+ src = data;
-+ dst = data32;
-+ /* id, type, access, count */
-+ if (copy_in_user(&data32->id, &data->id, sizeof(data->id)) ||
-+ copy_in_user(&data32->type, &data->type, 3 * sizeof(u32)))
-+ return -EFAULT;
-+ COPY_CVT(owner);
-+ __get_user(type, &data->type);
-+ switch (type) {
- case SNDRV_CTL_ELEM_TYPE_BOOLEAN:
- case SNDRV_CTL_ELEM_TYPE_INTEGER:
-- data32.value.integer.min = data.value.integer.min;
-- data32.value.integer.max = data.value.integer.max;
-- data32.value.integer.step = data.value.integer.step;
-+ COPY_CVT(value.integer.min);
-+ COPY_CVT(value.integer.max);
-+ COPY_CVT(value.integer.step);
- break;
- case SNDRV_CTL_ELEM_TYPE_INTEGER64:
-- data32.value.integer64.min = data.value.integer64.min;
-- data32.value.integer64.max = data.value.integer64.max;
-- data32.value.integer64.step = data.value.integer64.step;
-+ if (copy_in_user(&data32->value.integer64,
-+ &data->value.integer64,
-+ sizeof(data->value.integer64)))
-+ return -EFAULT;
- break;
- case SNDRV_CTL_ELEM_TYPE_ENUMERATED:
-- data32.value.enumerated.items = data.value.enumerated.items;
-- data32.value.enumerated.item = data.value.enumerated.item;
-- memcpy(data32.value.enumerated.name, data.value.enumerated.name,
-- sizeof(data.value.enumerated.name));
-+ if (copy_in_user(&data32->value.enumerated,
-+ &data->value.enumerated,
-+ sizeof(data->value.enumerated)))
-+ return -EFAULT;
- break;
- default:
- break;
- }
-- if (copy_to_user((void __user *)arg, &data32, sizeof(data32)))
-- return -EFAULT;
- return 0;
- }
-
-@@ -250,24 +257,21 @@
-
-
- /* hmm, it's so hard to retrieve the value type from the control id.. */
--static int get_ctl_type(struct file *file, snd_ctl_elem_id_t *id)
-+static int get_ctl_type(snd_card_t *card, snd_ctl_elem_id_t *id)
- {
-- snd_ctl_file_t *ctl;
- snd_kcontrol_t *kctl;
- snd_ctl_elem_info_t info;
- int err;
-
-- ctl = file->private_data;
--
-- down_read(&ctl->card->controls_rwsem);
-- kctl = snd_ctl_find_id(ctl->card, id);
-+ down_read(&card->controls_rwsem);
-+ kctl = snd_ctl_find_id(card, id);
- if (! kctl) {
-- up_read(&ctl->card->controls_rwsem);
-+ up_read(&card->controls_rwsem);
- return -ENXIO;
- }
- info.id = *id;
- err = kctl->info(kctl, &info);
-- up_read(&ctl->card->controls_rwsem);
-+ up_read(&card->controls_rwsem);
- if (err >= 0)
- err = info.type;
- return err;
-@@ -277,101 +281,142 @@
- static inline int _snd_ioctl32_ctl_elem_value(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)
- {
- struct sndrv_ctl_elem_value *data;
-- struct sndrv_ctl_elem_value32 *data32;
-+ struct sndrv_ctl_elem_value32 __user *data32;
-+ snd_ctl_file_t *ctl = ctl = file->private_data;
- int err, i;
- int type;
-- mm_segment_t oldseg;
-
-- /* FIXME: check the sane ioctl.. */
-+ if (ctl == NULL)
-+ return -ENXIO;
-
-+ data32 = compat_ptr(arg);
- data = kmalloc(sizeof(*data), GFP_KERNEL);
-- data32 = kmalloc(sizeof(*data32), GFP_KERNEL);
-- if (data == NULL || data32 == NULL) {
-- err = -ENOMEM;
-+ if (data == NULL)
-+ return -ENOMEM;
-+
-+ if (copy_from_user(&data->id, &data32->id, sizeof(data->id))) {
-+ err = -EFAULT;
- goto __end;
- }
--
-- if (copy_from_user(data32, (void __user *)arg, sizeof(*data32))) {
-+ if (__get_user(data->indirect, &data32->indirect)) {
- err = -EFAULT;
- goto __end;
- }
-- memset(data, 0, sizeof(*data));
-- data->id = data32->id;
-- data->indirect = data32->indirect;
-- if (data->indirect) /* FIXME: this is not correct for long arrays */
-- data->value.integer.value_ptr = compat_ptr(data32->value.integer.value_ptr);
-- type = get_ctl_type(file, &data->id);
-+ /* FIXME: indirect access is not supported */
-+ if (data->indirect) {
-+ err = -EINVAL;
-+ goto __end;
-+ }
-+ type = get_ctl_type(ctl->card, &data->id);
- if (type < 0) {
- err = type;
- goto __end;
- }
-- if (! data->indirect) {
-- switch (type) {
-- case SNDRV_CTL_ELEM_TYPE_BOOLEAN:
-- case SNDRV_CTL_ELEM_TYPE_INTEGER:
-- for (i = 0; i < 128; i++)
-- data->value.integer.value[i] = data32->value.integer.value[i];
-- break;
-- case SNDRV_CTL_ELEM_TYPE_INTEGER64:
-- for (i = 0; i < 64; i++)
-- data->value.integer64.value[i] = data32->value.integer64.value[i];
-- break;
-- case SNDRV_CTL_ELEM_TYPE_ENUMERATED:
-- for (i = 0; i < 128; i++)
-- data->value.enumerated.item[i] = data32->value.enumerated.item[i];
-- break;
-- case SNDRV_CTL_ELEM_TYPE_BYTES:
-- memcpy(data->value.bytes.data, data32->value.bytes.data,
-- sizeof(data->value.bytes.data));
-- break;
-- case SNDRV_CTL_ELEM_TYPE_IEC958:
-- data->value.iec958 = data32->value.iec958;
-- break;
-- default:
-- printk("unknown type %d\n", type);
-- break;
-+
-+ switch (type) {
-+ case SNDRV_CTL_ELEM_TYPE_BOOLEAN:
-+ case SNDRV_CTL_ELEM_TYPE_INTEGER:
-+ for (i = 0; i < 128; i++) {
-+ int val;
-+ if (__get_user(val, &data32->value.integer.value[i])) {
-+ err = -EFAULT;
-+ goto __end;
-+ }
-+ data->value.integer.value[i] = val;
-+ }
-+ break;
-+ case SNDRV_CTL_ELEM_TYPE_INTEGER64:
-+ if (__copy_from_user(data->value.integer64.value,
-+ data32->value.integer64.value,
-+ sizeof(data->value.integer64.value))) {
-+ err = -EFAULT;
-+ goto __end;
-+ }
-+ break;
-+ case SNDRV_CTL_ELEM_TYPE_ENUMERATED:
-+ if (__copy_from_user(data->value.enumerated.item,
-+ data32->value.enumerated.item,
-+ sizeof(data32->value.enumerated.item))) {
-+ err = -EFAULT;
-+ goto __end;
-+ }
-+ break;
-+ case SNDRV_CTL_ELEM_TYPE_BYTES:
-+ if (__copy_from_user(data->value.bytes.data,
-+ data32->value.bytes.data,
-+ sizeof(data32->value.bytes.data))) {
-+ err = -EFAULT;
-+ goto __end;
-+ }
-+ break;
-+ case SNDRV_CTL_ELEM_TYPE_IEC958:
-+ if (__copy_from_user(&data->value.iec958,
-+ &data32->value.iec958,
-+ sizeof(data32->value.iec958))) {
-+ err = -EFAULT;
-+ goto __end;
- }
-+ break;
-+ default:
-+ printk(KERN_ERR "snd_ioctl32_ctl_elem_value: unknown type %d\n", type);
-+ err = -EINVAL;
-+ goto __end;
- }
-
-- oldseg = get_fs();
-- set_fs(KERNEL_DS);
-- err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)data);
-- set_fs(oldseg);
-+ if (native_ctl == SNDRV_CTL_IOCTL_ELEM_READ)
-+ err = snd_ctl_elem_read(ctl->card, data);
-+ else
-+ err = snd_ctl_elem_write(ctl, data);
- if (err < 0)
- goto __end;
- /* restore info to 32bit */
-- if (! data->indirect) {
-- switch (type) {
-- case SNDRV_CTL_ELEM_TYPE_BOOLEAN:
-- case SNDRV_CTL_ELEM_TYPE_INTEGER:
-- for (i = 0; i < 128; i++)
-- data32->value.integer.value[i] = data->value.integer.value[i];
-- break;
-- case SNDRV_CTL_ELEM_TYPE_INTEGER64:
-- for (i = 0; i < 64; i++)
-- data32->value.integer64.value[i] = data->value.integer64.value[i];
-- break;
-- case SNDRV_CTL_ELEM_TYPE_ENUMERATED:
-- for (i = 0; i < 128; i++)
-- data32->value.enumerated.item[i] = data->value.enumerated.item[i];
-- break;
-- case SNDRV_CTL_ELEM_TYPE_BYTES:
-- memcpy(data32->value.bytes.data, data->value.bytes.data,
-- sizeof(data->value.bytes.data));
-- break;
-- case SNDRV_CTL_ELEM_TYPE_IEC958:
-- data32->value.iec958 = data->value.iec958;
-- break;
-- default:
-- break;
-+ switch (type) {
-+ case SNDRV_CTL_ELEM_TYPE_BOOLEAN:
-+ case SNDRV_CTL_ELEM_TYPE_INTEGER:
-+ for (i = 0; i < 128; i++) {
-+ int val;
-+ val = data->value.integer.value[i];
-+ if (__put_user(val, &data32->value.integer.value[i])) {
-+ err = -EFAULT;
-+ goto __end;
-+ }
-+ }
-+ break;
-+ case SNDRV_CTL_ELEM_TYPE_INTEGER64:
-+ if (__copy_to_user(data32->value.integer64.value,
-+ data->value.integer64.value,
-+ sizeof(data32->value.integer64.value))) {
-+ err = -EFAULT;
-+ goto __end;
-+ }
-+ break;
-+ case SNDRV_CTL_ELEM_TYPE_ENUMERATED:
-+ if (__copy_to_user(data32->value.enumerated.item,
-+ data->value.enumerated.item,
-+ sizeof(data32->value.enumerated.item))) {
-+ err = -EFAULT;
-+ goto __end;
-+ }
-+ break;
-+ case SNDRV_CTL_ELEM_TYPE_BYTES:
-+ if (__copy_to_user(data32->value.bytes.data,
-+ data->value.bytes.data,
-+ sizeof(data32->value.bytes.data))) {
-+ err = -EFAULT;
-+ goto __end;
- }
-+ break;
-+ case SNDRV_CTL_ELEM_TYPE_IEC958:
-+ if (__copy_to_user(&data32->value.iec958,
-+ &data->value.iec958,
-+ sizeof(data32->value.iec958))) {
-+ err = -EFAULT;
-+ goto __end;
-+ }
-+ break;
- }
- err = 0;
-- if (copy_to_user((void __user *)arg, data32, sizeof(*data32)))
-- err = -EFAULT;
- __end:
-- if (data32)
-- kfree(data32);
- if (data)
- kfree(data);
- return err;
-Index: alsa-kernel/core/ioctl32/ioctl32.h
-===================================================================
-RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/core/ioctl32/ioctl32.h,v
-retrieving revision 1.14
-diff -u -r1.14 ioctl32.h
---- alsa-kernel/core/ioctl32/ioctl32.h 18 Oct 2004 14:31:33 -0000 1.14
-+++ alsa-kernel/core/ioctl32/ioctl32.h 25 Nov 2004 10:53:58 -0000
-@@ -28,20 +28,37 @@
-
- #include <linux/compat.h>
-
--#define COPY(x) (dst->x = src->x)
--#define CPTR(x) (dst->x = compat_ptr(src->x))
-+#define COPY(x) \
-+ do { \
-+ if (copy_in_user(&dst->x, &src->x, sizeof(dst->x))) \
-+ return -EFAULT; \
-+ } while (0)
-+
-+#define COPY_ARRAY(x) \
-+ do { \
-+ if (copy_in_user(dst->x, src->x, sizeof(dst->x))) \
-+ return -EFAULT; \
-+ } while (0)
-+
-+#define COPY_CVT(x) \
-+ do { \
-+ __typeof__(src->x) __val_tmp; \
-+ if (get_user(__val_tmp, &src->x) || \
-+ put_user(__val_tmp, &dst->x))\
-+ return -EFAULT; \
-+ } while (0)
-
- #define convert_from_32(type, dstp, srcp)\
- {\
-- struct sndrv_##type *dst = dstp;\
-- struct sndrv_##type##32 *src = srcp;\
-+ struct sndrv_##type __user *dst = dstp;\
-+ struct sndrv_##type##32 __user *src = srcp;\
- CVT_##sndrv_##type();\
- }
-
- #define convert_to_32(type, dstp, srcp)\
- {\
-- struct sndrv_##type *src = srcp;\
-- struct sndrv_##type##32 *dst = dstp;\
-+ struct sndrv_##type __user *src = srcp;\
-+ struct sndrv_##type##32 __user *dst = dstp;\
- CVT_##sndrv_##type();\
- }
-
-@@ -49,65 +66,19 @@
- #define DEFINE_ALSA_IOCTL(type) \
- static inline int _snd_ioctl32_##type(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)\
- {\
-- struct sndrv_##type##32 data32;\
-- struct sndrv_##type data;\
-- mm_segment_t oldseg;\
-+ struct sndrv_##type##32 __user *data32;\
-+ struct sndrv_##type __user *data;\
- int err;\
-- if (copy_from_user(&data32, (void __user *)arg, sizeof(data32)))\
-- return -EFAULT;\
-- memset(&data, 0, sizeof(data));\
-- convert_from_32(type, &data, &data32);\
-- oldseg = get_fs();\
-- set_fs(KERNEL_DS);\
-- err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)&data);\
-- set_fs(oldseg);\
-- if (err < 0) \
-- return err;\
-- if (native_ctl & (_IOC_READ << _IOC_DIRSHIFT)) {\
-- convert_to_32(type, &data32, &data);\
-- if (copy_to_user((void __user *)arg, &data32, sizeof(data32)))\
-- return -EFAULT;\
-- }\
-- return 0;\
--}
--
--#define DEFINE_ALSA_IOCTL_BIG(type) \
--static inline int _snd_ioctl32_##type(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)\
--{\
-- struct sndrv_##type##32 *data32;\
-- struct sndrv_##type *data;\
-- mm_segment_t oldseg;\
-- int err;\
-- data32 = kmalloc(sizeof(*data32), GFP_KERNEL); \
-- data = kmalloc(sizeof(*data), GFP_KERNEL); \
-- if (data32 == NULL || data == NULL) { \
-- err = -ENOMEM; \
-- goto __end; \
-- }\
-- if (copy_from_user(data32, (void __user *)arg, sizeof(*data32))) { \
-- err = -EFAULT; \
-- goto __end; \
-- }\
-- memset(data, 0, sizeof(*data));\
-+ data32 = compat_ptr(arg);\
-+ data = compat_alloc_user_space(sizeof(*data));\
- convert_from_32(type, data, data32);\
-- oldseg = get_fs();\
-- set_fs(KERNEL_DS);\
- err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)data);\
-- set_fs(oldseg);\
- if (err < 0) \
-- goto __end;\
-- err = 0;\
-+ return err;\
- if (native_ctl & (_IOC_READ << _IOC_DIRSHIFT)) {\
- convert_to_32(type, data32, data);\
-- if (copy_to_user((void __user *)arg, data32, sizeof(*data32)))\
-- err = -EFAULT;\
- }\
-- __end:\
-- if (data)\
-- kfree(data);\
-- if (data32)\
-- kfree(data32);\
-- return err;\
-+ return 0;\
- }
-
- #define DEFINE_ALSA_IOCTL_ENTRY(name,type,native_ctl) \
-@@ -128,4 +99,12 @@
- int snd_ioctl32_register(struct ioctl32_mapper *mappers);
- void snd_ioctl32_unregister(struct ioctl32_mapper *mappers);
-
-+#if defined(CONFIG_SPARC64) && LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 8)
-+#ifdef copy_in_user
-+#undef copy_in_user
-+#endif
-+size_t hack_copy_in_user(void __user *to, const void __user *from, size_t size);
-+#define copy_in_user hack_copy_in_user
-+#endif
-+
- #endif /* __ALSA_IOCTL32_H */
-Index: alsa-kernel/core/ioctl32/pcm32.c
-===================================================================
-RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/core/ioctl32/pcm32.c,v
-retrieving revision 1.25
-diff -u -r1.25 pcm32.c
---- alsa-kernel/core/ioctl32/pcm32.c 18 Oct 2004 14:36:00 -0000 1.25
-+++ alsa-kernel/core/ioctl32/pcm32.c 26 Nov 2004 13:47:57 -0000
-@@ -41,23 +41,15 @@
- u32 val;
- };
-
--#define CVT_sndrv_pcm_sframes_str() { COPY(val); }
--#define CVT_sndrv_pcm_uframes_str() { COPY(val); }
-+#define CVT_sndrv_pcm_sframes_str() { COPY_CVT(val); }
-+#define CVT_sndrv_pcm_uframes_str() { COPY_CVT(val); }
-
-
--struct sndrv_interval32 {
-- u32 min, max;
-- unsigned int openmin:1,
-- openmax:1,
-- integer:1,
-- empty:1;
--};
--
- struct sndrv_pcm_hw_params32 {
- u32 flags;
- struct sndrv_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - SNDRV_PCM_HW_PARAM_FIRST_MASK + 1]; /* this must be identical */
- struct sndrv_mask mres[5]; /* reserved masks */
-- struct sndrv_interval32 intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1];
-+ struct sndrv_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1];
- struct sndrv_interval ires[9]; /* reserved intervals */
- u32 rmask;
- u32 cmask;
-@@ -69,31 +61,6 @@
- unsigned char reserved[64];
- } __attribute__((packed));
-
--#define numberof(array) ARRAY_SIZE(array)
--
--#define CVT_sndrv_pcm_hw_params()\
--{\
-- unsigned int i;\
-- COPY(flags);\
-- for (i = 0; i < numberof(dst->masks); i++)\
-- COPY(masks[i]);\
-- for (i = 0; i < numberof(dst->intervals); i++) {\
-- COPY(intervals[i].min);\
-- COPY(intervals[i].max);\
-- COPY(intervals[i].openmin);\
-- COPY(intervals[i].openmax);\
-- COPY(intervals[i].integer);\
-- COPY(intervals[i].empty);\
-- }\
-- COPY(rmask);\
-- COPY(cmask);\
-- COPY(info);\
-- COPY(msbits);\
-- COPY(rate_num);\
-- COPY(rate_den);\
-- COPY(fifo_size);\
--}
--
- struct sndrv_pcm_sw_params32 {
- s32 tstamp_mode;
- u32 period_step;
-@@ -113,13 +80,13 @@
- COPY(tstamp_mode);\
- COPY(period_step);\
- COPY(sleep_min);\
-- COPY(avail_min);\
-- COPY(xfer_align);\
-- COPY(start_threshold);\
-- COPY(stop_threshold);\
-- COPY(silence_threshold);\
-- COPY(silence_size);\
-- COPY(boundary);\
-+ COPY_CVT(avail_min);\
-+ COPY_CVT(xfer_align);\
-+ COPY_CVT(start_threshold);\
-+ COPY_CVT(stop_threshold);\
-+ COPY_CVT(silence_threshold);\
-+ COPY_CVT(silence_size);\
-+ COPY_CVT(boundary);\
- }
-
- struct sndrv_pcm_channel_info32 {
-@@ -132,7 +99,7 @@
- #define CVT_sndrv_pcm_channel_info()\
- {\
- COPY(channel);\
-- COPY(offset);\
-+ COPY_CVT(offset);\
- COPY(first);\
- COPY(step);\
- }
-@@ -154,16 +121,16 @@
- #define CVT_sndrv_pcm_status()\
- {\
- COPY(state);\
-- COPY(trigger_tstamp.tv_sec);\
-- COPY(trigger_tstamp.tv_nsec);\
-- COPY(tstamp.tv_sec);\
-- COPY(tstamp.tv_nsec);\
-- COPY(appl_ptr);\
-- COPY(hw_ptr);\
-- COPY(delay);\
-- COPY(avail);\
-- COPY(avail_max);\
-- COPY(overrange);\
-+ COPY_CVT(trigger_tstamp.tv_sec);\
-+ COPY_CVT(trigger_tstamp.tv_nsec);\
-+ COPY_CVT(tstamp.tv_sec);\
-+ COPY_CVT(tstamp.tv_nsec);\
-+ COPY_CVT(appl_ptr);\
-+ COPY_CVT(hw_ptr);\
-+ COPY_CVT(delay);\
-+ COPY_CVT(avail);\
-+ COPY_CVT(avail_max);\
-+ COPY_CVT(overrange);\
- COPY(suspended_state);\
- }
-
-@@ -173,61 +140,60 @@
- DEFINE_ALSA_IOCTL(pcm_channel_info);
- DEFINE_ALSA_IOCTL(pcm_status);
-
-+int snd_pcm_hw_refine(snd_pcm_substream_t *substream, snd_pcm_hw_params_t *params);
-+int snd_pcm_hw_params(snd_pcm_substream_t *substream, snd_pcm_hw_params_t *params);
-+
- /* recalcuate the boundary within 32bit */
--static void recalculate_boundary(struct file *file)
-+static void recalculate_boundary(snd_pcm_runtime_t *runtime)
- {
-- snd_pcm_file_t *pcm_file;
-- snd_pcm_substream_t *substream;
-- snd_pcm_runtime_t *runtime;
--
-- /* FIXME: need to check whether fop->ioctl is sane */
-- if (! (pcm_file = file->private_data))
-- return;
-- if (! (substream = pcm_file->substream))
-- return;
-- if (! (runtime = substream->runtime))
-+ if (! runtime->buffer_size)
- return;
- runtime->boundary = runtime->buffer_size;
- while (runtime->boundary * 2 <= 0x7fffffffUL - runtime->buffer_size)
- runtime->boundary *= 2;
- }
-
-+/* both for HW_PARAMS and HW_REFINE */
- static inline int _snd_ioctl32_pcm_hw_params(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)
- {
-- struct sndrv_pcm_hw_params32 *data32;
-+ struct sndrv_pcm_hw_params32 __user *data32;
- struct sndrv_pcm_hw_params *data;
-- mm_segment_t oldseg;
-+ snd_pcm_file_t *pcm_file;
-+ snd_pcm_substream_t *substream;
-+ snd_pcm_runtime_t *runtime;
- int err;
-
-- data32 = kmalloc(sizeof(*data32), GFP_KERNEL);
-+ if (! (pcm_file = file->private_data))
-+ return -ENXIO;
-+ if (! (substream = pcm_file->substream))
-+ return -ENXIO;
-+ if (! (runtime = substream->runtime))
-+ return -ENXIO;
-+
-+ data32 = compat_ptr(arg);
- data = kmalloc(sizeof(*data), GFP_KERNEL);
-- if (data32 == NULL || data == NULL) {
-- err = -ENOMEM;
-- goto __end;
-- }
-- if (copy_from_user(data32, (void __user *)arg, sizeof(*data32))) {
-+ if (data == NULL)
-+ return -ENOMEM;
-+ if (copy_from_user(data, data32, sizeof(*data32))) {
- err = -EFAULT;
-- goto __end;
-+ goto error;
- }
-- memset(data, 0, sizeof(*data));
-- convert_from_32(pcm_hw_params, data, data32);
-- oldseg = get_fs();
-- set_fs(KERNEL_DS);
-- err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)data);
-- set_fs(oldseg);
-+ if (native_ctl == SNDRV_PCM_IOCTL_HW_REFINE)
-+ err = snd_pcm_hw_refine(substream, data);
-+ else
-+ err = snd_pcm_hw_params(substream, data);
- if (err < 0)
-- goto __end;
-- err = 0;
-- convert_to_32(pcm_hw_params, data32, data);
-- if (copy_to_user((void __user *)arg, data32, sizeof(*data32)))
-+ goto error;
-+ if (copy_to_user(data32, data, sizeof(*data32)) ||
-+ __put_user((u32)data->fifo_size, &data32->fifo_size)) {
- err = -EFAULT;
-- else
-- recalculate_boundary(file);
-- __end:
-- if (data)
-- kfree(data);
-- if (data32)
-- kfree(data32);
-+ goto error;
-+ }
-+
-+ if (native_ctl == SNDRV_PCM_IOCTL_HW_PARAMS)
-+ recalculate_boundary(runtime);
-+ error:
-+ kfree(data);
- return err;
- }
-
-@@ -243,24 +209,24 @@
- static inline int _snd_ioctl32_xferi(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)
- {
- struct sndrv_xferi32 data32;
-- struct sndrv_xferi data;
-- mm_segment_t oldseg;
-+ struct sndrv_xferi __user *data;
-+ snd_pcm_sframes_t result;
- int err;
-
- if (copy_from_user(&data32, (void __user *)arg, sizeof(data32)))
- return -EFAULT;
-- memset(&data, 0, sizeof(data));
-- data.result = data32.result;
-- data.buf = compat_ptr(data32.buf);
-- data.frames = data32.frames;
-- oldseg = get_fs();
-- set_fs(KERNEL_DS);
-- err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)&data);
-- set_fs(oldseg);
-+ data = compat_alloc_user_space(sizeof(*data));
-+ if (put_user((snd_pcm_sframes_t)data32.result, &data->result) ||
-+ __put_user(compat_ptr(data32.buf), &data->buf) ||
-+ __put_user((snd_pcm_uframes_t)data32.frames, &data->frames))
-+ return -EFAULT;
-+ err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)data);
- if (err < 0)
- return err;
- /* copy the result */
-- data32.result = data.result;
-+ if (__get_user(result, &data->result))
-+ return -EFAULT;
-+ data32.result = result;
- if (copy_to_user((void __user *)arg, &data32, sizeof(data32)))
- return -EFAULT;
- return 0;
-@@ -284,12 +250,11 @@
- {
- snd_pcm_file_t *pcm_file;
- snd_pcm_substream_t *substream;
-+ struct sndrv_xfern32 __user *srcptr = compat_ptr(arg);
- struct sndrv_xfern32 data32;
-- struct sndrv_xfern32 __user *srcptr = (void __user *)arg;
-- void __user **bufs = NULL;
-+ void __user **bufs;
- int err = 0, ch, i;
- u32 __user *bufptr;
-- mm_segment_t oldseg;
-
- /* FIXME: need to check whether fop->ioctl is sane */
-
-@@ -312,22 +277,21 @@
- }
- if ((ch = substream->runtime->channels) > 128)
- return -EINVAL;
-- if (get_user(data32.frames, &srcptr->frames))
-+ if (copy_from_user(&data32, (void __user *)arg, sizeof(data32)))
- return -EFAULT;
-- __get_user(data32.bufs, &srcptr->bufs);
- bufptr = compat_ptr(data32.bufs);
-- bufs = kmalloc(sizeof(void *) * 128, GFP_KERNEL);
-+ bufs = kmalloc(sizeof(void __user *) * ch, GFP_KERNEL);
- if (bufs == NULL)
- return -ENOMEM;
- for (i = 0; i < ch; i++) {
- u32 ptr;
-- if (get_user(ptr, bufptr))
-+ if (get_user(ptr, bufptr)) {
-+ kfree(bufs);
- return -EFAULT;
-+ }
- bufs[ch] = compat_ptr(ptr);
- bufptr++;
- }
-- oldseg = get_fs();
-- set_fs(KERNEL_DS);
- switch (native_ctl) {
- case SNDRV_PCM_IOCTL_WRITEN_FRAMES:
- err = snd_pcm_lib_writev(substream, bufs, data32.frames);
-@@ -336,109 +300,15 @@
- err = snd_pcm_lib_readv(substream, bufs, data32.frames);
- break;
- }
-- set_fs(oldseg);
- if (err >= 0) {
- if (put_user(err, &srcptr->result))
- err = -EFAULT;
- }
- kfree(bufs);
-- return 0;
--}
--
--
--struct sndrv_pcm_hw_params_old32 {
-- u32 flags;
-- u32 masks[SNDRV_PCM_HW_PARAM_SUBFORMAT -
-- SNDRV_PCM_HW_PARAM_ACCESS + 1];
-- struct sndrv_interval32 intervals[SNDRV_PCM_HW_PARAM_TICK_TIME -
-- SNDRV_PCM_HW_PARAM_SAMPLE_BITS + 1];
-- u32 rmask;
-- u32 cmask;
-- u32 info;
-- u32 msbits;
-- u32 rate_num;
-- u32 rate_den;
-- u32 fifo_size;
-- unsigned char reserved[64];
--} __attribute__((packed));
--
--#define __OLD_TO_NEW_MASK(x) ((x&7)|((x&0x07fffff8)<<5))
--#define __NEW_TO_OLD_MASK(x) ((x&7)|((x&0xffffff00)>>5))
--
--static void snd_pcm_hw_convert_from_old_params(snd_pcm_hw_params_t *params, struct sndrv_pcm_hw_params_old32 *oparams)
--{
-- unsigned int i;
--
-- memset(params, 0, sizeof(*params));
-- params->flags = oparams->flags;
-- for (i = 0; i < ARRAY_SIZE(oparams->masks); i++)
-- params->masks[i].bits[0] = oparams->masks[i];
-- memcpy(params->intervals, oparams->intervals, sizeof(oparams->intervals));
-- params->rmask = __OLD_TO_NEW_MASK(oparams->rmask);
-- params->cmask = __OLD_TO_NEW_MASK(oparams->cmask);
-- params->info = oparams->info;
-- params->msbits = oparams->msbits;
-- params->rate_num = oparams->rate_num;
-- params->rate_den = oparams->rate_den;
-- params->fifo_size = oparams->fifo_size;
--}
--
--static void snd_pcm_hw_convert_to_old_params(struct sndrv_pcm_hw_params_old32 *oparams, snd_pcm_hw_params_t *params)
--{
-- unsigned int i;
--
-- memset(oparams, 0, sizeof(*oparams));
-- oparams->flags = params->flags;
-- for (i = 0; i < ARRAY_SIZE(oparams->masks); i++)
-- oparams->masks[i] = params->masks[i].bits[0];
-- memcpy(oparams->intervals, params->intervals, sizeof(oparams->intervals));
-- oparams->rmask = __NEW_TO_OLD_MASK(params->rmask);
-- oparams->cmask = __NEW_TO_OLD_MASK(params->cmask);
-- oparams->info = params->info;
-- oparams->msbits = params->msbits;
-- oparams->rate_num = params->rate_num;
-- oparams->rate_den = params->rate_den;
-- oparams->fifo_size = params->fifo_size;
--}
--
--static inline int _snd_ioctl32_pcm_hw_params_old(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file, unsigned int native_ctl)
--{
-- struct sndrv_pcm_hw_params_old32 *data32;
-- struct sndrv_pcm_hw_params *data;
-- mm_segment_t oldseg;
-- int err;
--
-- data32 = kcalloc(1, sizeof(*data32), GFP_KERNEL);
-- data = kcalloc(1, sizeof(*data), GFP_KERNEL);
-- if (data32 == NULL || data == NULL) {
-- err = -ENOMEM;
-- goto __end;
-- }
-- if (copy_from_user(data32, (void __user *)arg, sizeof(*data32))) {
-- err = -EFAULT;
-- goto __end;
-- }
-- snd_pcm_hw_convert_from_old_params(data, data32);
-- oldseg = get_fs();
-- set_fs(KERNEL_DS);
-- err = file->f_op->ioctl(file->f_dentry->d_inode, file, native_ctl, (unsigned long)data);
-- set_fs(oldseg);
-- if (err < 0)
-- goto __end;
-- snd_pcm_hw_convert_to_old_params(data32, data);
-- err = 0;
-- if (copy_to_user((void __user *)arg, data32, sizeof(*data32)))
-- err = -EFAULT;
-- else
-- recalculate_boundary(file);
-- __end:
-- if (data)
-- kfree(data);
-- if (data32)
-- kfree(data32);
- return err;
- }
-
-+
- struct sndrv_pcm_mmap_status32 {
- s32 state;
- s32 pad1;
-@@ -469,15 +339,15 @@
- COPY(flags);\
- COPY(s.status.state);\
- COPY(s.status.pad1);\
-- COPY(s.status.hw_ptr);\
-- COPY(s.status.tstamp.tv_sec);\
-- COPY(s.status.tstamp.tv_nsec);\
-+ COPY_CVT(s.status.hw_ptr);\
-+ COPY_CVT(s.status.tstamp.tv_sec);\
-+ COPY_CVT(s.status.tstamp.tv_nsec);\
- COPY(s.status.suspended_state);\
-- COPY(c.control.appl_ptr);\
-- COPY(c.control.avail_min);\
-+ COPY_CVT(c.control.appl_ptr);\
-+ COPY_CVT(c.control.avail_min);\
- }
-
--DEFINE_ALSA_IOCTL_BIG(pcm_sync_ptr);
-+DEFINE_ALSA_IOCTL(pcm_sync_ptr);
-
- /*
- */
-@@ -485,8 +355,6 @@
- DEFINE_ALSA_IOCTL_ENTRY(pcm_hw_refine, pcm_hw_params, SNDRV_PCM_IOCTL_HW_REFINE);
- DEFINE_ALSA_IOCTL_ENTRY(pcm_hw_params, pcm_hw_params, SNDRV_PCM_IOCTL_HW_PARAMS);
- DEFINE_ALSA_IOCTL_ENTRY(pcm_sw_params, pcm_sw_params, SNDRV_PCM_IOCTL_SW_PARAMS);
--DEFINE_ALSA_IOCTL_ENTRY(pcm_hw_refine_old, pcm_hw_params_old, SNDRV_PCM_IOCTL_HW_REFINE);
--DEFINE_ALSA_IOCTL_ENTRY(pcm_hw_params_old, pcm_hw_params_old, SNDRV_PCM_IOCTL_HW_PARAMS);
- DEFINE_ALSA_IOCTL_ENTRY(pcm_status, pcm_status, SNDRV_PCM_IOCTL_STATUS);
- DEFINE_ALSA_IOCTL_ENTRY(pcm_delay, pcm_sframes_str, SNDRV_PCM_IOCTL_DELAY);
- DEFINE_ALSA_IOCTL_ENTRY(pcm_channel_info, pcm_channel_info, SNDRV_PCM_IOCTL_CHANNEL_INFO);
-@@ -538,8 +406,6 @@
- SNDRV_PCM_IOCTL_READI_FRAMES32 = _IOR('A', 0x51, struct sndrv_xferi32),
- SNDRV_PCM_IOCTL_WRITEN_FRAMES32 = _IOW('A', 0x52, struct sndrv_xfern32),
- SNDRV_PCM_IOCTL_READN_FRAMES32 = _IOR('A', 0x53, struct sndrv_xfern32),
-- SNDRV_PCM_IOCTL_HW_REFINE_OLD32 = _IOWR('A', 0x10, struct sndrv_pcm_hw_params_old32),
-- SNDRV_PCM_IOCTL_HW_PARAMS_OLD32 = _IOWR('A', 0x11, struct sndrv_pcm_hw_params_old32),
- SNDRV_PCM_IOCTL_SYNC_PTR32 = _IOWR('A', 0x23, struct sndrv_pcm_sync_ptr32),
-
- };
-@@ -551,8 +417,6 @@
- MAP_COMPAT(SNDRV_PCM_IOCTL_TSTAMP),
- { SNDRV_PCM_IOCTL_HW_REFINE32, AP(pcm_hw_refine) },
- { SNDRV_PCM_IOCTL_HW_PARAMS32, AP(pcm_hw_params) },
-- { SNDRV_PCM_IOCTL_HW_REFINE_OLD32, AP(pcm_hw_refine_old) },
-- { SNDRV_PCM_IOCTL_HW_PARAMS_OLD32, AP(pcm_hw_params_old) },
- MAP_COMPAT(SNDRV_PCM_IOCTL_HW_FREE),
- { SNDRV_PCM_IOCTL_SW_PARAMS32, AP(pcm_sw_params) },
- { SNDRV_PCM_IOCTL_STATUS32, AP(pcm_status) },
-Index: alsa-kernel/core/ioctl32/rawmidi32.c
-===================================================================
-RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/core/ioctl32/rawmidi32.c,v
-retrieving revision 1.7
-diff -u -r1.7 rawmidi32.c
---- alsa-kernel/core/ioctl32/rawmidi32.c 18 Jun 2003 10:34:08 -0000 1.7
-+++ alsa-kernel/core/ioctl32/rawmidi32.c 23 Nov 2004 14:21:11 -0000
-@@ -38,9 +38,11 @@
- #define CVT_sndrv_rawmidi_params()\
- {\
- COPY(stream);\
-- COPY(buffer_size);\
-- COPY(avail_min);\
-- COPY(no_active_sensing);\
-+ COPY_CVT(buffer_size);\
-+ COPY_CVT(avail_min);\
-+ if (copy_in_user(((size_t __user *)&dst->avail_min + 1),\
-+ ((size_t __user *)&src->avail_min + 1), 4)) \
-+ return -EFAULT;\
- }
-
- struct sndrv_rawmidi_status32 {
-@@ -54,10 +56,10 @@
- #define CVT_sndrv_rawmidi_status()\
- {\
- COPY(stream);\
-- COPY(tstamp.tv_sec);\
-- COPY(tstamp.tv_nsec);\
-- COPY(avail);\
-- COPY(xruns);\
-+ COPY_CVT(tstamp.tv_sec);\
-+ COPY_CVT(tstamp.tv_nsec);\
-+ COPY_CVT(avail);\
-+ COPY_CVT(xruns);\
- }
-
- DEFINE_ALSA_IOCTL(rawmidi_params);
-Index: alsa-kernel/core/ioctl32/seq32.c
-===================================================================
-RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/core/ioctl32/seq32.c,v
-retrieving revision 1.8
-diff -u -r1.8 seq32.c
---- alsa-kernel/core/ioctl32/seq32.c 6 Feb 2003 17:58:36 -0000 1.8
-+++ alsa-kernel/core/ioctl32/seq32.c 23 Nov 2004 14:23:44 -0000
-@@ -42,13 +42,14 @@
-
- u32 kernel; /* reserved for kernel use (must be NULL) */
- u32 flags; /* misc. conditioning */
-- char reserved[60]; /* for future use */
-+ unsigned char time_queue; /* queue # for timestamping */
-+ char reserved[59]; /* for future use */
- };
-
- #define CVT_sndrv_seq_port_info()\
- {\
- COPY(addr);\
-- memcpy(dst->name, src->name, sizeof(dst->name));\
-+ COPY_ARRAY(name);\
- COPY(capability);\
- COPY(type);\
- COPY(midi_channels);\
-@@ -57,6 +58,7 @@
- COPY(read_use);\
- COPY(write_use);\
- COPY(flags);\
-+ COPY(time_queue);\
- }
-
- DEFINE_ALSA_IOCTL(seq_port_info);
-Index: alsa-kernel/core/ioctl32/timer32.c
-===================================================================
-RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/core/ioctl32/timer32.c,v
-retrieving revision 1.8
-diff -u -r1.8 timer32.c
---- alsa-kernel/core/ioctl32/timer32.c 28 Mar 2004 15:57:48 -0000 1.8
-+++ alsa-kernel/core/ioctl32/timer32.c 23 Nov 2004 14:12:47 -0000
-@@ -41,9 +41,9 @@
- {\
- COPY(flags);\
- COPY(card);\
-- memcpy(dst->id, src->id, sizeof(src->id));\
-- memcpy(dst->name, src->name, sizeof(src->name));\
-- COPY(resolution);\
-+ COPY_ARRAY(id);\
-+ COPY_ARRAY(name);\
-+ COPY_CVT(resolution);\
- }
-
- struct sndrv_timer_status32 {
-@@ -57,8 +57,8 @@
-
- #define CVT_sndrv_timer_status()\
- {\
-- COPY(tstamp.tv_sec);\
-- COPY(tstamp.tv_nsec);\
-+ COPY_CVT(tstamp.tv_sec);\
-+ COPY_CVT(tstamp.tv_nsec);\
- COPY(resolution);\
- COPY(lost);\
- COPY(overrun);\
-Index: alsa-kernel/include/control.h
-===================================================================
-RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/include/control.h,v
-retrieving revision 1.9
-diff -u -r1.9 control.h
---- alsa-kernel/include/control.h 29 Jun 2004 16:01:15 -0000 1.9
-+++ alsa-kernel/include/control.h 26 Nov 2004 14:06:21 -0000
-@@ -122,6 +122,10 @@
- int snd_ctl_register_ioctl(snd_kctl_ioctl_func_t fcn);
- int snd_ctl_unregister_ioctl(snd_kctl_ioctl_func_t fcn);
-
-+/* for ioctl32 */
-+int snd_ctl_elem_read(snd_card_t *card, snd_ctl_elem_value_t *control);
-+int snd_ctl_elem_write(snd_ctl_file_t *file, snd_ctl_elem_value_t *control);
-+
- static inline unsigned int snd_ctl_get_ioffnum(snd_kcontrol_t *kctl, snd_ctl_elem_id_t *id)
- {
- return id->numid - kctl->id.numid;
-Index: alsa-kernel/include/pcm.h
-===================================================================
-RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/include/pcm.h,v
-retrieving revision 1.51
-diff -u -r1.51 pcm.h
---- alsa-kernel/include/pcm.h 8 Nov 2004 11:39:35 -0000 1.51
-+++ alsa-kernel/include/pcm.h 26 Nov 2004 13:41:20 -0000
-@@ -810,6 +810,7 @@
- int snd_pcm_hw_params_choose(snd_pcm_substream_t *substream, snd_pcm_hw_params_t *params);
-
- int snd_pcm_hw_refine(snd_pcm_substream_t *substream, snd_pcm_hw_params_t *params);
-+int snd_pcm_hw_params(snd_pcm_substream_t *substream, snd_pcm_hw_params_t *params);
-
- int snd_pcm_hw_constraints_init(snd_pcm_substream_t *substream);
- int snd_pcm_hw_constraints_complete(snd_pcm_substream_t *substream);
diff --git a/media-sound/alsa-driver/files/digest-alsa-driver-1.0.7-r1 b/media-sound/alsa-driver/files/digest-alsa-driver-1.0.7-r1
deleted file mode 100644
index daf5cb7de471..000000000000
--- a/media-sound/alsa-driver/files/digest-alsa-driver-1.0.7-r1
+++ /dev/null
@@ -1 +0,0 @@
-MD5 30be8b50ab699f917fb20537bc6509ad alsa-driver-1.0.7.tar.bz2 1829053
diff --git a/media-sound/alsa-driver/files/digest-alsa-driver-1.0.7-r2 b/media-sound/alsa-driver/files/digest-alsa-driver-1.0.7-r2
deleted file mode 100644
index daf5cb7de471..000000000000
--- a/media-sound/alsa-driver/files/digest-alsa-driver-1.0.7-r2
+++ /dev/null
@@ -1 +0,0 @@
-MD5 30be8b50ab699f917fb20537bc6509ad alsa-driver-1.0.7.tar.bz2 1829053
diff --git a/media-sound/alsa-driver/files/digest-alsa-driver-1.0.7 b/media-sound/alsa-driver/files/digest-alsa-driver-1.0.7-r3
index daf5cb7de471..daf5cb7de471 100644
--- a/media-sound/alsa-driver/files/digest-alsa-driver-1.0.7
+++ b/media-sound/alsa-driver/files/digest-alsa-driver-1.0.7-r3