[PATCH] autoload snd-powermac via modalias

Olaf Hering olaf at aepfle.de
Thu Nov 8 01:43:54 EST 2007


Autoload snd-powermac on systems without i2s bus by creating a fake
modalias entry. udev/modprobe will use the 'modalias' file from
/sys/devices/pci*/*/*/*:mac-io/*:davbus/ to find a matching module.
Newer systems use snd-aoa, which provides the required modalias already.

Some systems with i2s bus, but without a 'layout-id' property, will not work
with this patch because an fake i2s alias will conflict with snd-aoa.


Signed-off-by: Olaf Hering <olaf at aepfle.de>

---
 sound/ppc/powermac.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

--- a/sound/ppc/powermac.c
+++ b/sound/ppc/powermac.c
@@ -174,6 +174,16 @@ static struct platform_driver snd_pmac_d
 	},
 };
 
+/* for NewWorld AGP (Pismo, CRT iMac) */
+MODULE_ALIAS("of:NdavbusTsoundbusCdavbus");
+/* for OldWorld beige G3 */
+/* for NewWorld PCI (G3 and early G4) */
+MODULE_ALIAS("of:NdavbusTdavbus");
+/* for OldWorld ohare based */
+MODULE_ALIAS("of:NdavbusTsoundbus");
+/* for OldWorld bandit based */
+MODULE_ALIAS("of:NawacsTsound");
+
 static int __init alsa_card_pmac_init(void)
 {
 	int err;



More information about the Linuxppc-dev mailing list