[CentOS] alsa 1.0.11 compile on 4.3

Thu Apr 27 21:39:59 UTC 2006
Hilliard, Jay <Jay.Hilliard at disney.com>

Jerry Geis wrote:
> Here is the error I get compiling alsa-drivers.
> sorry I did not include that in my earlier post.
> 
> make[3]: Leaving directory `/usr/src/alsa-driver-1.0.11/pcmcia/vx'
> make[2]: Leaving directory `/usr/src/alsa-driver-1.0.11/pcmcia'
> make[1]: Leaving directory `/usr/src/alsa-driver-1.0.11'
> make -C /lib/modules/2.6.9-34.ELsmp/build 
> SUBDIRS=/usr/src/alsa-driver-1.0.11  modules
> make[1]: Entering directory `/usr/src/kernels/2.6.9-34.EL-smp-x86_64'
>  CC [M]  /usr/src/alsa-driver-1.0.11/acore/hwdep.o
> In file included from 
> /usr/src/alsa-driver-1.0.11/include/sound/driver.h:47,
>                 from /usr/src/alsa-driver-1.0.11/acore/hwdep.c:22:
> /usr/src/alsa-driver-1.0.11/include/adriver.h:219: error: conflicting 
> types for 'gfp_t'
> include/linux/gfp.h:134: error: previous declaration of 'gfp_t' was here
> make[3]: *** [/usr/src/alsa-driver-1.0.11/acore/hwdep.o] Error 1
> make[2]: *** [/usr/src/alsa-driver-1.0.11/acore] Error 2
> make[1]: *** [_module_/usr/src/alsa-driver-1.0.11] Error 2
> make[1]: Leaving directory `/usr/src/kernels/2.6.9-34.EL-smp-x86_64'
> make: *** [compile] Error 2
> 

I did, here are some notes on the changes I made:

include/adriver.h   (comment out line 214)
  /*typedef unsigned __nocast gfp_t; */

alsa-kernel/core/pcm_native.c    (line 73)
  - DEFINE_RWLOCK(snd_pcm_link_rwlock);
  + rwlock_t snd_pcm_link_rwlock = RW_LOCK_UNLOCKED;


alsa-kernel/core/init.c  (line 43)
  - DEFINE_RWLOCK(snd_card_rwlock);
  + rwlock_t snd_card_rwlock = RW_LOCK_UNLOCKED;

utils/alsa-driver.spec.in (remove BuildRequires line)
   BuildRequires:  kernel-source >= 2.4

-Jay