diff options
Diffstat (limited to 'sound/ppc/pmac.c')
-rw-r--r-- | sound/ppc/pmac.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c index 6c4ed90f490e..f9a9601769aa 100644 --- a/sound/ppc/pmac.c +++ b/sound/ppc/pmac.c | |||
@@ -881,6 +881,7 @@ static int __init snd_pmac_detect(pmac_t *chip) | |||
881 | { | 881 | { |
882 | struct device_node *sound; | 882 | struct device_node *sound; |
883 | unsigned int *prop, l; | 883 | unsigned int *prop, l; |
884 | u32 layout_id = 0; | ||
884 | 885 | ||
885 | if (_machine != _MACH_Pmac) | 886 | if (_machine != _MACH_Pmac) |
886 | return -ENODEV; | 887 | return -ENODEV; |
@@ -929,6 +930,9 @@ static int __init snd_pmac_detect(pmac_t *chip) | |||
929 | prop = (unsigned int *) get_property(sound, "sub-frame", NULL); | 930 | prop = (unsigned int *) get_property(sound, "sub-frame", NULL); |
930 | if (prop && *prop < 16) | 931 | if (prop && *prop < 16) |
931 | chip->subframe = *prop; | 932 | chip->subframe = *prop; |
933 | prop = (unsigned int *) get_property(sound, "layout-id", NULL); | ||
934 | if (prop) | ||
935 | layout_id = *prop; | ||
932 | /* This should be verified on older screamers */ | 936 | /* This should be verified on older screamers */ |
933 | if (device_is_compatible(sound, "screamer")) { | 937 | if (device_is_compatible(sound, "screamer")) { |
934 | chip->model = PMAC_SCREAMER; | 938 | chip->model = PMAC_SCREAMER; |
@@ -961,12 +965,22 @@ static int __init snd_pmac_detect(pmac_t *chip) | |||
961 | chip->freq_table = tumbler_freqs; | 965 | chip->freq_table = tumbler_freqs; |
962 | chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */ | 966 | chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */ |
963 | } | 967 | } |
964 | if (device_is_compatible(sound, "AOAKeylargo")) { | 968 | if (device_is_compatible(sound, "AOAKeylargo") || |
965 | /* Seems to support the stock AWACS frequencies, but has | 969 | device_is_compatible(sound, "AOAbase")) { |
966 | a snapper mixer */ | 970 | /* For now, only support very basic TAS3004 based machines with |
967 | chip->model = PMAC_SNAPPER; | 971 | * single frequency until proper i2s control is implemented |
968 | // chip->can_byte_swap = 0; /* FIXME: check this */ | 972 | */ |
969 | chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */ | 973 | switch(layout_id) { |
974 | case 0x48: | ||
975 | case 0x46: | ||
976 | case 0x33: | ||
977 | case 0x29: | ||
978 | chip->num_freqs = ARRAY_SIZE(tumbler_freqs); | ||
979 | chip->model = PMAC_SNAPPER; | ||
980 | chip->can_byte_swap = 0; /* FIXME: check this */ | ||
981 | chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */ | ||
982 | break; | ||
983 | } | ||
970 | } | 984 | } |
971 | prop = (unsigned int *)get_property(sound, "device-id", NULL); | 985 | prop = (unsigned int *)get_property(sound, "device-id", NULL); |
972 | if (prop) | 986 | if (prop) |