I'm experiencing an unpleasant situation when trying to test my patches (for ALSA 1.0.16) with kernel 2.6.15. The snd-powermac module cannot be unloaded. Or can, but after that the computer stops responding before it can be shut down. A visible symptom of the problem is two kernel messages:
Trying to free free IRQ17 Trying to free free IRQ9
The oddest is that the third, IRQ8, that is freed between the other two, is ok. They are allocated and freed in the same order and manner in alsa-kernel/ppc/pmac.c.
I had to do following patches to compile and load the module, maybe the first one causes this, the second one is just to disable the TOONIE case as the chip is moved out of the driver:
--- alsa-kernel/ppc/pmac.h.orig 2008-02-05 11:23:24.000000000 +0200 +++ alsa-kernel/ppc/pmac.h 2008-03-31 23:45:36.000000000 +0300 @@ -207,4 +207,11 @@
int snd_pmac_add_automute(struct snd_pmac *chip);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16) +#define of_device_is_compatible(dev, s) device_is_compatible(dev, s) +#define input_get_drvdata(dev) (dev->private) +#define i2c_smbus_write_i2c_block_data(client, cmd, len, vals) \ + i2c_smbus_write_block_data(client, cmd, len, vals) +#endif + #endif /* __PMAC_H */ --- ppc/pmac_old.c.orig 2008-02-05 11:23:23.000000000 +0200 +++ ppc/pmac_old.c 2008-03-31 19:35:58.000000000 +0300 @@ -997,12 +1003,14 @@ chip->can_byte_swap = 0; /* FIXME: check this */ chip->control_mask = MASK_IEPC | 0x11;/* disable IEE */ break; +#ifdef SND_POWERMAC_SUPPORT_TOONIE case 0x3a: chip->num_freqs = ARRAY_SIZE(tumbler_freqs); chip->model = PMAC_TOONIE; chip->can_byte_swap = 0; /* FIXME: check this */ chip->control_mask = MASK_IEPC | 0x11;/* disable IEE */ break; +#endif } } prop = (unsigned int *)get_property(sound, "device-id", NULL);