Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: snd-powermac: HP detection for 1st iMac G3 SL
ALSA: snd-powermac: mixers for PowerMac G4 AGP
ASoC: Set correct name for WM8753 rec mixer output

+40 -14
+38 -12
sound/ppc/awacs.c
··· 621 AWACS_SWITCH("CD Capture Switch", 0, SHIFT_MUX_CD, 0), 622 }; 623 624 static struct snd_kcontrol_new snd_pmac_awacs_mixers_pmac7500[] __initdata = { 625 AWACS_VOLUME("Line out Playback Volume", 2, 6, 1), 626 AWACS_SWITCH("CD Capture Switch", 0, SHIFT_MUX_CD, 0), ··· 695 static struct snd_kcontrol_new snd_pmac_awacs_speaker_sw __initdata = 696 AWACS_SWITCH("PC Speaker Playback Switch", 1, SHIFT_SPKMUTE, 1); 697 698 - static struct snd_kcontrol_new snd_pmac_awacs_speaker_sw_imac __initdata = 699 AWACS_SWITCH("PC Speaker Playback Switch", 1, SHIFT_PAROUT1, 0); 700 701 ··· 775 776 #define IS_PM7500 (machine_is_compatible("AAPL,7500")) 777 #define IS_BEIGE (machine_is_compatible("AAPL,Gossamer")) 778 - #define IS_IMAC (machine_is_compatible("PowerMac2,1") \ 779 - || machine_is_compatible("PowerMac2,2") \ 780 || machine_is_compatible("PowerMac4,1")) 781 782 - static int imac; 783 784 #ifdef PMAC_SUPPORT_AUTOMUTE 785 /* ··· 826 { 827 int reg = chip->awacs_reg[1] 828 | (MASK_HDMUTE | MASK_SPKMUTE); 829 - if (imac) { 830 reg &= ~MASK_SPKMUTE; 831 reg &= ~MASK_PAROUT1; 832 } 833 if (snd_pmac_awacs_detect_headphone(chip)) 834 reg &= ~MASK_HDMUTE; 835 - else if (imac) 836 reg |= MASK_PAROUT1; 837 else 838 reg &= ~MASK_SPKMUTE; ··· 866 { 867 int pm7500 = IS_PM7500; 868 int beige = IS_BEIGE; 869 int err, vol; 870 871 - imac = IS_IMAC; 872 /* looks like MASK_GAINLINE triggers something, so we set here 873 * as start-up 874 */ ··· 959 snd_pmac_awacs_mixers); 960 if (err < 0) 961 return err; 962 - if (beige) 963 ; 964 else if (chip->model == PMAC_SCREAMER) 965 err = build_mixers(chip, ARRAY_SIZE(snd_pmac_screamer_mixers2), ··· 981 err = build_mixers(chip, 982 ARRAY_SIZE(snd_pmac_screamer_mixers_imac), 983 snd_pmac_screamer_mixers_imac); 984 else 985 err = build_mixers(chip, 986 ARRAY_SIZE(snd_pmac_awacs_mixers_pmac), 987 snd_pmac_awacs_mixers_pmac); 988 if (err < 0) 989 return err; 990 - chip->master_sw_ctl = snd_ctl_new1((pm7500 || imac) 991 ? &snd_pmac_awacs_master_sw_imac 992 : &snd_pmac_awacs_master_sw, chip); 993 err = snd_ctl_add(chip->card, chip->master_sw_ctl); ··· 1028 snd_pmac_awacs_speaker_vol); 1029 if (err < 0) 1030 return err; 1031 - chip->speaker_sw_ctl = snd_ctl_new1(imac 1032 - ? &snd_pmac_awacs_speaker_sw_imac 1033 : &snd_pmac_awacs_speaker_sw, chip); 1034 err = snd_ctl_add(chip->card, chip->speaker_sw_ctl); 1035 if (err < 0) 1036 return err; 1037 } 1038 1039 - if (beige) 1040 err = build_mixers(chip, 1041 ARRAY_SIZE(snd_pmac_screamer_mic_boost_beige), 1042 snd_pmac_screamer_mic_boost_beige);
··· 621 AWACS_SWITCH("CD Capture Switch", 0, SHIFT_MUX_CD, 0), 622 }; 623 624 + static struct snd_kcontrol_new snd_pmac_screamer_mixers_g4agp[] __initdata = { 625 + AWACS_VOLUME("Line out Playback Volume", 2, 6, 1), 626 + AWACS_VOLUME("Master Playback Volume", 5, 6, 1), 627 + AWACS_SWITCH("CD Capture Switch", 0, SHIFT_MUX_CD, 0), 628 + AWACS_SWITCH("Line Capture Switch", 0, SHIFT_MUX_MIC, 0), 629 + }; 630 + 631 static struct snd_kcontrol_new snd_pmac_awacs_mixers_pmac7500[] __initdata = { 632 AWACS_VOLUME("Line out Playback Volume", 2, 6, 1), 633 AWACS_SWITCH("CD Capture Switch", 0, SHIFT_MUX_CD, 0), ··· 688 static struct snd_kcontrol_new snd_pmac_awacs_speaker_sw __initdata = 689 AWACS_SWITCH("PC Speaker Playback Switch", 1, SHIFT_SPKMUTE, 1); 690 691 + static struct snd_kcontrol_new snd_pmac_awacs_speaker_sw_imac1 __initdata = 692 + AWACS_SWITCH("PC Speaker Playback Switch", 1, SHIFT_PAROUT1, 1); 693 + 694 + static struct snd_kcontrol_new snd_pmac_awacs_speaker_sw_imac2 __initdata = 695 AWACS_SWITCH("PC Speaker Playback Switch", 1, SHIFT_PAROUT1, 0); 696 697 ··· 765 766 #define IS_PM7500 (machine_is_compatible("AAPL,7500")) 767 #define IS_BEIGE (machine_is_compatible("AAPL,Gossamer")) 768 + #define IS_IMAC1 (machine_is_compatible("PowerMac2,1")) 769 + #define IS_IMAC2 (machine_is_compatible("PowerMac2,2") \ 770 || machine_is_compatible("PowerMac4,1")) 771 + #define IS_G4AGP (machine_is_compatible("PowerMac3,1")) 772 773 + static int imac1, imac2; 774 775 #ifdef PMAC_SUPPORT_AUTOMUTE 776 /* ··· 815 { 816 int reg = chip->awacs_reg[1] 817 | (MASK_HDMUTE | MASK_SPKMUTE); 818 + if (imac1) { 819 + reg &= ~MASK_SPKMUTE; 820 + reg |= MASK_PAROUT1; 821 + } else if (imac2) { 822 reg &= ~MASK_SPKMUTE; 823 reg &= ~MASK_PAROUT1; 824 } 825 if (snd_pmac_awacs_detect_headphone(chip)) 826 reg &= ~MASK_HDMUTE; 827 + else if (imac1) 828 + reg &= ~MASK_PAROUT1; 829 + else if (imac2) 830 reg |= MASK_PAROUT1; 831 else 832 reg &= ~MASK_SPKMUTE; ··· 850 { 851 int pm7500 = IS_PM7500; 852 int beige = IS_BEIGE; 853 + int g4agp = IS_G4AGP; 854 + int imac; 855 int err, vol; 856 857 + imac1 = IS_IMAC1; 858 + imac2 = IS_IMAC2; 859 + imac = imac1 || imac2; 860 /* looks like MASK_GAINLINE triggers something, so we set here 861 * as start-up 862 */ ··· 939 snd_pmac_awacs_mixers); 940 if (err < 0) 941 return err; 942 + if (beige || g4agp) 943 ; 944 else if (chip->model == PMAC_SCREAMER) 945 err = build_mixers(chip, ARRAY_SIZE(snd_pmac_screamer_mixers2), ··· 961 err = build_mixers(chip, 962 ARRAY_SIZE(snd_pmac_screamer_mixers_imac), 963 snd_pmac_screamer_mixers_imac); 964 + else if (g4agp) 965 + err = build_mixers(chip, 966 + ARRAY_SIZE(snd_pmac_screamer_mixers_g4agp), 967 + snd_pmac_screamer_mixers_g4agp); 968 else 969 err = build_mixers(chip, 970 ARRAY_SIZE(snd_pmac_awacs_mixers_pmac), 971 snd_pmac_awacs_mixers_pmac); 972 if (err < 0) 973 return err; 974 + chip->master_sw_ctl = snd_ctl_new1((pm7500 || imac || g4agp) 975 ? &snd_pmac_awacs_master_sw_imac 976 : &snd_pmac_awacs_master_sw, chip); 977 err = snd_ctl_add(chip->card, chip->master_sw_ctl); ··· 1004 snd_pmac_awacs_speaker_vol); 1005 if (err < 0) 1006 return err; 1007 + chip->speaker_sw_ctl = snd_ctl_new1(imac1 1008 + ? &snd_pmac_awacs_speaker_sw_imac1 1009 + : imac2 1010 + ? &snd_pmac_awacs_speaker_sw_imac2 1011 : &snd_pmac_awacs_speaker_sw, chip); 1012 err = snd_ctl_add(chip->card, chip->speaker_sw_ctl); 1013 if (err < 0) 1014 return err; 1015 } 1016 1017 + if (beige || g4agp) 1018 err = build_mixers(chip, 1019 ARRAY_SIZE(snd_pmac_screamer_mic_boost_beige), 1020 snd_pmac_screamer_mic_boost_beige);
+2 -2
sound/soc/codecs/wm8753.c
··· 583 584 /* out 4 */ 585 {"Out4 Mux", "VREF", "VREF"}, 586 - {"Out4 Mux", "Capture ST", "Capture ST Mixer"}, 587 {"Out4 Mux", "LOUT2", "LOUT2"}, 588 {"Out 4", NULL, "Out4 Mux"}, 589 {"OUT4", NULL, "Out 4"}, ··· 607 /* Capture Right Mux */ 608 {"Capture Right Mux", "PGA", "Right Capture Volume"}, 609 {"Capture Right Mux", "Line or RXP-RXN", "Line Right Mux"}, 610 - {"Capture Right Mux", "Sidetone", "Capture ST Mixer"}, 611 612 /* Mono Capture mixer-mux */ 613 {"Capture Right Mixer", "Stereo", "Capture Right Mux"},
··· 583 584 /* out 4 */ 585 {"Out4 Mux", "VREF", "VREF"}, 586 + {"Out4 Mux", "Capture ST", "Playback Mixer"}, 587 {"Out4 Mux", "LOUT2", "LOUT2"}, 588 {"Out 4", NULL, "Out4 Mux"}, 589 {"OUT4", NULL, "Out 4"}, ··· 607 /* Capture Right Mux */ 608 {"Capture Right Mux", "PGA", "Right Capture Volume"}, 609 {"Capture Right Mux", "Line or RXP-RXN", "Line Right Mux"}, 610 + {"Capture Right Mux", "Sidetone", "Playback Mixer"}, 611 612 /* Mono Capture mixer-mux */ 613 {"Capture Right Mixer", "Stereo", "Capture Right Mux"},