Skip to content

Commit

Permalink
ALSA: powermac - Correct HP detection and input selectors for PMac 5500
Browse files Browse the repository at this point in the history
Correct headphone detection and input selectors for PowerMac 5500 (AWACS).

Signed-off-by: Risto Suominen <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
ristosu authored and tiwai committed Mar 9, 2009
1 parent f5b1db6 commit b0a8a8f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sound/ppc/awacs.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,7 @@ static void snd_pmac_awacs_resume(struct snd_pmac *chip)
#endif /* CONFIG_PM */

#define IS_PM7500 (machine_is_compatible("AAPL,7500"))
#define IS_PM5500 (machine_is_compatible("AAPL,e411"))
#define IS_BEIGE (machine_is_compatible("AAPL,Gossamer"))
#define IS_IMAC1 (machine_is_compatible("PowerMac2,1"))
#define IS_IMAC2 (machine_is_compatible("PowerMac2,2") \
Expand Down Expand Up @@ -858,6 +859,7 @@ int __init
snd_pmac_awacs_init(struct snd_pmac *chip)
{
int pm7500 = IS_PM7500;
int pm5500 = IS_PM5500;
int beige = IS_BEIGE;
int g4agp = IS_G4AGP;
int imac;
Expand Down Expand Up @@ -915,7 +917,7 @@ snd_pmac_awacs_init(struct snd_pmac *chip)
/* set headphone-jack detection bit */
switch (chip->model) {
case PMAC_AWACS:
chip->hp_stat_mask = pm7500 ? MASK_HDPCONN
chip->hp_stat_mask = pm7500 || pm5500 ? MASK_HDPCONN
: MASK_LOCONN;
break;
case PMAC_SCREAMER:
Expand Down Expand Up @@ -954,7 +956,7 @@ snd_pmac_awacs_init(struct snd_pmac *chip)
return err;
if (beige || g4agp)
;
else if (chip->model == PMAC_SCREAMER)
else if (chip->model == PMAC_SCREAMER || pm5500)
err = build_mixers(chip, ARRAY_SIZE(snd_pmac_screamer_mixers2),
snd_pmac_screamer_mixers2);
else if (!pm7500)
Expand Down

0 comments on commit b0a8a8f

Please sign in to comment.