[PlanetCCRMA] How to update the alsa driver step by step

Fernando Lopez-Lezcano nando at ccrma.Stanford.EDU
Thu Oct 11 14:51:00 2007

On Thu, 2007-10-11 at 23:12 +0200, Nigel Henry wrote:
> On Thursday 11 October 2007 22:18, Fernando Lopez-Lezcano wrote:
> > On Thu, 2007-10-11 at 20:50 +0200, Nigel Henry wrote:
> > > I want to practice upgrading the alsa driver for my fedora
> > > kernel. Currently the driver version is 1.0.14, and
> > > I want to upgrade it to the 1.0.15rc3 version.
> > >
> > > The kernel running on Fedora 7 at the moment is, and
> > > the kernel headers are installed for it. I also installed the
> > > kernel-devel package for this kernel, and the 1.0.15rc3 alsa driver is
> > > unpacked, ready, and waiting in my /home/user directory.
> > >
> > > What do I do next ?
> > >
> > > Appreciate any help, as I really need to learn how to do this stuff.
> >
> > There's two approaches. One would be to build a compatible kernel module
> > package that overrides the kernel modules of the stock kernel (that's
> > what I'm doing with kmod-alsa-rt for the Planet CCRMA kernel). The
> > second would be installing from source on top of the existing kernel
> > modules.
> Ok. I've downloaded the source for alsa driver 1.0.15rc3, and want to replace 
> the current 1.0.14 with this later version.

Make sure that you have installed the -devel package that corresponds to
the kernel you are booting (apparently the stock fedora kernel). That
should be "yum install kernel-devel". 

> On the alsa-user list it appeared to be a simple ./configure, make, su to 
> root, and make install to achieve this, but surely I need to be cd'd into 
> some directory so that the new driver is installed correctly.

Well, it should not be necessary as the files _should_ be installed in
the proper tree, which should be:

  /lib/modules/`uname -r`/

I think you will need to tell alsa where you kernel headers are located
(part of the kernel-devel package). 

> I'm sorry if I sound a bit clueless, but I havn't upgraded kernel modules 
> before.

Is there a particular reason you are doing this?

> I know you're very busy, but any step by step instructions to upgrade the alsa 
> driver would be appreciated.

The problem is I can't test this myself (as you say not enough time).
Try a configure and see what happens. If configure can't find the kernel
source tree you will have to use an option to tell it where it is. You
can do that with the "--with-kernel" option. The location will be
in /usr/src/kernels/, the exact subdirectory will depends on which
kernel you want to compile for (if you have more than one kernel-devel
package installed you will more than one directory there). If you pass
that to --with-kernel configure should be happy and then you can try a
make. Make install should do the right thing. You will need to remove
all alsa related kernel modules with /sbin/rmmod before retrying sound,
or just reboot. 

And you will need to do this for each and every kernel you install (ie:
things are not automagically rebuilt for newer kernels - each kernel is
tied very closely to all its modules, you can't really use a module
built for one kernel on another). 

-- Fernando