diff options
author | David S. Miller <davem@davemloft.net> | 2008-10-08 17:56:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-08 17:56:41 -0400 |
commit | 4dd565134ece7e5d528d4c5288879310c54419e9 (patch) | |
tree | e08910d2d0feae0c030f8f01acc9b03eb760ad9a /sound | |
parent | 071d7ab6649eb34a873a53e71635186e9117101d (diff) | |
parent | 69849375d6b13e94d08cdc94b49b11fbab454a0e (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/e1000e/ich8lan.c
drivers/net/e1000e/netdev.c
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 2 | ||||
-rw-r--r-- | sound/ppc/awacs.c | 50 | ||||
-rw-r--r-- | sound/soc/codecs/cs4270.c | 25 | ||||
-rw-r--r-- | sound/soc/codecs/wm8753.c | 4 |
4 files changed, 59 insertions, 22 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index ad994fcab725..f3da621f25c5 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -1683,8 +1683,8 @@ static struct snd_pci_quirk stac927x_cfg_tbl[] = { | |||
1683 | /* Dell 3 stack systems with verb table in BIOS */ | 1683 | /* Dell 3 stack systems with verb table in BIOS */ |
1684 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f3, "Dell Inspiron 1420", STAC_DELL_BIOS), | 1684 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f3, "Dell Inspiron 1420", STAC_DELL_BIOS), |
1685 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0227, "Dell Vostro 1400 ", STAC_DELL_BIOS), | 1685 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0227, "Dell Vostro 1400 ", STAC_DELL_BIOS), |
1686 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022f, "Dell ", STAC_DELL_BIOS), | ||
1687 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022e, "Dell ", STAC_DELL_BIOS), | 1686 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022e, "Dell ", STAC_DELL_BIOS), |
1687 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022f, "Dell Inspiron 1525", STAC_DELL_3ST), | ||
1688 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0242, "Dell ", STAC_DELL_BIOS), | 1688 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0242, "Dell ", STAC_DELL_BIOS), |
1689 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0243, "Dell ", STAC_DELL_BIOS), | 1689 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0243, "Dell ", STAC_DELL_BIOS), |
1690 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ff, "Dell ", STAC_DELL_BIOS), | 1690 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ff, "Dell ", STAC_DELL_BIOS), |
diff --git a/sound/ppc/awacs.c b/sound/ppc/awacs.c index 566a6d0daf4a..106c48225bba 100644 --- a/sound/ppc/awacs.c +++ b/sound/ppc/awacs.c | |||
@@ -621,6 +621,13 @@ static struct snd_kcontrol_new snd_pmac_screamer_mixers_imac[] __initdata = { | |||
621 | AWACS_SWITCH("CD Capture Switch", 0, SHIFT_MUX_CD, 0), | 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 | static struct snd_kcontrol_new snd_pmac_awacs_mixers_pmac7500[] __initdata = { | 631 | static struct snd_kcontrol_new snd_pmac_awacs_mixers_pmac7500[] __initdata = { |
625 | AWACS_VOLUME("Line out Playback Volume", 2, 6, 1), | 632 | AWACS_VOLUME("Line out Playback Volume", 2, 6, 1), |
626 | AWACS_SWITCH("CD Capture Switch", 0, SHIFT_MUX_CD, 0), | 633 | AWACS_SWITCH("CD Capture Switch", 0, SHIFT_MUX_CD, 0), |
@@ -688,7 +695,10 @@ static struct snd_kcontrol_new snd_pmac_awacs_speaker_vol[] __initdata = { | |||
688 | static struct snd_kcontrol_new snd_pmac_awacs_speaker_sw __initdata = | 695 | static struct snd_kcontrol_new snd_pmac_awacs_speaker_sw __initdata = |
689 | AWACS_SWITCH("PC Speaker Playback Switch", 1, SHIFT_SPKMUTE, 1); | 696 | AWACS_SWITCH("PC Speaker Playback Switch", 1, SHIFT_SPKMUTE, 1); |
690 | 697 | ||
691 | static struct snd_kcontrol_new snd_pmac_awacs_speaker_sw_imac __initdata = | 698 | static struct snd_kcontrol_new snd_pmac_awacs_speaker_sw_imac1 __initdata = |
699 | AWACS_SWITCH("PC Speaker Playback Switch", 1, SHIFT_PAROUT1, 1); | ||
700 | |||
701 | static struct snd_kcontrol_new snd_pmac_awacs_speaker_sw_imac2 __initdata = | ||
692 | AWACS_SWITCH("PC Speaker Playback Switch", 1, SHIFT_PAROUT1, 0); | 702 | AWACS_SWITCH("PC Speaker Playback Switch", 1, SHIFT_PAROUT1, 0); |
693 | 703 | ||
694 | 704 | ||
@@ -765,11 +775,12 @@ static void snd_pmac_awacs_resume(struct snd_pmac *chip) | |||
765 | 775 | ||
766 | #define IS_PM7500 (machine_is_compatible("AAPL,7500")) | 776 | #define IS_PM7500 (machine_is_compatible("AAPL,7500")) |
767 | #define IS_BEIGE (machine_is_compatible("AAPL,Gossamer")) | 777 | #define IS_BEIGE (machine_is_compatible("AAPL,Gossamer")) |
768 | #define IS_IMAC (machine_is_compatible("PowerMac2,1") \ | 778 | #define IS_IMAC1 (machine_is_compatible("PowerMac2,1")) |
769 | || machine_is_compatible("PowerMac2,2") \ | 779 | #define IS_IMAC2 (machine_is_compatible("PowerMac2,2") \ |
770 | || machine_is_compatible("PowerMac4,1")) | 780 | || machine_is_compatible("PowerMac4,1")) |
781 | #define IS_G4AGP (machine_is_compatible("PowerMac3,1")) | ||
771 | 782 | ||
772 | static int imac; | 783 | static int imac1, imac2; |
773 | 784 | ||
774 | #ifdef PMAC_SUPPORT_AUTOMUTE | 785 | #ifdef PMAC_SUPPORT_AUTOMUTE |
775 | /* | 786 | /* |
@@ -815,13 +826,18 @@ static void snd_pmac_awacs_update_automute(struct snd_pmac *chip, int do_notify) | |||
815 | { | 826 | { |
816 | int reg = chip->awacs_reg[1] | 827 | int reg = chip->awacs_reg[1] |
817 | | (MASK_HDMUTE | MASK_SPKMUTE); | 828 | | (MASK_HDMUTE | MASK_SPKMUTE); |
818 | if (imac) { | 829 | if (imac1) { |
830 | reg &= ~MASK_SPKMUTE; | ||
831 | reg |= MASK_PAROUT1; | ||
832 | } else if (imac2) { | ||
819 | reg &= ~MASK_SPKMUTE; | 833 | reg &= ~MASK_SPKMUTE; |
820 | reg &= ~MASK_PAROUT1; | 834 | reg &= ~MASK_PAROUT1; |
821 | } | 835 | } |
822 | if (snd_pmac_awacs_detect_headphone(chip)) | 836 | if (snd_pmac_awacs_detect_headphone(chip)) |
823 | reg &= ~MASK_HDMUTE; | 837 | reg &= ~MASK_HDMUTE; |
824 | else if (imac) | 838 | else if (imac1) |
839 | reg &= ~MASK_PAROUT1; | ||
840 | else if (imac2) | ||
825 | reg |= MASK_PAROUT1; | 841 | reg |= MASK_PAROUT1; |
826 | else | 842 | else |
827 | reg &= ~MASK_SPKMUTE; | 843 | reg &= ~MASK_SPKMUTE; |
@@ -850,9 +866,13 @@ snd_pmac_awacs_init(struct snd_pmac *chip) | |||
850 | { | 866 | { |
851 | int pm7500 = IS_PM7500; | 867 | int pm7500 = IS_PM7500; |
852 | int beige = IS_BEIGE; | 868 | int beige = IS_BEIGE; |
869 | int g4agp = IS_G4AGP; | ||
870 | int imac; | ||
853 | int err, vol; | 871 | int err, vol; |
854 | 872 | ||
855 | imac = IS_IMAC; | 873 | imac1 = IS_IMAC1; |
874 | imac2 = IS_IMAC2; | ||
875 | imac = imac1 || imac2; | ||
856 | /* looks like MASK_GAINLINE triggers something, so we set here | 876 | /* looks like MASK_GAINLINE triggers something, so we set here |
857 | * as start-up | 877 | * as start-up |
858 | */ | 878 | */ |
@@ -939,7 +959,7 @@ snd_pmac_awacs_init(struct snd_pmac *chip) | |||
939 | snd_pmac_awacs_mixers); | 959 | snd_pmac_awacs_mixers); |
940 | if (err < 0) | 960 | if (err < 0) |
941 | return err; | 961 | return err; |
942 | if (beige) | 962 | if (beige || g4agp) |
943 | ; | 963 | ; |
944 | else if (chip->model == PMAC_SCREAMER) | 964 | else if (chip->model == PMAC_SCREAMER) |
945 | err = build_mixers(chip, ARRAY_SIZE(snd_pmac_screamer_mixers2), | 965 | err = build_mixers(chip, ARRAY_SIZE(snd_pmac_screamer_mixers2), |
@@ -961,13 +981,17 @@ snd_pmac_awacs_init(struct snd_pmac *chip) | |||
961 | err = build_mixers(chip, | 981 | err = build_mixers(chip, |
962 | ARRAY_SIZE(snd_pmac_screamer_mixers_imac), | 982 | ARRAY_SIZE(snd_pmac_screamer_mixers_imac), |
963 | snd_pmac_screamer_mixers_imac); | 983 | snd_pmac_screamer_mixers_imac); |
984 | else if (g4agp) | ||
985 | err = build_mixers(chip, | ||
986 | ARRAY_SIZE(snd_pmac_screamer_mixers_g4agp), | ||
987 | snd_pmac_screamer_mixers_g4agp); | ||
964 | else | 988 | else |
965 | err = build_mixers(chip, | 989 | err = build_mixers(chip, |
966 | ARRAY_SIZE(snd_pmac_awacs_mixers_pmac), | 990 | ARRAY_SIZE(snd_pmac_awacs_mixers_pmac), |
967 | snd_pmac_awacs_mixers_pmac); | 991 | snd_pmac_awacs_mixers_pmac); |
968 | if (err < 0) | 992 | if (err < 0) |
969 | return err; | 993 | return err; |
970 | chip->master_sw_ctl = snd_ctl_new1((pm7500 || imac) | 994 | chip->master_sw_ctl = snd_ctl_new1((pm7500 || imac || g4agp) |
971 | ? &snd_pmac_awacs_master_sw_imac | 995 | ? &snd_pmac_awacs_master_sw_imac |
972 | : &snd_pmac_awacs_master_sw, chip); | 996 | : &snd_pmac_awacs_master_sw, chip); |
973 | err = snd_ctl_add(chip->card, chip->master_sw_ctl); | 997 | err = snd_ctl_add(chip->card, chip->master_sw_ctl); |
@@ -1004,15 +1028,17 @@ snd_pmac_awacs_init(struct snd_pmac *chip) | |||
1004 | snd_pmac_awacs_speaker_vol); | 1028 | snd_pmac_awacs_speaker_vol); |
1005 | if (err < 0) | 1029 | if (err < 0) |
1006 | return err; | 1030 | return err; |
1007 | chip->speaker_sw_ctl = snd_ctl_new1(imac | 1031 | chip->speaker_sw_ctl = snd_ctl_new1(imac1 |
1008 | ? &snd_pmac_awacs_speaker_sw_imac | 1032 | ? &snd_pmac_awacs_speaker_sw_imac1 |
1033 | : imac2 | ||
1034 | ? &snd_pmac_awacs_speaker_sw_imac2 | ||
1009 | : &snd_pmac_awacs_speaker_sw, chip); | 1035 | : &snd_pmac_awacs_speaker_sw, chip); |
1010 | err = snd_ctl_add(chip->card, chip->speaker_sw_ctl); | 1036 | err = snd_ctl_add(chip->card, chip->speaker_sw_ctl); |
1011 | if (err < 0) | 1037 | if (err < 0) |
1012 | return err; | 1038 | return err; |
1013 | } | 1039 | } |
1014 | 1040 | ||
1015 | if (beige) | 1041 | if (beige || g4agp) |
1016 | err = build_mixers(chip, | 1042 | err = build_mixers(chip, |
1017 | ARRAY_SIZE(snd_pmac_screamer_mic_boost_beige), | 1043 | ARRAY_SIZE(snd_pmac_screamer_mic_boost_beige), |
1018 | snd_pmac_screamer_mic_boost_beige); | 1044 | snd_pmac_screamer_mic_boost_beige); |
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c index d68650de39bc..0bbd94501d7e 100644 --- a/sound/soc/codecs/cs4270.c +++ b/sound/soc/codecs/cs4270.c | |||
@@ -681,7 +681,7 @@ static int cs4270_probe(struct platform_device *pdev) | |||
681 | ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); | 681 | ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); |
682 | if (ret < 0) { | 682 | if (ret < 0) { |
683 | printk(KERN_ERR "cs4270: failed to create PCMs\n"); | 683 | printk(KERN_ERR "cs4270: failed to create PCMs\n"); |
684 | return ret; | 684 | goto error_free_codec; |
685 | } | 685 | } |
686 | 686 | ||
687 | #ifdef USE_I2C | 687 | #ifdef USE_I2C |
@@ -690,8 +690,7 @@ static int cs4270_probe(struct platform_device *pdev) | |||
690 | ret = i2c_add_driver(&cs4270_i2c_driver); | 690 | ret = i2c_add_driver(&cs4270_i2c_driver); |
691 | if (ret) { | 691 | if (ret) { |
692 | printk(KERN_ERR "cs4270: failed to attach driver"); | 692 | printk(KERN_ERR "cs4270: failed to attach driver"); |
693 | snd_soc_free_pcms(socdev); | 693 | goto error_free_pcms; |
694 | return ret; | ||
695 | } | 694 | } |
696 | 695 | ||
697 | /* Did we find a CS4270 on the I2C bus? */ | 696 | /* Did we find a CS4270 on the I2C bus? */ |
@@ -713,10 +712,23 @@ static int cs4270_probe(struct platform_device *pdev) | |||
713 | ret = snd_soc_register_card(socdev); | 712 | ret = snd_soc_register_card(socdev); |
714 | if (ret < 0) { | 713 | if (ret < 0) { |
715 | printk(KERN_ERR "cs4270: failed to register card\n"); | 714 | printk(KERN_ERR "cs4270: failed to register card\n"); |
716 | snd_soc_free_pcms(socdev); | 715 | goto error_del_driver; |
717 | return ret; | ||
718 | } | 716 | } |
719 | 717 | ||
718 | return 0; | ||
719 | |||
720 | error_del_driver: | ||
721 | #ifdef USE_I2C | ||
722 | i2c_del_driver(&cs4270_i2c_driver); | ||
723 | |||
724 | error_free_pcms: | ||
725 | #endif | ||
726 | snd_soc_free_pcms(socdev); | ||
727 | |||
728 | error_free_codec: | ||
729 | kfree(socdev->codec); | ||
730 | socdev->codec = NULL; | ||
731 | |||
720 | return ret; | 732 | return ret; |
721 | } | 733 | } |
722 | 734 | ||
@@ -727,8 +739,7 @@ static int cs4270_remove(struct platform_device *pdev) | |||
727 | snd_soc_free_pcms(socdev); | 739 | snd_soc_free_pcms(socdev); |
728 | 740 | ||
729 | #ifdef USE_I2C | 741 | #ifdef USE_I2C |
730 | if (socdev->codec->control_data) | 742 | i2c_del_driver(&cs4270_i2c_driver); |
731 | i2c_del_driver(&cs4270_i2c_driver); | ||
732 | #endif | 743 | #endif |
733 | 744 | ||
734 | kfree(socdev->codec); | 745 | kfree(socdev->codec); |
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index 5761164fe16d..e873414840c8 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c | |||
@@ -583,7 +583,7 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
583 | 583 | ||
584 | /* out 4 */ | 584 | /* out 4 */ |
585 | {"Out4 Mux", "VREF", "VREF"}, | 585 | {"Out4 Mux", "VREF", "VREF"}, |
586 | {"Out4 Mux", "Capture ST", "Capture ST Mixer"}, | 586 | {"Out4 Mux", "Capture ST", "Playback Mixer"}, |
587 | {"Out4 Mux", "LOUT2", "LOUT2"}, | 587 | {"Out4 Mux", "LOUT2", "LOUT2"}, |
588 | {"Out 4", NULL, "Out4 Mux"}, | 588 | {"Out 4", NULL, "Out4 Mux"}, |
589 | {"OUT4", NULL, "Out 4"}, | 589 | {"OUT4", NULL, "Out 4"}, |
@@ -607,7 +607,7 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
607 | /* Capture Right Mux */ | 607 | /* Capture Right Mux */ |
608 | {"Capture Right Mux", "PGA", "Right Capture Volume"}, | 608 | {"Capture Right Mux", "PGA", "Right Capture Volume"}, |
609 | {"Capture Right Mux", "Line or RXP-RXN", "Line Right Mux"}, | 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 | /* Mono Capture mixer-mux */ | 612 | /* Mono Capture mixer-mux */ |
613 | {"Capture Right Mixer", "Stereo", "Capture Right Mux"}, | 613 | {"Capture Right Mixer", "Stereo", "Capture Right Mux"}, |