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