Skip to content

Commit

Permalink
[PATCH] ppc32: add sound support for Mac Mini
Browse files Browse the repository at this point in the history
This patch applies on top of my previous g5 related sound patches and adds
support for the Mac Mini to the PowerMac Alsa driver.

However, I haven't found any kind of HW support for volume control on this
machine.  If it exist, it's well hidden.  That means that you probably want
to make sure you use software with the ability to do soft volume control,
or use Alsa 0.9 pre-release with the softvol plugin.

Signed-off-by: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
ozbenh authored and Linus Torvalds committed May 1, 2005
1 parent 4be8dc7 commit 1f7b49d
Show file tree
Hide file tree
Showing 5 changed files with 398 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sound/ppc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright (c) 2001 by Jaroslav Kysela <[email protected]>
#

snd-powermac-objs := powermac.o pmac.o awacs.o burgundy.o daca.o tumbler.o keywest.o beep.o
snd-powermac-objs := powermac.o pmac.o awacs.o burgundy.o daca.o tumbler.o toonie.o keywest.o beep.o

# Toplevel Module Dependency
obj-$(CONFIG_SND_POWERMAC) += snd-powermac.o
8 changes: 7 additions & 1 deletion sound/ppc/pmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,13 @@ static int __init snd_pmac_detect(pmac_t *chip)
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 */
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;
}
}
Expand Down
4 changes: 3 additions & 1 deletion sound/ppc/pmac.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ struct snd_pmac_stream {
*/

enum snd_pmac_model {
PMAC_AWACS, PMAC_SCREAMER, PMAC_BURGUNDY, PMAC_DACA, PMAC_TUMBLER, PMAC_SNAPPER
PMAC_AWACS, PMAC_SCREAMER, PMAC_BURGUNDY, PMAC_DACA, PMAC_TUMBLER,
PMAC_SNAPPER, PMAC_TOONIE
};

struct snd_pmac {
Expand Down Expand Up @@ -191,6 +192,7 @@ int snd_pmac_burgundy_init(pmac_t *chip);
int snd_pmac_daca_init(pmac_t *chip);
int snd_pmac_tumbler_init(pmac_t *chip);
int snd_pmac_tumbler_post_init(void);
int snd_pmac_toonie_init(pmac_t *chip);

/* i2c functions */
typedef struct snd_pmac_keywest {
Expand Down
7 changes: 7 additions & 0 deletions sound/ppc/powermac.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ static int __init snd_pmac_probe(void)
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";
Expand Down
Loading

0 comments on commit 1f7b49d

Please sign in to comment.