Skip to contentSkip to conversation

Correct HP detection and input selectors for PMac 5500

PATCH New Risto Suominen 1 participant 5 messages Jan 20, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/5 Correct HP detection and input selectors for PMac 5500

Correct headphone detection and input selectors for PowerMac 5500 (AWACS).

sound/ppc/awacs.c +4 -2
index 7bd33e6..0258ccb 100644
@@ -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") \
@@ -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;
@@ -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:
@@ -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)
Signature · 1 line
1.5.4.3
#1 lore raw

PATCH 2/5 Correct volume controls for PowerBook G3 Lombard

Correct volume controls for PowerBook G3 Lombard (Screamer).

sound/ppc/awacs.c +4 -2
index 0258ccb..d89c23e 100644
@@ -773,6 +773,7 @@ static void snd_pmac_awacs_resume(struct snd_pmac *chip)
 #define IS_IMAC2 (machine_is_compatible("PowerMac2,2") \
 		|| machine_is_compatible("PowerMac4,1"))
 #define IS_G4AGP (machine_is_compatible("PowerMac3,1"))
+#define IS_LOMBARD (machine_is_compatible("PowerBook1,1"))
 
 static int imac1, imac2;
 
@@ -862,6 +863,7 @@ snd_pmac_awacs_init(struct snd_pmac *chip)
 	int pm5500 = IS_PM5500;
 	int beige = IS_BEIGE;
 	int g4agp = IS_G4AGP;
+	int lombard = IS_LOMBARD;
 	int imac;
 	int err, vol;
 
@@ -972,7 +974,7 @@ snd_pmac_awacs_init(struct snd_pmac *chip)
 		err = build_mixers(chip,
 				   ARRAY_SIZE(snd_pmac_screamer_mixers_beige),
 				   snd_pmac_screamer_mixers_beige);
-	else if (imac)
+	else if (imac || lombard)
 		err = build_mixers(chip,
 				   ARRAY_SIZE(snd_pmac_screamer_mixers_imac),
 				   snd_pmac_screamer_mixers_imac);
@@ -986,7 +988,7 @@ snd_pmac_awacs_init(struct snd_pmac *chip)
 				   snd_pmac_awacs_mixers_pmac);
 	if (err < 0)
 		return err;
-	chip->master_sw_ctl = snd_ctl_new1((pm7500 || imac || g4agp)
+	chip->master_sw_ctl = snd_ctl_new1((pm7500 || imac || g4agp || lombard)
 			? &snd_pmac_awacs_master_sw_imac
 			: &snd_pmac_awacs_master_sw, chip);
 	err = snd_ctl_add(chip->card, chip->master_sw_ctl);
Signature · 1 line
1.5.4.3
#2 lore raw

PATCH 3/5 Correct volume controls and HP detection for PMac 8500/9500

Correct volume controls and headphone detection for PowerMac 8500/9500 (AWACS).

sound/ppc/awacs.c +3 -1
index d89c23e..9abbf64 100644
@@ -766,7 +766,9 @@ static void snd_pmac_awacs_resume(struct snd_pmac *chip)
 }
 #endif /* CONFIG_PM */
 
-#define IS_PM7500 (machine_is_compatible("AAPL,7500"))
+#define IS_PM7500 (machine_is_compatible("AAPL,7500") \
+		|| machine_is_compatible("AAPL,8500") \
+		|| machine_is_compatible("AAPL,9500"))
 #define IS_PM5500 (machine_is_compatible("AAPL,e411"))
 #define IS_BEIGE (machine_is_compatible("AAPL,Gossamer"))
 #define IS_IMAC1 (machine_is_compatible("PowerMac2,1"))
Signature · 1 line
1.5.4.3
#3 lore raw

PATCH 4/5 Allow input from mic in iBook G3 Dual-USB

Allow input from microphone on iBook G3 Dual-USB (Tumbler).

sound/ppc/pmac.c +2 -1
index af76ee8..bd8f92b 100644
@@ -1033,7 +1033,8 @@ static int __init snd_pmac_detect(struct snd_pmac *chip)
 	}
 	if (of_device_is_compatible(sound, "tumbler")) {
 		chip->model = PMAC_TUMBLER;
-		chip->can_capture = machine_is_compatible("PowerMac4,2");
+		chip->can_capture = machine_is_compatible("PowerMac4,2")
+				|| machine_is_compatible("PowerBook4,1");
 		chip->can_duplex = 0;
 		// chip->can_byte_swap = 0; /* FIXME: check this */
 		chip->num_freqs = ARRAY_SIZE(tumbler_freqs);
Signature · 1 line
1.5.4.3
#4 lore raw

PATCH 5/5 Add vmaster controls for Pmac 5500, iMac G3 SL, and PBook G3 Lombard

Add virtual master controls for PowerMac 5500 (AWACS) and iMac G3 Slot-loading and PowerBook G3 Lombard (Screamer).

sound/ppc/Kconfig +1 -0
index 777de2b..bd2338a 100644
@@ -13,6 +13,7 @@ config SND_POWERMAC
 	tristate "PowerMac (AWACS, DACA, Burgundy, Tumbler, Keywest)"
 	depends on I2C && INPUT && PPC_PMAC
 	select SND_PCM
+	select SND_VMASTER
 	help
 	  Say Y here to include support for the integrated sound device.
 
sound/ppc/awacs.c +53 -6

127 lines not on this page · raw message

Signature · 1 line
1.5.4.3