Here is a patch against the 1.0.14rc3 tarball. It will need more refinement for HG, but it works on my Mandriva 2007 kernels.
Signed off by Tobin Davis <tdavis@xxxxxxxxxxxx> |
On Thu, 2007-03-01 at 11:56 -0800, Allyn, Mark A wrote:
Hi:
I am getting the same error trying to compile either the 1.0.14rc3 or the Mercury versions of the driver.
I get the following in both:
====================================
CC [M] /root/newaudio/alsa-driver-1.0.14rc3/acore/rtctimer.o
In file included from /root/newaudio/alsa-driver-1.0.14rc3/include/linux/log2.h:1,
from /root/newaudio/alsa-driver-1.0.14rc3/acore/../alsa-kernel/core/rtctimer.c:27,
from /root/newaudio/alsa-driver-1.0.14rc3/acore/rtctimer.c:1:
/root/newaudio/alsa-driver-1.0.14rc3/include/log2_compat.h:8: error: syntax error before "is_power_of_2"
/root/newaudio/alsa-driver-1.0.14rc3/include/log2_compat.h:9: warning: return type defaults to `int'
make[4]: *** [/root/newaudio/alsa-driver-1.0.14rc3/acore/rtctimer.o] Error 1
make[3]: *** [/root/newaudio/alsa-driver-1.0.14rc3/acore] Error 2
make[2]: *** [_module_/root/newaudio/alsa-driver-1.0.14rc3] Error 2
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/mnt1/src/linux-2.6.17.13.i686'
make: *** [compile] Error 2
====================================
The header file, log2_compat.h is not in the rc2 release; I have no problems compiling rc2.
Does this mean that I have to be up to a certain rev on the kernel?
I am running red flag with the 2.6.17.13 kernel.
Thanks
Mark Allyn
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-devel
--- alsa-driver-1.0.14rc3.orig/acore/Makefile 2007-02-26 00:59:24.000000000 -0800 +++ alsa-driver-1.0.14rc3/acore/Makefile 2007-03-02 09:57:45.000000000 -0800 @@ -6,12 +6,12 @@ include $(SND_TOPDIR)/Makefile.conf clean-files := info.c pcm.c pcm_native.c control.c hwdep.c init.c rawmidi.c \ - sound.c timer.c memalloc.c misc.c + sound.c timer.c memalloc.c misc.c rtctimer.c export-objs := control.o device.o info.o info_oss.o init.o isadma.o memory.o \ misc.o misc_driver.o sound.o sound_oss.o \ pcm.o pcm_lib.o pcm_memory.o pcm_misc.o pcm_native.o \ - rawmidi.o timer.o hwdep.o memalloc.o + rawmidi.o timer.o hwdep.o memalloc.o rtctimer.o include $(SND_TOPDIR)/alsa-kernel/core/Makefile @@ -36,5 +36,6 @@ rawmidi.c: rawmidi.patch $(SND_TOPDIR)/alsa-kernel/core/rawmidi.c sound.c: sound.patch $(SND_TOPDIR)/alsa-kernel/core/sound.c timer.c: timer.patch $(SND_TOPDIR)/alsa-kernel/core/timer.c +rtctimer.c: rtctimer.patch $(SND_TOPDIR)/alsa-kernel/core/rtctimer.c memalloc.c: memalloc.patch memalloc.inc memalloc.inc1 $(SND_TOPDIR)/alsa-kernel/core/memalloc.c misc.c: misc.patch $(SND_TOPDIR)/alsa-kernel/core/misc.c --- /dev/null 2007-03-01 22:57:55.348146750 -0800 +++ alsa-driver-1.0.14rc3/acore/rtctimer.patch 2007-03-02 09:50:14.000000000 -0800 @@ -0,0 +1,24 @@ +--- ../alsa-kernel/core/rtctimer.c 2007-02-26 00:59:29.000000000 -0800 ++++ rtctimer.c 2007-03-02 09:49:45.000000000 -0800 +@@ -24,7 +24,9 @@ + #include <linux/init.h> + #include <linux/interrupt.h> + #include <linux/moduleparam.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 21) + #include <linux/log2.h> ++#endif + #include <sound/core.h> + #include <sound/timer.h> + +@@ -130,7 +132,11 @@ + struct snd_timer *timer; + + if (rtctimer_freq < 2 || rtctimer_freq > 8192 || ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 21) + !is_power_of_2(rtctimer_freq)) { ++#else ++ (rtctimer_freq & (rtctimer_freq - 1)) != 0) { ++#endif + snd_printk(KERN_ERR "rtctimer: invalid frequency %d\n", + rtctimer_freq); + return -EINVAL;
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-devel