[ALSA] snd-powermac: no longer handle anything with a layout-id property
authorJohannes Berg <johannes@sipsolutions.net>
Wed, 21 Jun 2006 13:43:44 +0000 (15:43 +0200)
committerJaroslav Kysela <perex@suse.cz>
Thu, 22 Jun 2006 19:34:39 +0000 (21:34 +0200)
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>
sound/ppc/Makefile
sound/ppc/pmac.c
sound/ppc/pmac.h
sound/ppc/powermac.c

index d6ba9959097bf647c4b5ffe2adc701d604c06d96..4d95c652c8cacd7fdc7616d609cfbbf294784b4a 100644 (file)
@@ -3,7 +3,7 @@
 # Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
 #
 
-snd-powermac-objs := powermac.o pmac.o awacs.o burgundy.o daca.o tumbler.o toonie.o keywest.o beep.o
+snd-powermac-objs := powermac.o pmac.o awacs.o burgundy.o daca.o tumbler.o keywest.o beep.o
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_POWERMAC) += snd-powermac.o
index f0794ef9d1ac06ffc404fcb353885a2e66593fea..b678814975c9e1dd93297033966a527172ec8b28 100644 (file)
@@ -867,8 +867,6 @@ static int __init snd_pmac_detect(struct snd_pmac *chip)
        unsigned int *prop, l;
        struct macio_chip* macio;
 
-       u32 layout_id = 0;
-
        if (!machine_is(powermac))
                return -ENODEV;
 
@@ -929,8 +927,14 @@ static int __init snd_pmac_detect(struct snd_pmac *chip)
        if (prop && *prop < 16)
                chip->subframe = *prop;
        prop = (unsigned int *) get_property(sound, "layout-id", NULL);
-       if (prop)
-               layout_id = *prop;
+       if (prop) {
+               /* partly deprecate snd-powermac, for those machines
+                * that have a layout-id property for now */
+               printk(KERN_INFO "snd-powermac no longer handles any "
+                                "machines with a layout-id property "
+                                "in the device-tree, use snd-aoa.\n");
+               return -ENODEV;
+       }
        /* This should be verified on older screamers */
        if (device_is_compatible(sound, "screamer")) {
                chip->model = PMAC_SCREAMER;
@@ -963,38 +967,6 @@ static int __init snd_pmac_detect(struct snd_pmac *chip)
                chip->freq_table = tumbler_freqs;
                chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */
        }
-       if (device_is_compatible(sound, "AOAKeylargo") ||
-           device_is_compatible(sound, "AOAbase") ||
-           device_is_compatible(sound, "AOAK2")) {
-               /* For now, only support very basic TAS3004 based machines with
-                * single frequency until proper i2s control is implemented
-                */
-               switch(layout_id) {
-               case 0x24:
-               case 0x29:
-               case 0x33:
-               case 0x46:
-               case 0x48:
-               case 0x50:
-               case 0x5c:
-                       chip->num_freqs = ARRAY_SIZE(tumbler_freqs);
-                       chip->model = PMAC_SNAPPER;
-                       chip->can_byte_swap = 0; /* FIXME: check this */
-                       chip->control_mask = MASK_IEPC | 0x11;/* disable IEE */
-                       break;
-               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;
-               default:
-                       printk(KERN_ERR "snd: Unknown layout ID 0x%x\n",
-                              layout_id);
-                       return -ENODEV;
-
-               }
-       }
        prop = (unsigned int *)get_property(sound, "device-id", NULL);
        if (prop)
                chip->device_id = *prop;
index 3a9bd4dbb9a6bfc5ec59a62d25d942f96240e35f..8394e66ceb004a50adec23c57a240b7980b8759e 100644 (file)
@@ -85,7 +85,7 @@ struct pmac_stream {
 
 enum snd_pmac_model {
        PMAC_AWACS, PMAC_SCREAMER, PMAC_BURGUNDY, PMAC_DACA, PMAC_TUMBLER,
-       PMAC_SNAPPER, PMAC_TOONIE
+       PMAC_SNAPPER
 };
 
 struct snd_pmac {
@@ -188,7 +188,6 @@ int snd_pmac_burgundy_init(struct snd_pmac *chip);
 int snd_pmac_daca_init(struct snd_pmac *chip);
 int snd_pmac_tumbler_init(struct snd_pmac *chip);
 int snd_pmac_tumbler_post_init(void);
-int snd_pmac_toonie_init(struct snd_pmac *chip);
 
 /* i2c functions */
 struct pmac_keywest {
index 875f1f7bdc589180539663c517e79bc85cdb4256..fa9a44ab487e8a35a46e0a4086849943719c5f5f 100644 (file)
@@ -94,13 +94,6 @@ static int __init snd_pmac_probe(struct platform_device *devptr)
                if ( snd_pmac_tumbler_init(chip) < 0 || snd_pmac_tumbler_post_init() < 0)
                        goto __error;
                break;
-       case PMAC_TOONIE:
-               strcpy(card->driver, "PMac Toonie");
-               strcpy(card->shortname, "PowerMac Toonie");
-               strcpy(card->longname, card->shortname);
-               if ((err = snd_pmac_toonie_init(chip)) < 0)
-                       goto __error;
-               break;
        case PMAC_AWACS:
        case PMAC_SCREAMER:
                name_ext = chip->model == PMAC_SCREAMER ? "Screamer" : "AWACS";