diff options
-rw-r--r-- | include/sound/soc.h | 4 | ||||
-rw-r--r-- | include/sound/version.h | 2 | ||||
-rw-r--r-- | sound/isa/cmi8330.c | 15 | ||||
-rw-r--r-- | sound/isa/cs423x/cs4236.c | 20 | ||||
-rw-r--r-- | sound/isa/es18xx.c | 19 | ||||
-rw-r--r-- | sound/isa/gus/interwave.c | 15 | ||||
-rw-r--r-- | sound/isa/opl3sa2.c | 15 | ||||
-rw-r--r-- | sound/isa/sb/sb16.c | 15 | ||||
-rw-r--r-- | sound/isa/sscape.c | 28 | ||||
-rw-r--r-- | sound/isa/wavefront/wavefront.c | 14 | ||||
-rw-r--r-- | sound/pci/ac97/ac97_patch.c | 5 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.c | 3 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 532 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 2 | ||||
-rw-r--r-- | sound/pci/intel8x0.c | 20 | ||||
-rw-r--r-- | sound/soc/codecs/ac97.c | 3 | ||||
-rw-r--r-- | sound/soc/codecs/wm9712.c | 1 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 18 | ||||
-rw-r--r-- | sound/usb/usbmixer.c | 2 | ||||
-rw-r--r-- | sound/usb/usbquirks.h | 9 |
20 files changed, 669 insertions, 73 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index b1dc364b8f74..db6edba8ef08 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <sound/control.h> | 22 | #include <sound/control.h> |
23 | #include <sound/ac97_codec.h> | 23 | #include <sound/ac97_codec.h> |
24 | 24 | ||
25 | #define SND_SOC_VERSION "0.13.0" | 25 | #define SND_SOC_VERSION "0.13.1" |
26 | 26 | ||
27 | /* | 27 | /* |
28 | * Convenience kcontrol builders | 28 | * Convenience kcontrol builders |
@@ -83,6 +83,7 @@ | |||
83 | #define SND_SOC_DAI_AC97 0x1 | 83 | #define SND_SOC_DAI_AC97 0x1 |
84 | #define SND_SOC_DAI_I2S 0x2 | 84 | #define SND_SOC_DAI_I2S 0x2 |
85 | #define SND_SOC_DAI_PCM 0x4 | 85 | #define SND_SOC_DAI_PCM 0x4 |
86 | #define SND_SOC_DAI_AC97_BUS 0x8 /* for custom i.e. non ac97_codec.c */ | ||
86 | 87 | ||
87 | /* | 88 | /* |
88 | * DAI hardware audio formats | 89 | * DAI hardware audio formats |
@@ -278,6 +279,7 @@ struct snd_soc_cpu_ops { | |||
278 | struct snd_soc_codec_dai { | 279 | struct snd_soc_codec_dai { |
279 | char *name; | 280 | char *name; |
280 | int id; | 281 | int id; |
282 | unsigned char type; | ||
281 | 283 | ||
282 | /* DAI capabilities */ | 284 | /* DAI capabilities */ |
283 | struct snd_soc_pcm_stream playback; | 285 | struct snd_soc_pcm_stream playback; |
diff --git a/include/sound/version.h b/include/sound/version.h index e820f0e7bdd3..50ee4fd420fa 100644 --- a/include/sound/version.h +++ b/include/sound/version.h | |||
@@ -1,3 +1,3 @@ | |||
1 | /* include/version.h. Generated by alsa/ksync script. */ | 1 | /* include/version.h. Generated by alsa/ksync script. */ |
2 | #define CONFIG_SND_VERSION "1.0.14rc4" | 2 | #define CONFIG_SND_VERSION "1.0.14rc4" |
3 | #define CONFIG_SND_DATE " (Wed May 09 09:51:39 2007 UTC)" | 3 | #define CONFIG_SND_DATE " (Wed May 16 09:45:46 2007 UTC)" |
diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c index 214d65d94c45..f471f8ad6885 100644 --- a/sound/isa/cmi8330.c +++ b/sound/isa/cmi8330.c | |||
@@ -109,6 +109,7 @@ module_param_array(wssdma, int, NULL, 0444); | |||
109 | MODULE_PARM_DESC(wssdma, "DMA for CMI8330 WSS driver."); | 109 | MODULE_PARM_DESC(wssdma, "DMA for CMI8330 WSS driver."); |
110 | 110 | ||
111 | #ifdef CONFIG_PNP | 111 | #ifdef CONFIG_PNP |
112 | static int isa_registered; | ||
112 | static int pnp_registered; | 113 | static int pnp_registered; |
113 | #endif | 114 | #endif |
114 | 115 | ||
@@ -686,14 +687,18 @@ static int __init alsa_card_cmi8330_init(void) | |||
686 | int err; | 687 | int err; |
687 | 688 | ||
688 | err = isa_register_driver(&snd_cmi8330_driver, SNDRV_CARDS); | 689 | err = isa_register_driver(&snd_cmi8330_driver, SNDRV_CARDS); |
689 | if (err < 0) | ||
690 | return err; | ||
691 | #ifdef CONFIG_PNP | 690 | #ifdef CONFIG_PNP |
691 | if (!err) | ||
692 | isa_registered = 1; | ||
693 | |||
692 | err = pnp_register_card_driver(&cmi8330_pnpc_driver); | 694 | err = pnp_register_card_driver(&cmi8330_pnpc_driver); |
693 | if (!err) | 695 | if (!err) |
694 | pnp_registered = 1; | 696 | pnp_registered = 1; |
697 | |||
698 | if (isa_registered) | ||
699 | err = 0; | ||
695 | #endif | 700 | #endif |
696 | return 0; | 701 | return err; |
697 | } | 702 | } |
698 | 703 | ||
699 | static void __exit alsa_card_cmi8330_exit(void) | 704 | static void __exit alsa_card_cmi8330_exit(void) |
@@ -701,8 +706,10 @@ static void __exit alsa_card_cmi8330_exit(void) | |||
701 | #ifdef CONFIG_PNP | 706 | #ifdef CONFIG_PNP |
702 | if (pnp_registered) | 707 | if (pnp_registered) |
703 | pnp_unregister_card_driver(&cmi8330_pnpc_driver); | 708 | pnp_unregister_card_driver(&cmi8330_pnpc_driver); |
709 | |||
710 | if (isa_registered) | ||
704 | #endif | 711 | #endif |
705 | isa_unregister_driver(&snd_cmi8330_driver); | 712 | isa_unregister_driver(&snd_cmi8330_driver); |
706 | } | 713 | } |
707 | 714 | ||
708 | module_init(alsa_card_cmi8330_init) | 715 | module_init(alsa_card_cmi8330_init) |
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c index 87f1392a2fa7..1a14f33b6ab0 100644 --- a/sound/isa/cs423x/cs4236.c +++ b/sound/isa/cs423x/cs4236.c | |||
@@ -127,6 +127,7 @@ module_param_array(dma2, int, NULL, 0444); | |||
127 | MODULE_PARM_DESC(dma2, "DMA2 # for " IDENT " driver."); | 127 | MODULE_PARM_DESC(dma2, "DMA2 # for " IDENT " driver."); |
128 | 128 | ||
129 | #ifdef CONFIG_PNP | 129 | #ifdef CONFIG_PNP |
130 | static int isa_registered; | ||
130 | static int pnpc_registered; | 131 | static int pnpc_registered; |
131 | #ifdef CS4232 | 132 | #ifdef CS4232 |
132 | static int pnp_registered; | 133 | static int pnp_registered; |
@@ -770,9 +771,9 @@ static int __init alsa_card_cs423x_init(void) | |||
770 | int err; | 771 | int err; |
771 | 772 | ||
772 | err = isa_register_driver(&cs423x_isa_driver, SNDRV_CARDS); | 773 | err = isa_register_driver(&cs423x_isa_driver, SNDRV_CARDS); |
773 | if (err < 0) | ||
774 | return err; | ||
775 | #ifdef CONFIG_PNP | 774 | #ifdef CONFIG_PNP |
775 | if (!err) | ||
776 | isa_registered = 1; | ||
776 | #ifdef CS4232 | 777 | #ifdef CS4232 |
777 | err = pnp_register_driver(&cs4232_pnp_driver); | 778 | err = pnp_register_driver(&cs4232_pnp_driver); |
778 | if (!err) | 779 | if (!err) |
@@ -781,8 +782,14 @@ static int __init alsa_card_cs423x_init(void) | |||
781 | err = pnp_register_card_driver(&cs423x_pnpc_driver); | 782 | err = pnp_register_card_driver(&cs423x_pnpc_driver); |
782 | if (!err) | 783 | if (!err) |
783 | pnpc_registered = 1; | 784 | pnpc_registered = 1; |
784 | #endif /* CONFIG_PNP */ | 785 | #ifdef CS4232 |
785 | return 0; | 786 | if (pnp_registered) |
787 | err = 0; | ||
788 | #endif | ||
789 | if (isa_registered) | ||
790 | err = 0; | ||
791 | #endif | ||
792 | return err; | ||
786 | } | 793 | } |
787 | 794 | ||
788 | static void __exit alsa_card_cs423x_exit(void) | 795 | static void __exit alsa_card_cs423x_exit(void) |
@@ -794,8 +801,9 @@ static void __exit alsa_card_cs423x_exit(void) | |||
794 | if (pnp_registered) | 801 | if (pnp_registered) |
795 | pnp_unregister_driver(&cs4232_pnp_driver); | 802 | pnp_unregister_driver(&cs4232_pnp_driver); |
796 | #endif | 803 | #endif |
797 | #endif /* CONFIG_PNP */ | 804 | if (isa_registered) |
798 | isa_unregister_driver(&cs423x_isa_driver); | 805 | #endif |
806 | isa_unregister_driver(&cs423x_isa_driver); | ||
799 | } | 807 | } |
800 | 808 | ||
801 | module_init(alsa_card_cs423x_init) | 809 | module_init(alsa_card_cs423x_init) |
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c index d2a9c7df0ce5..f7732bf90be3 100644 --- a/sound/isa/es18xx.c +++ b/sound/isa/es18xx.c | |||
@@ -2036,7 +2036,9 @@ module_param_array(dma2, int, NULL, 0444); | |||
2036 | MODULE_PARM_DESC(dma2, "DMA 2 # for ES18xx driver."); | 2036 | MODULE_PARM_DESC(dma2, "DMA 2 # for ES18xx driver."); |
2037 | 2037 | ||
2038 | #ifdef CONFIG_PNP | 2038 | #ifdef CONFIG_PNP |
2039 | static int pnp_registered, pnpc_registered; | 2039 | static int isa_registered; |
2040 | static int pnp_registered; | ||
2041 | static int pnpc_registered; | ||
2040 | 2042 | ||
2041 | static struct pnp_device_id snd_audiodrive_pnpbiosids[] = { | 2043 | static struct pnp_device_id snd_audiodrive_pnpbiosids[] = { |
2042 | { .id = "ESS1869" }, | 2044 | { .id = "ESS1869" }, |
@@ -2466,18 +2468,22 @@ static int __init alsa_card_es18xx_init(void) | |||
2466 | int err; | 2468 | int err; |
2467 | 2469 | ||
2468 | err = isa_register_driver(&snd_es18xx_isa_driver, SNDRV_CARDS); | 2470 | err = isa_register_driver(&snd_es18xx_isa_driver, SNDRV_CARDS); |
2469 | if (err < 0) | ||
2470 | return err; | ||
2471 | |||
2472 | #ifdef CONFIG_PNP | 2471 | #ifdef CONFIG_PNP |
2472 | if (!err) | ||
2473 | isa_registered = 1; | ||
2474 | |||
2473 | err = pnp_register_driver(&es18xx_pnp_driver); | 2475 | err = pnp_register_driver(&es18xx_pnp_driver); |
2474 | if (!err) | 2476 | if (!err) |
2475 | pnp_registered = 1; | 2477 | pnp_registered = 1; |
2478 | |||
2476 | err = pnp_register_card_driver(&es18xx_pnpc_driver); | 2479 | err = pnp_register_card_driver(&es18xx_pnpc_driver); |
2477 | if (!err) | 2480 | if (!err) |
2478 | pnpc_registered = 1; | 2481 | pnpc_registered = 1; |
2482 | |||
2483 | if (isa_registered || pnp_registered) | ||
2484 | err = 0; | ||
2479 | #endif | 2485 | #endif |
2480 | return 0; | 2486 | return err; |
2481 | } | 2487 | } |
2482 | 2488 | ||
2483 | static void __exit alsa_card_es18xx_exit(void) | 2489 | static void __exit alsa_card_es18xx_exit(void) |
@@ -2487,8 +2493,9 @@ static void __exit alsa_card_es18xx_exit(void) | |||
2487 | pnp_unregister_card_driver(&es18xx_pnpc_driver); | 2493 | pnp_unregister_card_driver(&es18xx_pnpc_driver); |
2488 | if (pnp_registered) | 2494 | if (pnp_registered) |
2489 | pnp_unregister_driver(&es18xx_pnp_driver); | 2495 | pnp_unregister_driver(&es18xx_pnp_driver); |
2496 | if (isa_registered) | ||
2490 | #endif | 2497 | #endif |
2491 | isa_unregister_driver(&snd_es18xx_isa_driver); | 2498 | isa_unregister_driver(&snd_es18xx_isa_driver); |
2492 | } | 2499 | } |
2493 | 2500 | ||
2494 | module_init(alsa_card_es18xx_init) | 2501 | module_init(alsa_card_es18xx_init) |
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c index 3e4657255536..0220cdbe1a2a 100644 --- a/sound/isa/gus/interwave.c +++ b/sound/isa/gus/interwave.c | |||
@@ -135,6 +135,7 @@ struct snd_interwave { | |||
135 | 135 | ||
136 | 136 | ||
137 | #ifdef CONFIG_PNP | 137 | #ifdef CONFIG_PNP |
138 | static int isa_registered; | ||
138 | static int pnp_registered; | 139 | static int pnp_registered; |
139 | 140 | ||
140 | static struct pnp_card_device_id snd_interwave_pnpids[] = { | 141 | static struct pnp_card_device_id snd_interwave_pnpids[] = { |
@@ -934,15 +935,18 @@ static int __init alsa_card_interwave_init(void) | |||
934 | int err; | 935 | int err; |
935 | 936 | ||
936 | err = isa_register_driver(&snd_interwave_driver, SNDRV_CARDS); | 937 | err = isa_register_driver(&snd_interwave_driver, SNDRV_CARDS); |
937 | if (err < 0) | ||
938 | return err; | ||
939 | #ifdef CONFIG_PNP | 938 | #ifdef CONFIG_PNP |
940 | /* ISA PnP cards */ | 939 | if (!err) |
940 | isa_registered = 1; | ||
941 | |||
941 | err = pnp_register_card_driver(&interwave_pnpc_driver); | 942 | err = pnp_register_card_driver(&interwave_pnpc_driver); |
942 | if (!err) | 943 | if (!err) |
943 | pnp_registered = 1; | 944 | pnp_registered = 1; |
945 | |||
946 | if (isa_registered) | ||
947 | err = 0; | ||
944 | #endif | 948 | #endif |
945 | return 0; | 949 | return err; |
946 | } | 950 | } |
947 | 951 | ||
948 | static void __exit alsa_card_interwave_exit(void) | 952 | static void __exit alsa_card_interwave_exit(void) |
@@ -950,8 +954,9 @@ static void __exit alsa_card_interwave_exit(void) | |||
950 | #ifdef CONFIG_PNP | 954 | #ifdef CONFIG_PNP |
951 | if (pnp_registered) | 955 | if (pnp_registered) |
952 | pnp_unregister_card_driver(&interwave_pnpc_driver); | 956 | pnp_unregister_card_driver(&interwave_pnpc_driver); |
957 | if (isa_registered) | ||
953 | #endif | 958 | #endif |
954 | isa_unregister_driver(&snd_interwave_driver); | 959 | isa_unregister_driver(&snd_interwave_driver); |
955 | } | 960 | } |
956 | 961 | ||
957 | module_init(alsa_card_interwave_init) | 962 | module_init(alsa_card_interwave_init) |
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c index 48743eb85fb6..61a323cc0e49 100644 --- a/sound/isa/opl3sa2.c +++ b/sound/isa/opl3sa2.c | |||
@@ -92,6 +92,7 @@ module_param_array(opl3sa3_ymode, int, NULL, 0444); | |||
92 | MODULE_PARM_DESC(opl3sa3_ymode, "Speaker size selection for 3D Enhancement mode: Desktop/Large Notebook/Small Notebook/HiFi."); | 92 | MODULE_PARM_DESC(opl3sa3_ymode, "Speaker size selection for 3D Enhancement mode: Desktop/Large Notebook/Small Notebook/HiFi."); |
93 | 93 | ||
94 | #ifdef CONFIG_PNP | 94 | #ifdef CONFIG_PNP |
95 | static int isa_registered; | ||
95 | static int pnp_registered; | 96 | static int pnp_registered; |
96 | static int pnpc_registered; | 97 | static int pnpc_registered; |
97 | #endif | 98 | #endif |
@@ -967,17 +968,22 @@ static int __init alsa_card_opl3sa2_init(void) | |||
967 | int err; | 968 | int err; |
968 | 969 | ||
969 | err = isa_register_driver(&snd_opl3sa2_isa_driver, SNDRV_CARDS); | 970 | err = isa_register_driver(&snd_opl3sa2_isa_driver, SNDRV_CARDS); |
970 | if (err < 0) | ||
971 | return err; | ||
972 | #ifdef CONFIG_PNP | 971 | #ifdef CONFIG_PNP |
972 | if (!err) | ||
973 | isa_registered = 1; | ||
974 | |||
973 | err = pnp_register_driver(&opl3sa2_pnp_driver); | 975 | err = pnp_register_driver(&opl3sa2_pnp_driver); |
974 | if (!err) | 976 | if (!err) |
975 | pnp_registered = 1; | 977 | pnp_registered = 1; |
978 | |||
976 | err = pnp_register_card_driver(&opl3sa2_pnpc_driver); | 979 | err = pnp_register_card_driver(&opl3sa2_pnpc_driver); |
977 | if (!err) | 980 | if (!err) |
978 | pnpc_registered = 1; | 981 | pnpc_registered = 1; |
982 | |||
983 | if (isa_registered || pnp_registered) | ||
984 | err = 0; | ||
979 | #endif | 985 | #endif |
980 | return 0; | 986 | return err; |
981 | } | 987 | } |
982 | 988 | ||
983 | static void __exit alsa_card_opl3sa2_exit(void) | 989 | static void __exit alsa_card_opl3sa2_exit(void) |
@@ -987,8 +993,9 @@ static void __exit alsa_card_opl3sa2_exit(void) | |||
987 | pnp_unregister_card_driver(&opl3sa2_pnpc_driver); | 993 | pnp_unregister_card_driver(&opl3sa2_pnpc_driver); |
988 | if (pnp_registered) | 994 | if (pnp_registered) |
989 | pnp_unregister_driver(&opl3sa2_pnp_driver); | 995 | pnp_unregister_driver(&opl3sa2_pnp_driver); |
996 | if (isa_registered) | ||
990 | #endif | 997 | #endif |
991 | isa_unregister_driver(&snd_opl3sa2_isa_driver); | 998 | isa_unregister_driver(&snd_opl3sa2_isa_driver); |
992 | } | 999 | } |
993 | 1000 | ||
994 | module_init(alsa_card_opl3sa2_init) | 1001 | module_init(alsa_card_opl3sa2_init) |
diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c index 2a19b0a39eda..c4ba24bfd27c 100644 --- a/sound/isa/sb/sb16.c +++ b/sound/isa/sb/sb16.c | |||
@@ -129,6 +129,7 @@ MODULE_PARM_DESC(seq_ports, "Number of sequencer ports for WaveTable synth."); | |||
129 | #endif | 129 | #endif |
130 | 130 | ||
131 | #ifdef CONFIG_PNP | 131 | #ifdef CONFIG_PNP |
132 | static int isa_registered; | ||
132 | static int pnp_registered; | 133 | static int pnp_registered; |
133 | #endif | 134 | #endif |
134 | 135 | ||
@@ -702,15 +703,18 @@ static int __init alsa_card_sb16_init(void) | |||
702 | int err; | 703 | int err; |
703 | 704 | ||
704 | err = isa_register_driver(&snd_sb16_isa_driver, SNDRV_CARDS); | 705 | err = isa_register_driver(&snd_sb16_isa_driver, SNDRV_CARDS); |
705 | if (err < 0) | ||
706 | return err; | ||
707 | #ifdef CONFIG_PNP | 706 | #ifdef CONFIG_PNP |
708 | /* PnP cards at last */ | 707 | if (!err) |
708 | isa_registered = 1; | ||
709 | |||
709 | err = pnp_register_card_driver(&sb16_pnpc_driver); | 710 | err = pnp_register_card_driver(&sb16_pnpc_driver); |
710 | if (!err) | 711 | if (!err) |
711 | pnp_registered = 1; | 712 | pnp_registered = 1; |
713 | |||
714 | if (isa_registered) | ||
715 | err = 0; | ||
712 | #endif | 716 | #endif |
713 | return 0; | 717 | return err; |
714 | } | 718 | } |
715 | 719 | ||
716 | static void __exit alsa_card_sb16_exit(void) | 720 | static void __exit alsa_card_sb16_exit(void) |
@@ -718,8 +722,9 @@ static void __exit alsa_card_sb16_exit(void) | |||
718 | #ifdef CONFIG_PNP | 722 | #ifdef CONFIG_PNP |
719 | if (pnp_registered) | 723 | if (pnp_registered) |
720 | pnp_unregister_card_driver(&sb16_pnpc_driver); | 724 | pnp_unregister_card_driver(&sb16_pnpc_driver); |
725 | if (isa_registered) | ||
721 | #endif | 726 | #endif |
722 | isa_unregister_driver(&snd_sb16_isa_driver); | 727 | isa_unregister_driver(&snd_sb16_isa_driver); |
723 | } | 728 | } |
724 | 729 | ||
725 | module_init(alsa_card_sb16_init) | 730 | module_init(alsa_card_sb16_init) |
diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c index 08c14978558c..9ea417bcf3e5 100644 --- a/sound/isa/sscape.c +++ b/sound/isa/sscape.c | |||
@@ -69,7 +69,9 @@ module_param_array(dma, int, NULL, 0444); | |||
69 | MODULE_PARM_DESC(dma, "DMA # for SoundScape driver."); | 69 | MODULE_PARM_DESC(dma, "DMA # for SoundScape driver."); |
70 | 70 | ||
71 | #ifdef CONFIG_PNP | 71 | #ifdef CONFIG_PNP |
72 | static int isa_registered; | ||
72 | static int pnp_registered; | 73 | static int pnp_registered; |
74 | |||
73 | static struct pnp_card_device_id sscape_pnpids[] = { | 75 | static struct pnp_card_device_id sscape_pnpids[] = { |
74 | { .id = "ENS3081", .devs = { { "ENS0000" } } }, | 76 | { .id = "ENS3081", .devs = { { "ENS0000" } } }, |
75 | { .id = "" } /* end */ | 77 | { .id = "" } /* end */ |
@@ -1405,22 +1407,21 @@ static struct pnp_card_driver sscape_pnpc_driver = { | |||
1405 | 1407 | ||
1406 | static int __init sscape_init(void) | 1408 | static int __init sscape_init(void) |
1407 | { | 1409 | { |
1408 | int ret; | 1410 | int err; |
1409 | 1411 | ||
1410 | /* | 1412 | err = isa_register_driver(&snd_sscape_driver, SNDRV_CARDS); |
1411 | * First check whether we were passed any parameters. | ||
1412 | * These MUST take precedence over ANY automatic way | ||
1413 | * of allocating cards, because the operator is | ||
1414 | * S-P-E-L-L-I-N-G it out for us... | ||
1415 | */ | ||
1416 | ret = isa_register_driver(&snd_sscape_driver, SNDRV_CARDS); | ||
1417 | if (ret < 0) | ||
1418 | return ret; | ||
1419 | #ifdef CONFIG_PNP | 1413 | #ifdef CONFIG_PNP |
1420 | if (pnp_register_card_driver(&sscape_pnpc_driver) == 0) | 1414 | if (!err) |
1415 | isa_registered = 1; | ||
1416 | |||
1417 | err = pnp_register_card_driver(&sscape_pnpc_driver); | ||
1418 | if (!err) | ||
1421 | pnp_registered = 1; | 1419 | pnp_registered = 1; |
1420 | |||
1421 | if (isa_registered) | ||
1422 | err = 0; | ||
1422 | #endif | 1423 | #endif |
1423 | return 0; | 1424 | return err; |
1424 | } | 1425 | } |
1425 | 1426 | ||
1426 | static void __exit sscape_exit(void) | 1427 | static void __exit sscape_exit(void) |
@@ -1428,8 +1429,9 @@ static void __exit sscape_exit(void) | |||
1428 | #ifdef CONFIG_PNP | 1429 | #ifdef CONFIG_PNP |
1429 | if (pnp_registered) | 1430 | if (pnp_registered) |
1430 | pnp_unregister_card_driver(&sscape_pnpc_driver); | 1431 | pnp_unregister_card_driver(&sscape_pnpc_driver); |
1432 | if (isa_registered) | ||
1431 | #endif | 1433 | #endif |
1432 | isa_unregister_driver(&snd_sscape_driver); | 1434 | isa_unregister_driver(&snd_sscape_driver); |
1433 | } | 1435 | } |
1434 | 1436 | ||
1435 | module_init(sscape_init); | 1437 | module_init(sscape_init); |
diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c index 75673f723857..83c2fc4cfc64 100644 --- a/sound/isa/wavefront/wavefront.c +++ b/sound/isa/wavefront/wavefront.c | |||
@@ -86,6 +86,7 @@ module_param_array(use_cs4232_midi, bool, NULL, 0444); | |||
86 | MODULE_PARM_DESC(use_cs4232_midi, "Use CS4232 MPU-401 interface (inaccessibly located inside your computer)"); | 86 | MODULE_PARM_DESC(use_cs4232_midi, "Use CS4232 MPU-401 interface (inaccessibly located inside your computer)"); |
87 | 87 | ||
88 | #ifdef CONFIG_PNP | 88 | #ifdef CONFIG_PNP |
89 | static int isa_registered; | ||
89 | static int pnp_registered; | 90 | static int pnp_registered; |
90 | 91 | ||
91 | static struct pnp_card_device_id snd_wavefront_pnpids[] = { | 92 | static struct pnp_card_device_id snd_wavefront_pnpids[] = { |
@@ -706,14 +707,18 @@ static int __init alsa_card_wavefront_init(void) | |||
706 | int err; | 707 | int err; |
707 | 708 | ||
708 | err = isa_register_driver(&snd_wavefront_driver, SNDRV_CARDS); | 709 | err = isa_register_driver(&snd_wavefront_driver, SNDRV_CARDS); |
709 | if (err < 0) | ||
710 | return err; | ||
711 | #ifdef CONFIG_PNP | 710 | #ifdef CONFIG_PNP |
711 | if (!err) | ||
712 | isa_registered = 1; | ||
713 | |||
712 | err = pnp_register_card_driver(&wavefront_pnpc_driver); | 714 | err = pnp_register_card_driver(&wavefront_pnpc_driver); |
713 | if (!err) | 715 | if (!err) |
714 | pnp_registered = 1; | 716 | pnp_registered = 1; |
717 | |||
718 | if (isa_registered) | ||
719 | err = 0; | ||
715 | #endif | 720 | #endif |
716 | return 0; | 721 | return err; |
717 | } | 722 | } |
718 | 723 | ||
719 | static void __exit alsa_card_wavefront_exit(void) | 724 | static void __exit alsa_card_wavefront_exit(void) |
@@ -721,8 +726,9 @@ static void __exit alsa_card_wavefront_exit(void) | |||
721 | #ifdef CONFIG_PNP | 726 | #ifdef CONFIG_PNP |
722 | if (pnp_registered) | 727 | if (pnp_registered) |
723 | pnp_unregister_card_driver(&wavefront_pnpc_driver); | 728 | pnp_unregister_card_driver(&wavefront_pnpc_driver); |
729 | if (isa_registered) | ||
724 | #endif | 730 | #endif |
725 | isa_unregister_driver(&snd_wavefront_driver); | 731 | isa_unregister_driver(&snd_wavefront_driver); |
726 | } | 732 | } |
727 | 733 | ||
728 | module_init(alsa_card_wavefront_init) | 734 | module_init(alsa_card_wavefront_init) |
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index 3eac0f86266c..581ebba4d1a7 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c | |||
@@ -1782,6 +1782,11 @@ static unsigned int ad1981_jacks_blacklist[] = { | |||
1782 | 0x10140534, /* Thinkpad X31 */ | 1782 | 0x10140534, /* Thinkpad X31 */ |
1783 | 0x10140537, /* Thinkpad T41p */ | 1783 | 0x10140537, /* Thinkpad T41p */ |
1784 | 0x10140554, /* Thinkpad T42p/R50p */ | 1784 | 0x10140554, /* Thinkpad T42p/R50p */ |
1785 | 0x10140567, /* Thinkpad T43p 2668-G7U */ | ||
1786 | 0x10140581, /* Thinkpad X41-2527 */ | ||
1787 | 0x104380b0, /* Asus A7V8X-MX */ | ||
1788 | 0x11790241, /* Toshiba Satellite A-15 S127 */ | ||
1789 | 0x144dc01a, /* Samsung NP-X20C004/SEG */ | ||
1785 | 0 /* end */ | 1790 | 0 /* end */ |
1786 | }; | 1791 | }; |
1787 | 1792 | ||
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 14649d54b493..8e89d56b6400 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -707,7 +707,8 @@ static u32 query_amp_caps(struct hda_codec *codec, hda_nid_t nid, int direction) | |||
707 | direction == HDA_OUTPUT ? | 707 | direction == HDA_OUTPUT ? |
708 | AC_PAR_AMP_OUT_CAP : | 708 | AC_PAR_AMP_OUT_CAP : |
709 | AC_PAR_AMP_IN_CAP); | 709 | AC_PAR_AMP_IN_CAP); |
710 | info->status |= INFO_AMP_CAPS; | 710 | if (info->amp_caps) |
711 | info->status |= INFO_AMP_CAPS; | ||
711 | } | 712 | } |
712 | return info->amp_caps; | 713 | return info->amp_caps; |
713 | } | 714 | } |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index a4ede27af021..34ac63469532 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -93,6 +93,7 @@ enum { | |||
93 | ALC262_HP_BPC_D7000_WL, | 93 | ALC262_HP_BPC_D7000_WL, |
94 | ALC262_HP_BPC_D7000_WF, | 94 | ALC262_HP_BPC_D7000_WF, |
95 | ALC262_BENQ_ED8, | 95 | ALC262_BENQ_ED8, |
96 | ALC262_SONY_ASSAMD, | ||
96 | ALC262_AUTO, | 97 | ALC262_AUTO, |
97 | ALC262_MODEL_LAST /* last tag */ | 98 | ALC262_MODEL_LAST /* last tag */ |
98 | }; | 99 | }; |
@@ -118,6 +119,7 @@ enum { | |||
118 | ALC861VD_3ST_DIG, | 119 | ALC861VD_3ST_DIG, |
119 | ALC861VD_6ST_DIG, | 120 | ALC861VD_6ST_DIG, |
120 | ALC861VD_LENOVO, | 121 | ALC861VD_LENOVO, |
122 | ALC861VD_DALLAS, | ||
121 | ALC861VD_AUTO, | 123 | ALC861VD_AUTO, |
122 | ALC861VD_MODEL_LAST, | 124 | ALC861VD_MODEL_LAST, |
123 | }; | 125 | }; |
@@ -139,8 +141,10 @@ enum { | |||
139 | ALC882_6ST_DIG, | 141 | ALC882_6ST_DIG, |
140 | ALC882_ARIMA, | 142 | ALC882_ARIMA, |
141 | ALC882_W2JC, | 143 | ALC882_W2JC, |
142 | ALC882_AUTO, | 144 | ALC882_TARGA, |
145 | ALC882_ASUS_A7J, | ||
143 | ALC885_MACPRO, | 146 | ALC885_MACPRO, |
147 | ALC882_AUTO, | ||
144 | ALC882_MODEL_LAST, | 148 | ALC882_MODEL_LAST, |
145 | }; | 149 | }; |
146 | 150 | ||
@@ -152,11 +156,13 @@ enum { | |||
152 | ALC883_6ST_DIG, | 156 | ALC883_6ST_DIG, |
153 | ALC883_TARGA_DIG, | 157 | ALC883_TARGA_DIG, |
154 | ALC883_TARGA_2ch_DIG, | 158 | ALC883_TARGA_2ch_DIG, |
155 | ALC888_DEMO_BOARD, | ||
156 | ALC883_ACER, | 159 | ALC883_ACER, |
157 | ALC883_MEDION, | 160 | ALC883_MEDION, |
161 | ALC883_MEDION_MD2, | ||
158 | ALC883_LAPTOP_EAPD, | 162 | ALC883_LAPTOP_EAPD, |
159 | ALC883_LENOVO_101E_2ch, | 163 | ALC883_LENOVO_101E_2ch, |
164 | ALC883_LENOVO_NB0763, | ||
165 | ALC888_LENOVO_MS7195_DIG, | ||
160 | ALC883_AUTO, | 166 | ALC883_AUTO, |
161 | ALC883_MODEL_LAST, | 167 | ALC883_MODEL_LAST, |
162 | }; | 168 | }; |
@@ -4753,6 +4759,35 @@ static int alc882_mux_enum_put(struct snd_kcontrol *kcontrol, | |||
4753 | } | 4759 | } |
4754 | 4760 | ||
4755 | /* | 4761 | /* |
4762 | * 2ch mode | ||
4763 | */ | ||
4764 | static struct hda_verb alc882_3ST_ch2_init[] = { | ||
4765 | { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, | ||
4766 | { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
4767 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, | ||
4768 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | ||
4769 | { } /* end */ | ||
4770 | }; | ||
4771 | |||
4772 | /* | ||
4773 | * 6ch mode | ||
4774 | */ | ||
4775 | static struct hda_verb alc882_3ST_ch6_init[] = { | ||
4776 | { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
4777 | { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
4778 | { 0x18, AC_VERB_SET_CONNECT_SEL, 0x02 }, | ||
4779 | { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, | ||
4780 | { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, | ||
4781 | { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 }, | ||
4782 | { } /* end */ | ||
4783 | }; | ||
4784 | |||
4785 | static struct hda_channel_mode alc882_3ST_6ch_modes[2] = { | ||
4786 | { 2, alc882_3ST_ch2_init }, | ||
4787 | { 6, alc882_3ST_ch6_init }, | ||
4788 | }; | ||
4789 | |||
4790 | /* | ||
4756 | * 6ch mode | 4791 | * 6ch mode |
4757 | */ | 4792 | */ |
4758 | static struct hda_verb alc882_sixstack_ch6_init[] = { | 4793 | static struct hda_verb alc882_sixstack_ch6_init[] = { |
@@ -4824,6 +4859,40 @@ static struct snd_kcontrol_new alc882_w2jc_mixer[] = { | |||
4824 | { } /* end */ | 4859 | { } /* end */ |
4825 | }; | 4860 | }; |
4826 | 4861 | ||
4862 | static struct snd_kcontrol_new alc882_targa_mixer[] = { | ||
4863 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
4864 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
4865 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), | ||
4866 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
4867 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
4868 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
4869 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
4870 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
4871 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
4872 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | ||
4873 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | ||
4874 | { } /* end */ | ||
4875 | }; | ||
4876 | |||
4877 | /* Pin assignment: Front=0x14, HP = 0x15, Front = 0x16, ??? | ||
4878 | * Front Mic=0x18, Line In = 0x1a, Line In = 0x1b, CD = 0x1c | ||
4879 | */ | ||
4880 | static struct snd_kcontrol_new alc882_asus_a7j_mixer[] = { | ||
4881 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
4882 | HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT), | ||
4883 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | ||
4884 | HDA_CODEC_MUTE("Mobile Front Playback Switch", 0x16, 0x0, HDA_OUTPUT), | ||
4885 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
4886 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
4887 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
4888 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
4889 | HDA_CODEC_VOLUME("Mobile Line Playback Volume", 0x0b, 0x03, HDA_INPUT), | ||
4890 | HDA_CODEC_MUTE("Mobile Line Playback Switch", 0x0b, 0x03, HDA_INPUT), | ||
4891 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
4892 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
4893 | { } /* end */ | ||
4894 | }; | ||
4895 | |||
4827 | static struct snd_kcontrol_new alc882_chmode_mixer[] = { | 4896 | static struct snd_kcontrol_new alc882_chmode_mixer[] = { |
4828 | { | 4897 | { |
4829 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 4898 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
@@ -4985,6 +5054,66 @@ static struct hda_verb alc882_macpro_init_verbs[] = { | |||
4985 | { } | 5054 | { } |
4986 | }; | 5055 | }; |
4987 | 5056 | ||
5057 | static struct hda_verb alc882_targa_verbs[] = { | ||
5058 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
5059 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
5060 | |||
5061 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
5062 | {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
5063 | |||
5064 | {0x18, AC_VERB_SET_CONNECT_SEL, 0x02}, /* mic/clfe */ | ||
5065 | {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01}, /* line/surround */ | ||
5066 | {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */ | ||
5067 | |||
5068 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN}, | ||
5069 | {0x01, AC_VERB_SET_GPIO_MASK, 0x03}, | ||
5070 | {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x03}, | ||
5071 | {0x01, AC_VERB_SET_GPIO_DATA, 0x03}, | ||
5072 | { } /* end */ | ||
5073 | }; | ||
5074 | |||
5075 | /* toggle speaker-output according to the hp-jack state */ | ||
5076 | static void alc882_targa_automute(struct hda_codec *codec) | ||
5077 | { | ||
5078 | unsigned int present; | ||
5079 | |||
5080 | present = snd_hda_codec_read(codec, 0x14, 0, | ||
5081 | AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; | ||
5082 | snd_hda_codec_amp_update(codec, 0x1b, 0, HDA_OUTPUT, 0, | ||
5083 | 0x80, present ? 0x80 : 0); | ||
5084 | snd_hda_codec_amp_update(codec, 0x1b, 1, HDA_OUTPUT, 0, | ||
5085 | 0x80, present ? 0x80 : 0); | ||
5086 | snd_hda_codec_write(codec, 1, 0, AC_VERB_SET_GPIO_DATA, present ? 1 : 3); | ||
5087 | } | ||
5088 | |||
5089 | static void alc882_targa_unsol_event(struct hda_codec *codec, unsigned int res) | ||
5090 | { | ||
5091 | /* Looks like the unsol event is incompatible with the standard | ||
5092 | * definition. 4bit tag is placed at 26 bit! | ||
5093 | */ | ||
5094 | if (((res >> 26) == ALC880_HP_EVENT)) { | ||
5095 | alc882_targa_automute(codec); | ||
5096 | } | ||
5097 | } | ||
5098 | |||
5099 | static struct hda_verb alc882_asus_a7j_verbs[] = { | ||
5100 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
5101 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
5102 | |||
5103 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
5104 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
5105 | {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
5106 | |||
5107 | {0x14, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Front */ | ||
5108 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */ | ||
5109 | {0x16, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Front */ | ||
5110 | |||
5111 | {0x18, AC_VERB_SET_CONNECT_SEL, 0x02}, /* mic/clfe */ | ||
5112 | {0x1a, AC_VERB_SET_CONNECT_SEL, 0x01}, /* line/surround */ | ||
5113 | {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */ | ||
5114 | { } /* end */ | ||
5115 | }; | ||
5116 | |||
4988 | static void alc882_gpio_mute(struct hda_codec *codec, int pin, int muted) | 5117 | static void alc882_gpio_mute(struct hda_codec *codec, int pin, int muted) |
4989 | { | 5118 | { |
4990 | unsigned int gpiostate, gpiomask, gpiodir; | 5119 | unsigned int gpiostate, gpiomask, gpiodir; |
@@ -5152,7 +5281,9 @@ static struct snd_pci_quirk alc882_cfg_tbl[] = { | |||
5152 | SND_PCI_QUIRK(0x1019, 0x6668, "ECS", ALC882_6ST_DIG), | 5281 | SND_PCI_QUIRK(0x1019, 0x6668, "ECS", ALC882_6ST_DIG), |
5153 | SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC882_6ST_DIG), | 5282 | SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC882_6ST_DIG), |
5154 | SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC882_6ST_DIG), | 5283 | SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC882_6ST_DIG), |
5284 | SND_PCI_QUIRK(0x1462, 0x28fb, "Targa T8", ALC882_TARGA), /* MSI-1049 T8 */ | ||
5155 | SND_PCI_QUIRK(0x161f, 0x2054, "Arima W820", ALC882_ARIMA), | 5285 | SND_PCI_QUIRK(0x161f, 0x2054, "Arima W820", ALC882_ARIMA), |
5286 | SND_PCI_QUIRK(0x1043, 0x060d, "Asus A7J", ALC882_ASUS_A7J), | ||
5156 | SND_PCI_QUIRK(0x1043, 0x81d8, "Asus P5WD", ALC882_6ST_DIG), | 5287 | SND_PCI_QUIRK(0x1043, 0x81d8, "Asus P5WD", ALC882_6ST_DIG), |
5157 | SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_W2JC), | 5288 | SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_W2JC), |
5158 | {} | 5289 | {} |
@@ -5214,6 +5345,36 @@ static struct alc_config_preset alc882_presets[] = { | |||
5214 | .channel_mode = alc882_ch_modes, | 5345 | .channel_mode = alc882_ch_modes, |
5215 | .input_mux = &alc882_capture_source, | 5346 | .input_mux = &alc882_capture_source, |
5216 | }, | 5347 | }, |
5348 | [ALC882_TARGA] = { | ||
5349 | .mixers = { alc882_targa_mixer, alc882_chmode_mixer, | ||
5350 | alc882_capture_mixer }, | ||
5351 | .init_verbs = { alc882_init_verbs, alc882_targa_verbs}, | ||
5352 | .num_dacs = ARRAY_SIZE(alc882_dac_nids), | ||
5353 | .dac_nids = alc882_dac_nids, | ||
5354 | .dig_out_nid = ALC882_DIGOUT_NID, | ||
5355 | .num_adc_nids = ARRAY_SIZE(alc882_adc_nids), | ||
5356 | .adc_nids = alc882_adc_nids, | ||
5357 | .num_channel_mode = ARRAY_SIZE(alc882_3ST_6ch_modes), | ||
5358 | .channel_mode = alc882_3ST_6ch_modes, | ||
5359 | .need_dac_fix = 1, | ||
5360 | .input_mux = &alc882_capture_source, | ||
5361 | .unsol_event = alc882_targa_unsol_event, | ||
5362 | .init_hook = alc882_targa_automute, | ||
5363 | }, | ||
5364 | [ALC882_ASUS_A7J] = { | ||
5365 | .mixers = { alc882_asus_a7j_mixer, alc882_chmode_mixer, | ||
5366 | alc882_capture_mixer }, | ||
5367 | .init_verbs = { alc882_init_verbs, alc882_asus_a7j_verbs}, | ||
5368 | .num_dacs = ARRAY_SIZE(alc882_dac_nids), | ||
5369 | .dac_nids = alc882_dac_nids, | ||
5370 | .dig_out_nid = ALC882_DIGOUT_NID, | ||
5371 | .num_adc_nids = ARRAY_SIZE(alc882_adc_nids), | ||
5372 | .adc_nids = alc882_adc_nids, | ||
5373 | .num_channel_mode = ARRAY_SIZE(alc882_3ST_6ch_modes), | ||
5374 | .channel_mode = alc882_3ST_6ch_modes, | ||
5375 | .need_dac_fix = 1, | ||
5376 | .input_mux = &alc882_capture_source, | ||
5377 | }, | ||
5217 | }; | 5378 | }; |
5218 | 5379 | ||
5219 | 5380 | ||
@@ -5441,6 +5602,16 @@ static struct hda_input_mux alc883_lenovo_101e_capture_source = { | |||
5441 | }, | 5602 | }, |
5442 | }; | 5603 | }; |
5443 | 5604 | ||
5605 | static struct hda_input_mux alc883_lenovo_nb0763_capture_source = { | ||
5606 | .num_items = 4, | ||
5607 | .items = { | ||
5608 | { "Mic", 0x0 }, | ||
5609 | { "iMic", 0x1 }, | ||
5610 | { "Line", 0x2 }, | ||
5611 | { "CD", 0x4 }, | ||
5612 | }, | ||
5613 | }; | ||
5614 | |||
5444 | #define alc883_mux_enum_info alc_mux_enum_info | 5615 | #define alc883_mux_enum_info alc_mux_enum_info |
5445 | #define alc883_mux_enum_get alc_mux_enum_get | 5616 | #define alc883_mux_enum_get alc_mux_enum_get |
5446 | 5617 | ||
@@ -5772,6 +5943,58 @@ static struct snd_kcontrol_new alc883_lenovo_101e_2ch_mixer[] = { | |||
5772 | { } /* end */ | 5943 | { } /* end */ |
5773 | }; | 5944 | }; |
5774 | 5945 | ||
5946 | static struct snd_kcontrol_new alc883_lenovo_nb0763_mixer[] = { | ||
5947 | HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
5948 | HDA_BIND_MUTE("Speaker Playback Switch", 0x0c, 2, HDA_INPUT), | ||
5949 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT), | ||
5950 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
5951 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
5952 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
5953 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
5954 | HDA_CODEC_VOLUME("iMic Playback Volume", 0x0b, 0x1, HDA_INPUT), | ||
5955 | HDA_CODEC_MUTE("iMic Playback Switch", 0x0b, 0x1, HDA_INPUT), | ||
5956 | HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), | ||
5957 | HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), | ||
5958 | HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT), | ||
5959 | HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT), | ||
5960 | { | ||
5961 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
5962 | /* .name = "Capture Source", */ | ||
5963 | .name = "Input Source", | ||
5964 | .count = 2, | ||
5965 | .info = alc883_mux_enum_info, | ||
5966 | .get = alc883_mux_enum_get, | ||
5967 | .put = alc883_mux_enum_put, | ||
5968 | }, | ||
5969 | { } /* end */ | ||
5970 | }; | ||
5971 | |||
5972 | static struct snd_kcontrol_new alc883_medion_md2_mixer[] = { | ||
5973 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
5974 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT), | ||
5975 | HDA_CODEC_MUTE("Front Playback Switch", 0x15, 0x0, HDA_OUTPUT), | ||
5976 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
5977 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
5978 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
5979 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
5980 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
5981 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
5982 | HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), | ||
5983 | HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), | ||
5984 | HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT), | ||
5985 | HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT), | ||
5986 | { | ||
5987 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
5988 | /* .name = "Capture Source", */ | ||
5989 | .name = "Input Source", | ||
5990 | .count = 2, | ||
5991 | .info = alc883_mux_enum_info, | ||
5992 | .get = alc883_mux_enum_get, | ||
5993 | .put = alc883_mux_enum_put, | ||
5994 | }, | ||
5995 | { } /* end */ | ||
5996 | }; | ||
5997 | |||
5775 | static struct snd_kcontrol_new alc883_chmode_mixer[] = { | 5998 | static struct snd_kcontrol_new alc883_chmode_mixer[] = { |
5776 | { | 5999 | { |
5777 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 6000 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
@@ -5886,6 +6109,93 @@ static struct hda_verb alc883_lenovo_101e_verbs[] = { | |||
5886 | { } /* end */ | 6109 | { } /* end */ |
5887 | }; | 6110 | }; |
5888 | 6111 | ||
6112 | static struct hda_verb alc883_lenovo_nb0763_verbs[] = { | ||
6113 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
6114 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
6115 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN}, | ||
6116 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
6117 | { } /* end */ | ||
6118 | }; | ||
6119 | |||
6120 | static struct hda_verb alc888_lenovo_ms7195_verbs[] = { | ||
6121 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
6122 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
6123 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
6124 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_FRONT_EVENT | AC_USRSP_EN}, | ||
6125 | {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN}, | ||
6126 | { } /* end */ | ||
6127 | }; | ||
6128 | |||
6129 | /* toggle front-jack and RCA according to the hp-jack state */ | ||
6130 | static void alc888_lenovo_ms7195_front_automute(struct hda_codec *codec) | ||
6131 | { | ||
6132 | unsigned int present; | ||
6133 | |||
6134 | present = snd_hda_codec_read(codec, 0x1b, 0, | ||
6135 | AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; | ||
6136 | snd_hda_codec_amp_update(codec, 0x14, 0, HDA_OUTPUT, 0, | ||
6137 | 0x80, present ? 0x80 : 0); | ||
6138 | snd_hda_codec_amp_update(codec, 0x14, 1, HDA_OUTPUT, 0, | ||
6139 | 0x80, present ? 0x80 : 0); | ||
6140 | snd_hda_codec_amp_update(codec, 0x15, 0, HDA_OUTPUT, 0, | ||
6141 | 0x80, present ? 0x80 : 0); | ||
6142 | snd_hda_codec_amp_update(codec, 0x15, 1, HDA_OUTPUT, 0, | ||
6143 | 0x80, present ? 0x80 : 0); | ||
6144 | |||
6145 | } | ||
6146 | |||
6147 | /* toggle RCA according to the front-jack state */ | ||
6148 | static void alc888_lenovo_ms7195_rca_automute(struct hda_codec *codec) | ||
6149 | { | ||
6150 | unsigned int present; | ||
6151 | |||
6152 | present = snd_hda_codec_read(codec, 0x14, 0, | ||
6153 | AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; | ||
6154 | snd_hda_codec_amp_update(codec, 0x15, 0, HDA_OUTPUT, 0, | ||
6155 | 0x80, present ? 0x80 : 0); | ||
6156 | snd_hda_codec_amp_update(codec, 0x15, 1, HDA_OUTPUT, 0, | ||
6157 | 0x80, present ? 0x80 : 0); | ||
6158 | |||
6159 | } | ||
6160 | static void alc883_lenovo_ms7195_unsol_event(struct hda_codec *codec, | ||
6161 | unsigned int res) | ||
6162 | { | ||
6163 | if ((res >> 26) == ALC880_HP_EVENT) | ||
6164 | alc888_lenovo_ms7195_front_automute(codec); | ||
6165 | if ((res >> 26) == ALC880_FRONT_EVENT) | ||
6166 | alc888_lenovo_ms7195_rca_automute(codec); | ||
6167 | } | ||
6168 | |||
6169 | static struct hda_verb alc883_medion_md2_verbs[] = { | ||
6170 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
6171 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
6172 | |||
6173 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
6174 | |||
6175 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN}, | ||
6176 | { } /* end */ | ||
6177 | }; | ||
6178 | |||
6179 | /* toggle speaker-output according to the hp-jack state */ | ||
6180 | static void alc883_medion_md2_automute(struct hda_codec *codec) | ||
6181 | { | ||
6182 | unsigned int present; | ||
6183 | |||
6184 | present = snd_hda_codec_read(codec, 0x14, 0, | ||
6185 | AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; | ||
6186 | snd_hda_codec_amp_update(codec, 0x15, 0, HDA_OUTPUT, 0, | ||
6187 | 0x80, present ? 0x80 : 0); | ||
6188 | snd_hda_codec_amp_update(codec, 0x15, 1, HDA_OUTPUT, 0, | ||
6189 | 0x80, present ? 0x80 : 0); | ||
6190 | } | ||
6191 | |||
6192 | static void alc883_medion_md2_unsol_event(struct hda_codec *codec, | ||
6193 | unsigned int res) | ||
6194 | { | ||
6195 | if ((res >> 26) == ALC880_HP_EVENT) | ||
6196 | alc883_medion_md2_automute(codec); | ||
6197 | } | ||
6198 | |||
5889 | /* toggle speaker-output according to the hp-jack state */ | 6199 | /* toggle speaker-output according to the hp-jack state */ |
5890 | static void alc883_tagra_automute(struct hda_codec *codec) | 6200 | static void alc883_tagra_automute(struct hda_codec *codec) |
5891 | { | 6201 | { |
@@ -6051,11 +6361,13 @@ static const char *alc883_models[ALC883_MODEL_LAST] = { | |||
6051 | [ALC883_6ST_DIG] = "6stack-dig", | 6361 | [ALC883_6ST_DIG] = "6stack-dig", |
6052 | [ALC883_TARGA_DIG] = "targa-dig", | 6362 | [ALC883_TARGA_DIG] = "targa-dig", |
6053 | [ALC883_TARGA_2ch_DIG] = "targa-2ch-dig", | 6363 | [ALC883_TARGA_2ch_DIG] = "targa-2ch-dig", |
6054 | [ALC888_DEMO_BOARD] = "6stack-dig-demo", | ||
6055 | [ALC883_ACER] = "acer", | 6364 | [ALC883_ACER] = "acer", |
6056 | [ALC883_MEDION] = "medion", | 6365 | [ALC883_MEDION] = "medion", |
6366 | [ALC883_MEDION_MD2] = "medion-md2", | ||
6057 | [ALC883_LAPTOP_EAPD] = "laptop-eapd", | 6367 | [ALC883_LAPTOP_EAPD] = "laptop-eapd", |
6058 | [ALC883_LENOVO_101E_2ch] = "lenovo-101e", | 6368 | [ALC883_LENOVO_101E_2ch] = "lenovo-101e", |
6369 | [ALC883_LENOVO_NB0763] = "lenovo-nb0763", | ||
6370 | [ALC888_LENOVO_MS7195_DIG] = "lenovo-ms7195-dig", | ||
6059 | [ALC883_AUTO] = "auto", | 6371 | [ALC883_AUTO] = "auto", |
6060 | }; | 6372 | }; |
6061 | 6373 | ||
@@ -6082,7 +6394,10 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
6082 | SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION), | 6394 | SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION), |
6083 | SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), | 6395 | SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), |
6084 | SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch), | 6396 | SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch), |
6085 | SND_PCI_QUIRK(0x17aa, 0x101e, "lenovo 101e", ALC883_LENOVO_101E_2ch), | 6397 | SND_PCI_QUIRK(0x17aa, 0x101e, "Lenovo 101e", ALC883_LENOVO_101E_2ch), |
6398 | SND_PCI_QUIRK(0x17aa, 0x3bfd, "Lenovo NB0763", ALC883_LENOVO_NB0763), | ||
6399 | SND_PCI_QUIRK(0x17aa, 0x2085, "Lenovo NB0763", ALC883_LENOVO_NB0763), | ||
6400 | SND_PCI_QUIRK(0x17c0, 0x4071, "MEDION MD2", ALC883_MEDION_MD2), | ||
6086 | {} | 6401 | {} |
6087 | }; | 6402 | }; |
6088 | 6403 | ||
@@ -6168,19 +6483,6 @@ static struct alc_config_preset alc883_presets[] = { | |||
6168 | .unsol_event = alc883_tagra_unsol_event, | 6483 | .unsol_event = alc883_tagra_unsol_event, |
6169 | .init_hook = alc883_tagra_automute, | 6484 | .init_hook = alc883_tagra_automute, |
6170 | }, | 6485 | }, |
6171 | [ALC888_DEMO_BOARD] = { | ||
6172 | .mixers = { alc883_base_mixer, alc883_chmode_mixer }, | ||
6173 | .init_verbs = { alc883_init_verbs }, | ||
6174 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
6175 | .dac_nids = alc883_dac_nids, | ||
6176 | .dig_out_nid = ALC883_DIGOUT_NID, | ||
6177 | .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), | ||
6178 | .adc_nids = alc883_adc_nids, | ||
6179 | .dig_in_nid = ALC883_DIGIN_NID, | ||
6180 | .num_channel_mode = ARRAY_SIZE(alc883_sixstack_modes), | ||
6181 | .channel_mode = alc883_sixstack_modes, | ||
6182 | .input_mux = &alc883_capture_source, | ||
6183 | }, | ||
6184 | [ALC883_ACER] = { | 6486 | [ALC883_ACER] = { |
6185 | .mixers = { alc883_base_mixer, | 6487 | .mixers = { alc883_base_mixer, |
6186 | alc883_chmode_mixer }, | 6488 | alc883_chmode_mixer }, |
@@ -6211,6 +6513,20 @@ static struct alc_config_preset alc883_presets[] = { | |||
6211 | .channel_mode = alc883_sixstack_modes, | 6513 | .channel_mode = alc883_sixstack_modes, |
6212 | .input_mux = &alc883_capture_source, | 6514 | .input_mux = &alc883_capture_source, |
6213 | }, | 6515 | }, |
6516 | [ALC883_MEDION_MD2] = { | ||
6517 | .mixers = { alc883_medion_md2_mixer}, | ||
6518 | .init_verbs = { alc883_init_verbs, alc883_medion_md2_verbs}, | ||
6519 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
6520 | .dac_nids = alc883_dac_nids, | ||
6521 | .dig_out_nid = ALC883_DIGOUT_NID, | ||
6522 | .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), | ||
6523 | .adc_nids = alc883_adc_nids, | ||
6524 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes), | ||
6525 | .channel_mode = alc883_3ST_2ch_modes, | ||
6526 | .input_mux = &alc883_capture_source, | ||
6527 | .unsol_event = alc883_medion_md2_unsol_event, | ||
6528 | .init_hook = alc883_medion_md2_automute, | ||
6529 | }, | ||
6214 | [ALC883_LAPTOP_EAPD] = { | 6530 | [ALC883_LAPTOP_EAPD] = { |
6215 | .mixers = { alc883_base_mixer, | 6531 | .mixers = { alc883_base_mixer, |
6216 | alc883_chmode_mixer }, | 6532 | alc883_chmode_mixer }, |
@@ -6236,6 +6552,35 @@ static struct alc_config_preset alc883_presets[] = { | |||
6236 | .unsol_event = alc883_lenovo_101e_unsol_event, | 6552 | .unsol_event = alc883_lenovo_101e_unsol_event, |
6237 | .init_hook = alc883_lenovo_101e_all_automute, | 6553 | .init_hook = alc883_lenovo_101e_all_automute, |
6238 | }, | 6554 | }, |
6555 | [ALC883_LENOVO_NB0763] = { | ||
6556 | .mixers = { alc883_lenovo_nb0763_mixer }, | ||
6557 | .init_verbs = { alc883_init_verbs, alc883_lenovo_nb0763_verbs}, | ||
6558 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
6559 | .dac_nids = alc883_dac_nids, | ||
6560 | .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), | ||
6561 | .adc_nids = alc883_adc_nids, | ||
6562 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes), | ||
6563 | .channel_mode = alc883_3ST_2ch_modes, | ||
6564 | .need_dac_fix = 1, | ||
6565 | .input_mux = &alc883_lenovo_nb0763_capture_source, | ||
6566 | .unsol_event = alc883_medion_md2_unsol_event, | ||
6567 | .init_hook = alc883_medion_md2_automute, | ||
6568 | }, | ||
6569 | [ALC888_LENOVO_MS7195_DIG] = { | ||
6570 | .mixers = { alc883_3ST_6ch_mixer, alc883_chmode_mixer }, | ||
6571 | .init_verbs = { alc883_init_verbs, alc888_lenovo_ms7195_verbs}, | ||
6572 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
6573 | .dac_nids = alc883_dac_nids, | ||
6574 | .dig_out_nid = ALC883_DIGOUT_NID, | ||
6575 | .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), | ||
6576 | .adc_nids = alc883_adc_nids, | ||
6577 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes), | ||
6578 | .channel_mode = alc883_3ST_6ch_modes, | ||
6579 | .need_dac_fix = 1, | ||
6580 | .input_mux = &alc883_capture_source, | ||
6581 | .unsol_event = alc883_lenovo_ms7195_unsol_event, | ||
6582 | .init_hook = alc888_lenovo_ms7195_front_automute, | ||
6583 | }, | ||
6239 | }; | 6584 | }; |
6240 | 6585 | ||
6241 | 6586 | ||
@@ -6499,6 +6844,18 @@ static struct snd_kcontrol_new alc262_HP_BPC_WildWest_option_mixer[] = { | |||
6499 | { } /* end */ | 6844 | { } /* end */ |
6500 | }; | 6845 | }; |
6501 | 6846 | ||
6847 | static struct snd_kcontrol_new alc262_sony_mixer[] = { | ||
6848 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
6849 | HDA_CODEC_MUTE("Front Playback Switch", 0x15, 0x0, HDA_OUTPUT), | ||
6850 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
6851 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
6852 | HDA_CODEC_VOLUME("ATAPI Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | ||
6853 | HDA_CODEC_MUTE("ATAPI Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | ||
6854 | { } /* end */ | ||
6855 | }; | ||
6856 | |||
6857 | |||
6858 | |||
6502 | #define alc262_capture_mixer alc882_capture_mixer | 6859 | #define alc262_capture_mixer alc882_capture_mixer |
6503 | #define alc262_capture_alt_mixer alc882_capture_alt_mixer | 6860 | #define alc262_capture_alt_mixer alc882_capture_alt_mixer |
6504 | 6861 | ||
@@ -6597,6 +6954,15 @@ static struct hda_verb alc262_hippo1_unsol_verbs[] = { | |||
6597 | {} | 6954 | {} |
6598 | }; | 6955 | }; |
6599 | 6956 | ||
6957 | static struct hda_verb alc262_sony_unsol_verbs[] = { | ||
6958 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0}, | ||
6959 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
6960 | {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, // Front Mic | ||
6961 | |||
6962 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT}, | ||
6963 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
6964 | }; | ||
6965 | |||
6600 | /* mute/unmute internal speaker according to the hp jack and mute state */ | 6966 | /* mute/unmute internal speaker according to the hp jack and mute state */ |
6601 | static void alc262_hippo_automute(struct hda_codec *codec, int force) | 6967 | static void alc262_hippo_automute(struct hda_codec *codec, int force) |
6602 | { | 6968 | { |
@@ -7215,6 +7581,7 @@ static const char *alc262_models[ALC262_MODEL_LAST] = { | |||
7215 | [ALC262_HP_BPC] = "hp-bpc", | 7581 | [ALC262_HP_BPC] = "hp-bpc", |
7216 | [ALC262_HP_BPC_D7000_WL]= "hp-bpc-d7000", | 7582 | [ALC262_HP_BPC_D7000_WL]= "hp-bpc-d7000", |
7217 | [ALC262_BENQ_ED8] = "benq", | 7583 | [ALC262_BENQ_ED8] = "benq", |
7584 | [ALC262_BENQ_ED8] = "sony-assamd", | ||
7218 | [ALC262_AUTO] = "auto", | 7585 | [ALC262_AUTO] = "auto", |
7219 | }; | 7586 | }; |
7220 | 7587 | ||
@@ -7236,6 +7603,9 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = { | |||
7236 | SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU), | 7603 | SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU), |
7237 | SND_PCI_QUIRK(0x17ff, 0x058f, "Benq Hippo", ALC262_HIPPO_1), | 7604 | SND_PCI_QUIRK(0x17ff, 0x058f, "Benq Hippo", ALC262_HIPPO_1), |
7238 | SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_BENQ_ED8), | 7605 | SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_BENQ_ED8), |
7606 | SND_PCI_QUIRK(0x104d, 0x9015, "Sony 0x9015", ALC262_SONY_ASSAMD), | ||
7607 | SND_PCI_QUIRK(0x104d, 0x900e, "Sony ASSAMD", ALC262_SONY_ASSAMD), | ||
7608 | SND_PCI_QUIRK(0x104d, 0x1f00, "Sony ASSAMD", ALC262_SONY_ASSAMD), | ||
7239 | {} | 7609 | {} |
7240 | }; | 7610 | }; |
7241 | 7611 | ||
@@ -7327,6 +7697,17 @@ static struct alc_config_preset alc262_presets[] = { | |||
7327 | .channel_mode = alc262_modes, | 7697 | .channel_mode = alc262_modes, |
7328 | .input_mux = &alc262_capture_source, | 7698 | .input_mux = &alc262_capture_source, |
7329 | }, | 7699 | }, |
7700 | [ALC262_SONY_ASSAMD] = { | ||
7701 | .mixers = { alc262_sony_mixer }, | ||
7702 | .init_verbs = { alc262_init_verbs, alc262_sony_unsol_verbs}, | ||
7703 | .num_dacs = ARRAY_SIZE(alc262_dac_nids), | ||
7704 | .dac_nids = alc262_dac_nids, | ||
7705 | .hp_nid = 0x02, | ||
7706 | .num_channel_mode = ARRAY_SIZE(alc262_modes), | ||
7707 | .channel_mode = alc262_modes, | ||
7708 | .input_mux = &alc262_capture_source, | ||
7709 | .unsol_event = alc262_hippo_unsol_event, | ||
7710 | }, | ||
7330 | }; | 7711 | }; |
7331 | 7712 | ||
7332 | static int patch_alc262(struct hda_codec *codec) | 7713 | static int patch_alc262(struct hda_codec *codec) |
@@ -8599,6 +8980,15 @@ static struct hda_input_mux alc861vd_capture_source = { | |||
8599 | }, | 8980 | }, |
8600 | }; | 8981 | }; |
8601 | 8982 | ||
8983 | static struct hda_input_mux alc861vd_dallas_capture_source = { | ||
8984 | .num_items = 3, | ||
8985 | .items = { | ||
8986 | { "Front Mic", 0x0 }, | ||
8987 | { "ATAPI Mic", 0x1 }, | ||
8988 | { "Line In", 0x5 }, | ||
8989 | }, | ||
8990 | }; | ||
8991 | |||
8602 | #define alc861vd_mux_enum_info alc_mux_enum_info | 8992 | #define alc861vd_mux_enum_info alc_mux_enum_info |
8603 | #define alc861vd_mux_enum_get alc_mux_enum_get | 8993 | #define alc861vd_mux_enum_get alc_mux_enum_get |
8604 | 8994 | ||
@@ -8782,6 +9172,34 @@ static struct snd_kcontrol_new alc861vd_lenovo_mixer[] = { | |||
8782 | { } /* end */ | 9172 | { } /* end */ |
8783 | }; | 9173 | }; |
8784 | 9174 | ||
9175 | /* Pin assignment: Front=0x14, HP = 0x15, | ||
9176 | * Front Mic=0x18, ATAPI Mic = 0x19, Line In = 0x1d | ||
9177 | */ | ||
9178 | static struct snd_kcontrol_new alc861vd_dallas_mixer[] = { | ||
9179 | HDA_CODEC_VOLUME("Front Playback Volume", 0x02, 0x0, HDA_OUTPUT), | ||
9180 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
9181 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x03, 0x0, HDA_OUTPUT), | ||
9182 | HDA_BIND_MUTE("Headphone Playback Switch", 0x0d, 2, HDA_INPUT), | ||
9183 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
9184 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
9185 | HDA_CODEC_VOLUME("ATAPI Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | ||
9186 | HDA_CODEC_MUTE("ATAPI Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | ||
9187 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x05, HDA_INPUT), | ||
9188 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x05, HDA_INPUT), | ||
9189 | HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT), | ||
9190 | HDA_CODEC_MUTE("Capture Switch", 0x09, 0x0, HDA_INPUT), | ||
9191 | { | ||
9192 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
9193 | /* .name = "Capture Source", */ | ||
9194 | .name = "Input Source", | ||
9195 | .count = 1, | ||
9196 | .info = alc882_mux_enum_info, | ||
9197 | .get = alc882_mux_enum_get, | ||
9198 | .put = alc882_mux_enum_put, | ||
9199 | }, | ||
9200 | { } /* end */ | ||
9201 | }; | ||
9202 | |||
8785 | /* | 9203 | /* |
8786 | * generic initialization of ADC, input mixers and output mixers | 9204 | * generic initialization of ADC, input mixers and output mixers |
8787 | */ | 9205 | */ |
@@ -8969,6 +9387,70 @@ static void alc861vd_lenovo_unsol_event(struct hda_codec *codec, | |||
8969 | } | 9387 | } |
8970 | } | 9388 | } |
8971 | 9389 | ||
9390 | static struct hda_verb alc861vd_dallas_verbs[] = { | ||
9391 | {0x02, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, | ||
9392 | {0x03, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, | ||
9393 | {0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, | ||
9394 | {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, | ||
9395 | |||
9396 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
9397 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
9398 | {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
9399 | {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, | ||
9400 | {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
9401 | {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, | ||
9402 | {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
9403 | {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, | ||
9404 | |||
9405 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
9406 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
9407 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
9408 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
9409 | {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
9410 | {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
9411 | {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | ||
9412 | {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
9413 | |||
9414 | {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF50}, | ||
9415 | {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, | ||
9416 | {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF50}, | ||
9417 | {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, | ||
9418 | {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
9419 | {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
9420 | {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
9421 | {0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | ||
9422 | |||
9423 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
9424 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, | ||
9425 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, | ||
9426 | {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, | ||
9427 | |||
9428 | {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
9429 | {0x09, AC_VERB_SET_CONNECT_SEL, 0x00}, | ||
9430 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT}, | ||
9431 | |||
9432 | { } /* end */ | ||
9433 | }; | ||
9434 | |||
9435 | /* toggle speaker-output according to the hp-jack state */ | ||
9436 | static void alc861vd_dallas_automute(struct hda_codec *codec) | ||
9437 | { | ||
9438 | unsigned int present; | ||
9439 | |||
9440 | present = snd_hda_codec_read(codec, 0x15, 0, | ||
9441 | AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; | ||
9442 | snd_hda_codec_amp_update(codec, 0x14, 0, HDA_OUTPUT, 0, | ||
9443 | 0x80, present ? 0x80 : 0); | ||
9444 | snd_hda_codec_amp_update(codec, 0x14, 1, HDA_OUTPUT, 0, | ||
9445 | 0x80, present ? 0x80 : 0); | ||
9446 | } | ||
9447 | |||
9448 | static void alc861vd_dallas_unsol_event(struct hda_codec *codec, unsigned int res) | ||
9449 | { | ||
9450 | if ((res >> 26) == ALC880_HP_EVENT) | ||
9451 | alc861vd_dallas_automute(codec); | ||
9452 | } | ||
9453 | |||
8972 | /* pcm configuration: identiacal with ALC880 */ | 9454 | /* pcm configuration: identiacal with ALC880 */ |
8973 | #define alc861vd_pcm_analog_playback alc880_pcm_analog_playback | 9455 | #define alc861vd_pcm_analog_playback alc880_pcm_analog_playback |
8974 | #define alc861vd_pcm_analog_capture alc880_pcm_analog_capture | 9456 | #define alc861vd_pcm_analog_capture alc880_pcm_analog_capture |
@@ -8984,6 +9466,7 @@ static const char *alc861vd_models[ALC861VD_MODEL_LAST] = { | |||
8984 | [ALC861VD_3ST_DIG] = "3stack-digout", | 9466 | [ALC861VD_3ST_DIG] = "3stack-digout", |
8985 | [ALC861VD_6ST_DIG] = "6stack-digout", | 9467 | [ALC861VD_6ST_DIG] = "6stack-digout", |
8986 | [ALC861VD_LENOVO] = "lenovo", | 9468 | [ALC861VD_LENOVO] = "lenovo", |
9469 | [ALC861VD_DALLAS] = "dallas", | ||
8987 | [ALC861VD_AUTO] = "auto", | 9470 | [ALC861VD_AUTO] = "auto", |
8988 | }; | 9471 | }; |
8989 | 9472 | ||
@@ -8993,6 +9476,8 @@ static struct snd_pci_quirk alc861vd_cfg_tbl[] = { | |||
8993 | SND_PCI_QUIRK(0x10de, 0x03f0, "Realtek ALC660 demo", ALC660VD_3ST), | 9476 | SND_PCI_QUIRK(0x10de, 0x03f0, "Realtek ALC660 demo", ALC660VD_3ST), |
8994 | SND_PCI_QUIRK(0x1019, 0xa88d, "Realtek ALC660 demo", ALC660VD_3ST), | 9477 | SND_PCI_QUIRK(0x1019, 0xa88d, "Realtek ALC660 demo", ALC660VD_3ST), |
8995 | 9478 | ||
9479 | SND_PCI_QUIRK(0x1179, 0xff00, "DALLAS", ALC861VD_DALLAS), | ||
9480 | SND_PCI_QUIRK(0x1179, 0xff01, "DALLAS", ALC861VD_DALLAS), | ||
8996 | SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo 3000 C200", ALC861VD_LENOVO), | 9481 | SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo 3000 C200", ALC861VD_LENOVO), |
8997 | SND_PCI_QUIRK(0x17aa, 0x2066, "Lenovo", ALC861VD_LENOVO), | 9482 | SND_PCI_QUIRK(0x17aa, 0x2066, "Lenovo", ALC861VD_LENOVO), |
8998 | {} | 9483 | {} |
@@ -9059,6 +9544,19 @@ static struct alc_config_preset alc861vd_presets[] = { | |||
9059 | .unsol_event = alc861vd_lenovo_unsol_event, | 9544 | .unsol_event = alc861vd_lenovo_unsol_event, |
9060 | .init_hook = alc861vd_lenovo_automute, | 9545 | .init_hook = alc861vd_lenovo_automute, |
9061 | }, | 9546 | }, |
9547 | [ALC861VD_DALLAS] = { | ||
9548 | .mixers = { alc861vd_dallas_mixer }, | ||
9549 | .init_verbs = { alc861vd_dallas_verbs }, | ||
9550 | .num_dacs = ARRAY_SIZE(alc861vd_dac_nids), | ||
9551 | .dac_nids = alc861vd_dac_nids, | ||
9552 | .num_adc_nids = ARRAY_SIZE(alc861vd_adc_nids), | ||
9553 | .adc_nids = alc861vd_adc_nids, | ||
9554 | .num_channel_mode = ARRAY_SIZE(alc861vd_3stack_2ch_modes), | ||
9555 | .channel_mode = alc861vd_3stack_2ch_modes, | ||
9556 | .input_mux = &alc861vd_dallas_capture_source, | ||
9557 | .unsol_event = alc861vd_dallas_unsol_event, | ||
9558 | .init_hook = alc861vd_dallas_automute, | ||
9559 | }, | ||
9062 | }; | 9560 | }; |
9063 | 9561 | ||
9064 | /* | 9562 | /* |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 93ae9c250767..a6a0a80edc3b 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -467,6 +467,8 @@ static struct snd_pci_quirk stac9200_cfg_tbl[] = { | |||
467 | "Dell XPS M1710", STAC_REF), | 467 | "Dell XPS M1710", STAC_REF), |
468 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01cf, | 468 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01cf, |
469 | "Dell Precision M90", STAC_REF), | 469 | "Dell Precision M90", STAC_REF), |
470 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01d6, | ||
471 | "unknown Dell", STAC_REF), | ||
470 | {} /* terminator */ | 472 | {} /* terminator */ |
471 | }; | 473 | }; |
472 | 474 | ||
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 202f720b34b9..da9734073dba 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
@@ -1799,6 +1799,18 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = { | |||
1799 | }, | 1799 | }, |
1800 | { | 1800 | { |
1801 | .subvendor = 0x1028, | 1801 | .subvendor = 0x1028, |
1802 | .subdevice = 0x0186, | ||
1803 | .name = "Dell Latitude D810", /* cf. Malone #41015 */ | ||
1804 | .type = AC97_TUNE_HP_MUTE_LED | ||
1805 | }, | ||
1806 | { | ||
1807 | .subvendor = 0x1028, | ||
1808 | .subdevice = 0x0188, | ||
1809 | .name = "Dell Inspiron 6000", | ||
1810 | .type = AC97_TUNE_HP_MUTE_LED /* cf. Malone #41015 */ | ||
1811 | }, | ||
1812 | { | ||
1813 | .subvendor = 0x1028, | ||
1802 | .subdevice = 0x0191, | 1814 | .subdevice = 0x0191, |
1803 | .name = "Dell Inspiron 8600", | 1815 | .name = "Dell Inspiron 8600", |
1804 | .type = AC97_TUNE_HP_ONLY | 1816 | .type = AC97_TUNE_HP_ONLY |
@@ -1819,7 +1831,7 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = { | |||
1819 | .subvendor = 0x103c, | 1831 | .subvendor = 0x103c, |
1820 | .subdevice = 0x088c, | 1832 | .subdevice = 0x088c, |
1821 | .name = "HP nc8000", | 1833 | .name = "HP nc8000", |
1822 | .type = AC97_TUNE_MUTE_LED | 1834 | .type = AC97_TUNE_HP_MUTE_LED |
1823 | }, | 1835 | }, |
1824 | { | 1836 | { |
1825 | .subvendor = 0x103c, | 1837 | .subvendor = 0x103c, |
@@ -1913,6 +1925,12 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = { | |||
1913 | }, | 1925 | }, |
1914 | { | 1926 | { |
1915 | .subvendor = 0x10cf, | 1927 | .subvendor = 0x10cf, |
1928 | .subdevice = 0x127e, | ||
1929 | .name = "Fujitsu Lifebook C1211D", | ||
1930 | .type = AC97_TUNE_HP_ONLY | ||
1931 | }, | ||
1932 | { | ||
1933 | .subvendor = 0x10cf, | ||
1916 | .subdevice = 0x12ec, | 1934 | .subdevice = 0x12ec, |
1917 | .name = "Fujitsu-Siemens 4010", | 1935 | .name = "Fujitsu-Siemens 4010", |
1918 | .type = AC97_TUNE_HP_ONLY | 1936 | .type = AC97_TUNE_HP_ONLY |
diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c index 0cdef971cbd3..0b8a6f8b3668 100644 --- a/sound/soc/codecs/ac97.c +++ b/sound/soc/codecs/ac97.c | |||
@@ -43,8 +43,9 @@ static int ac97_prepare(struct snd_pcm_substream *substream) | |||
43 | #define STD_AC97_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ | 43 | #define STD_AC97_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ |
44 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000) | 44 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000) |
45 | 45 | ||
46 | static struct snd_soc_codec_dai ac97_dai = { | 46 | struct snd_soc_codec_dai ac97_dai = { |
47 | .name = "AC97 HiFi", | 47 | .name = "AC97 HiFi", |
48 | .type = SND_SOC_DAI_AC97, | ||
48 | .playback = { | 49 | .playback = { |
49 | .stream_name = "AC97 Playback", | 50 | .stream_name = "AC97 Playback", |
50 | .channels_min = 1, | 51 | .channels_min = 1, |
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index 264413a00cac..986b5d59cefa 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c | |||
@@ -544,6 +544,7 @@ static int ac97_aux_prepare(struct snd_pcm_substream *substream) | |||
544 | struct snd_soc_codec_dai wm9712_dai[] = { | 544 | struct snd_soc_codec_dai wm9712_dai[] = { |
545 | { | 545 | { |
546 | .name = "AC97 HiFi", | 546 | .name = "AC97 HiFi", |
547 | .type = SND_SOC_DAI_AC97_BUS, | ||
547 | .playback = { | 548 | .playback = { |
548 | .stream_name = "HiFi Playback", | 549 | .stream_name = "HiFi Playback", |
549 | .channels_min = 1, | 550 | .channels_min = 1, |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 36519aef55d9..92d5d917b73b 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -116,6 +116,7 @@ static int soc_ac97_dev_register(struct snd_soc_codec *codec) | |||
116 | static inline const char* get_dai_name(int type) | 116 | static inline const char* get_dai_name(int type) |
117 | { | 117 | { |
118 | switch(type) { | 118 | switch(type) { |
119 | case SND_SOC_DAI_AC97_BUS: | ||
119 | case SND_SOC_DAI_AC97: | 120 | case SND_SOC_DAI_AC97: |
120 | return "AC97"; | 121 | return "AC97"; |
121 | case SND_SOC_DAI_I2S: | 122 | case SND_SOC_DAI_I2S: |
@@ -1099,7 +1100,8 @@ int snd_soc_register_card(struct snd_soc_device *socdev) | |||
1099 | continue; | 1100 | continue; |
1100 | } | 1101 | } |
1101 | } | 1102 | } |
1102 | if (socdev->machine->dai_link[i].cpu_dai->type == SND_SOC_DAI_AC97) | 1103 | if (socdev->machine->dai_link[i].codec_dai->type == |
1104 | SND_SOC_DAI_AC97_BUS) | ||
1103 | ac97 = 1; | 1105 | ac97 = 1; |
1104 | } | 1106 | } |
1105 | snprintf(codec->card->shortname, sizeof(codec->card->shortname), | 1107 | snprintf(codec->card->shortname, sizeof(codec->card->shortname), |
@@ -1148,11 +1150,21 @@ EXPORT_SYMBOL_GPL(snd_soc_register_card); | |||
1148 | void snd_soc_free_pcms(struct snd_soc_device *socdev) | 1150 | void snd_soc_free_pcms(struct snd_soc_device *socdev) |
1149 | { | 1151 | { |
1150 | struct snd_soc_codec *codec = socdev->codec; | 1152 | struct snd_soc_codec *codec = socdev->codec; |
1153 | #ifdef CONFIG_SND_SOC_AC97_BUS | ||
1154 | struct snd_soc_codec_dai *codec_dai; | ||
1155 | int i; | ||
1156 | #endif | ||
1151 | 1157 | ||
1152 | mutex_lock(&codec->mutex); | 1158 | mutex_lock(&codec->mutex); |
1153 | #ifdef CONFIG_SND_SOC_AC97_BUS | 1159 | #ifdef CONFIG_SND_SOC_AC97_BUS |
1154 | if (codec->ac97) | 1160 | for(i = 0; i < codec->num_dai; i++) { |
1155 | soc_ac97_dev_unregister(codec); | 1161 | codec_dai = &codec->dai[i]; |
1162 | if (codec_dai->type == SND_SOC_DAI_AC97_BUS && codec->ac97) { | ||
1163 | soc_ac97_dev_unregister(codec); | ||
1164 | goto free_card; | ||
1165 | } | ||
1166 | } | ||
1167 | free_card: | ||
1156 | #endif | 1168 | #endif |
1157 | 1169 | ||
1158 | if (codec->card) | 1170 | if (codec->card) |
diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c index 7b3bf3545a3b..325d4b6b54aa 100644 --- a/sound/usb/usbmixer.c +++ b/sound/usb/usbmixer.c | |||
@@ -360,7 +360,7 @@ static int get_ctl_value(struct usb_mixer_elem_info *cval, int request, int vali | |||
360 | request, | 360 | request, |
361 | USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN, | 361 | USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN, |
362 | validx, cval->mixer->ctrlif | (cval->id << 8), | 362 | validx, cval->mixer->ctrlif | (cval->id << 8), |
363 | buf, val_len, 100) >= 0) { | 363 | buf, val_len, 100) >= val_len) { |
364 | *value_ret = convert_signed_value(cval, snd_usb_combine_bytes(buf, val_len)); | 364 | *value_ret = convert_signed_value(cval, snd_usb_combine_bytes(buf, val_len)); |
365 | return 0; | 365 | return 0; |
366 | } | 366 | } |
diff --git a/sound/usb/usbquirks.h b/sound/usb/usbquirks.h index 8fcbe93b2589..374fbf657a2d 100644 --- a/sound/usb/usbquirks.h +++ b/sound/usb/usbquirks.h | |||
@@ -48,6 +48,15 @@ | |||
48 | USB_DEVICE_ID_MATCH_INT_CLASS | | 48 | USB_DEVICE_ID_MATCH_INT_CLASS | |
49 | USB_DEVICE_ID_MATCH_INT_SUBCLASS, | 49 | USB_DEVICE_ID_MATCH_INT_SUBCLASS, |
50 | .idVendor = 0x046d, | 50 | .idVendor = 0x046d, |
51 | .idProduct = 0x0850, | ||
52 | .bInterfaceClass = USB_CLASS_AUDIO, | ||
53 | .bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL | ||
54 | }, | ||
55 | { | ||
56 | .match_flags = USB_DEVICE_ID_MATCH_DEVICE | | ||
57 | USB_DEVICE_ID_MATCH_INT_CLASS | | ||
58 | USB_DEVICE_ID_MATCH_INT_SUBCLASS, | ||
59 | .idVendor = 0x046d, | ||
51 | .idProduct = 0x08f0, | 60 | .idProduct = 0x08f0, |
52 | .bInterfaceClass = USB_CLASS_AUDIO, | 61 | .bInterfaceClass = USB_CLASS_AUDIO, |
53 | .bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL | 62 | .bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL |