This patch aims at fixing ALSA support for older PowerMacs.

Check first with lsmod that you are using snd-powermac:
risto@orange:~$ lsmod | grep ^snd.powermac
snd_powermac 56576 0
risto@orange:~$

Then you will need to install make, C-compiler and kernel headers corresponding to your running kernel, f.ex (Dapper 6.06.1):
sudo aptitude install make gcc linux-headers-2.6.15-26-powerpc

and fetch the ALSA driver source code and my patch:
wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.16.tar.bz2
wget http://ristosu.wippiespace.com/pub/alsa-driver-1.0.16-p5.diff

Unpack the source and apply the patch:
tar xjf alsa-driver-1.0.16.tar.bz2
cd alsa-driver-1.0.16
patch -p0 < ../alsa-driver-1.0.16-p5.diff

Finally configure:
./configure --disable-verbose-printk --with-kernel=/usr/src/linux-headers-2.6.15-26-powerpc --with-build=/usr/src/linux-headers-2.6.15-26-powerpc --with-moddir=/lib/modules/2.6.15-26-powerpc/updates/sound --with-isapnp=no --with-oss=yes --with-pcm-oss-plugins=yes --with-cards=powermac

Due to a bug in releasing IRQs when unloading the module: if include/config.h has a line (near end, happens with older kernels):
/* #undef CONFIG_SND_NEW_IRQ_HANDLER */

change it to:
#define CONFIG_SND_NEW_IRQ_HANDLER 1

Make and install:
make
sudo make install-modules

To load the new modules without rebooting:
sudo modprobe -r snd-powermac
sudo modprobe -r snd-pcm-oss
sudo modprobe snd-powermac