Penguin
Note: You are viewing an old revision of this page. View the current version.

Compiling ALSA on RedHatLinux

if modprobe(8) complains about unresolved symbols in schedule_work, you need to run

touch include/linux/workqueue.h

between ./configure and make(1) on alsa-driver.

Compiling ALSA on RedHatLinux using the FreshRpms SRPM

You probably want to set up your own .rpmmacros file first, as per RPMNotes. Remember to specify the target architecture and the card (see the ALSA soundcard matrix to find yours) to compile for, eg.

rpmbuild --rebuild alsa-driver.x.y.z-p.src.rpm --define 'cards als4000' --target $arch

where $arch might be athlon, f.ex. The RPMs will end up in RPMS/$arch/, ie f.ex in RPMS/athlon/. As with all source builds, you will need to recompile the SRPM if you upgrade your Kernel; you only need to install the kernel-module-alsa RPM, however.

modprobe(8) complains about unresolved symbols in schedule_work

You will need to get your hands dirty a bit. Install the SRPM
rpm -ivh alsa-driver.x.y.z-p.src.rpm

Now open the alsa-driver.x.y.z-p.spec in the SPECS/ directory, locate the %configure and make commands and add the following command between them.

touch include/linux/workqueue.h

Finally, RPM needs to be told to build the spec file
rpmbuild -bb --define 'cards als4000' --target $arch alsa-driver.x.y.z-p.spec

You can now install the RPMs built in the RPMS/$arch/ directory.

Software Mixing With Alsa

You can get alsa to do software mixing for you without having to resort to something like ESounD. This is done via the dmix plugin and is documented here. Basically, all you need to do is get alsa going, then put the following in a .asoundrc file in your home directory.

  1. .asoundrc file. Put this in your home directory.

pcm.mixed {

type dmix ipc_key 123456 # Any unique value ipc_key_add_uid true # No idea... slave {

pcm "hw:0,0"

  1. Apparently for OSS emulation device, you have to set the period
  2. and the buffer sizes in powers of two.

period_time 0 period_size 1024 # must be power of 2 buffer_size 4096 # ditto rate 44100

}

  1. bindings are cool. This says, that only the first
  2. two channels are to be used by dmix, which is enough for
  3. (most) oss apps and also lets multichannel chios work
  4. much faster:

bindings {

0 0 # from 0 => to 0 1 1 # from 1 => to 1

}

}

pcm.!default {

type plug slave.pcm mixed

}

pcm.dsp0 {

type plug slave.pcm mixed

}

pcm.mixer0 {

type hw card 0

}