aboutsummaryrefslogtreecommitdiffstats
path: root/sound/ppc/pmac.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2006-06-21 09:43:44 -0400
committerJaroslav Kysela <perex@suse.cz>2006-06-22 15:34:39 -0400
commit55c385ad5e1f3cda887cd6a8ad69a6d74b4b9125 (patch)
treea15a2e0134adae10e76eca5434be29a0115011a0 /sound/ppc/pmac.c
parentf3d9478b2ce468c3115b02ecae7e975990697f15 (diff)
[ALSA] snd-powermac: no longer handle anything with a layout-id property
This patch removes from snd-powermac the code that check for the layout-id and instead adds code that makes it refuse loading when a layout-id property is present, nothing that snd-aoa should be used. It also removes the 'toonie' codec from snd-powermac which was only ever used on the mac mini which has a layout-id property. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/ppc/pmac.c')
-rw-r--r--sound/ppc/pmac.c44
1 files changed, 8 insertions, 36 deletions
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c
index f0794ef9d1ac..b678814975c9 100644
--- a/sound/ppc/pmac.c
+++ b/sound/ppc/pmac.c
@@ -867,8 +867,6 @@ static int __init snd_pmac_detect(struct snd_pmac *chip)
867 unsigned int *prop, l; 867 unsigned int *prop, l;
868 struct macio_chip* macio; 868 struct macio_chip* macio;
869 869
870 u32 layout_id = 0;
871
872 if (!machine_is(powermac)) 870 if (!machine_is(powermac))
873 return -ENODEV; 871 return -ENODEV;
874 872
@@ -929,8 +927,14 @@ static int __init snd_pmac_detect(struct snd_pmac *chip)
929 if (prop && *prop < 16) 927 if (prop && *prop < 16)
930 chip->subframe = *prop; 928 chip->subframe = *prop;
931 prop = (unsigned int *) get_property(sound, "layout-id", NULL); 929 prop = (unsigned int *) get_property(sound, "layout-id", NULL);
932 if (prop) 930 if (prop) {
933 layout_id = *prop; 931 /* partly deprecate snd-powermac, for those machines
932 * that have a layout-id property for now */
933 printk(KERN_INFO "snd-powermac no longer handles any "
934 "machines with a layout-id property "
935 "in the device-tree, use snd-aoa.\n");
936 return -ENODEV;
937 }
934 /* This should be verified on older screamers */ 938 /* This should be verified on older screamers */
935 if (device_is_compatible(sound, "screamer")) { 939 if (device_is_compatible(sound, "screamer")) {
936 chip->model = PMAC_SCREAMER; 940 chip->model = PMAC_SCREAMER;
@@ -963,38 +967,6 @@ static int __init snd_pmac_detect(struct snd_pmac *chip)
963 chip->freq_table = tumbler_freqs; 967 chip->freq_table = tumbler_freqs;
964 chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */ 968 chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */
965 } 969 }
966 if (device_is_compatible(sound, "AOAKeylargo") ||
967 device_is_compatible(sound, "AOAbase") ||
968 device_is_compatible(sound, "AOAK2")) {
969 /* For now, only support very basic TAS3004 based machines with
970 * single frequency until proper i2s control is implemented
971 */
972 switch(layout_id) {
973 case 0x24:
974 case 0x29:
975 case 0x33:
976 case 0x46:
977 case 0x48:
978 case 0x50:
979 case 0x5c:
980 chip->num_freqs = ARRAY_SIZE(tumbler_freqs);
981 chip->model = PMAC_SNAPPER;
982 chip->can_byte_swap = 0; /* FIXME: check this */
983 chip->control_mask = MASK_IEPC | 0x11;/* disable IEE */
984 break;
985 case 0x3a:
986 chip->num_freqs = ARRAY_SIZE(tumbler_freqs);
987 chip->model = PMAC_TOONIE;
988 chip->can_byte_swap = 0; /* FIXME: check this */
989 chip->control_mask = MASK_IEPC | 0x11;/* disable IEE */
990 break;
991 default:
992 printk(KERN_ERR "snd: Unknown layout ID 0x%x\n",
993 layout_id);
994 return -ENODEV;
995
996 }
997 }
998 prop = (unsigned int *)get_property(sound, "device-id", NULL); 970 prop = (unsigned int *)get_property(sound, "device-id", NULL);
999 if (prop) 971 if (prop)
1000 chip->device_id = *prop; 972 chip->device_id = *prop;