diff options
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 31 | ||||
-rw-r--r-- | sound/pci/hda/patch_analog.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_nvhdmi.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 218 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 24 |
6 files changed, 233 insertions, 43 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 6447754ae56e..ba1ab737b55f 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -64,6 +64,7 @@ static struct hda_vendor_id hda_vendor_ids[] = { | |||
64 | { 0x14f1, "Conexant" }, | 64 | { 0x14f1, "Conexant" }, |
65 | { 0x17e8, "Chrontel" }, | 65 | { 0x17e8, "Chrontel" }, |
66 | { 0x1854, "LG" }, | 66 | { 0x1854, "LG" }, |
67 | { 0x1aec, "Wolfson Microelectronics" }, | ||
67 | { 0x434d, "C-Media" }, | 68 | { 0x434d, "C-Media" }, |
68 | { 0x8384, "SigmaTel" }, | 69 | { 0x8384, "SigmaTel" }, |
69 | {} /* terminator */ | 70 | {} /* terminator */ |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 9f316c1b2790..35722ec920cb 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/slab.h> | 45 | #include <linux/slab.h> |
46 | #include <linux/pci.h> | 46 | #include <linux/pci.h> |
47 | #include <linux/mutex.h> | 47 | #include <linux/mutex.h> |
48 | #include <linux/reboot.h> | ||
48 | #include <sound/core.h> | 49 | #include <sound/core.h> |
49 | #include <sound/initval.h> | 50 | #include <sound/initval.h> |
50 | #include "hda_codec.h" | 51 | #include "hda_codec.h" |
@@ -397,6 +398,9 @@ struct azx { | |||
397 | 398 | ||
398 | /* for pending irqs */ | 399 | /* for pending irqs */ |
399 | struct work_struct irq_pending_work; | 400 | struct work_struct irq_pending_work; |
401 | |||
402 | /* reboot notifier (for mysterious hangup problem at power-down) */ | ||
403 | struct notifier_block reboot_notifier; | ||
400 | }; | 404 | }; |
401 | 405 | ||
402 | /* driver types */ | 406 | /* driver types */ |
@@ -1979,12 +1983,36 @@ static int azx_resume(struct pci_dev *pci) | |||
1979 | 1983 | ||
1980 | 1984 | ||
1981 | /* | 1985 | /* |
1986 | * reboot notifier for hang-up problem at power-down | ||
1987 | */ | ||
1988 | static int azx_halt(struct notifier_block *nb, unsigned long event, void *buf) | ||
1989 | { | ||
1990 | struct azx *chip = container_of(nb, struct azx, reboot_notifier); | ||
1991 | azx_stop_chip(chip); | ||
1992 | return NOTIFY_OK; | ||
1993 | } | ||
1994 | |||
1995 | static void azx_notifier_register(struct azx *chip) | ||
1996 | { | ||
1997 | chip->reboot_notifier.notifier_call = azx_halt; | ||
1998 | register_reboot_notifier(&chip->reboot_notifier); | ||
1999 | } | ||
2000 | |||
2001 | static void azx_notifier_unregister(struct azx *chip) | ||
2002 | { | ||
2003 | if (chip->reboot_notifier.notifier_call) | ||
2004 | unregister_reboot_notifier(&chip->reboot_notifier); | ||
2005 | } | ||
2006 | |||
2007 | /* | ||
1982 | * destructor | 2008 | * destructor |
1983 | */ | 2009 | */ |
1984 | static int azx_free(struct azx *chip) | 2010 | static int azx_free(struct azx *chip) |
1985 | { | 2011 | { |
1986 | int i; | 2012 | int i; |
1987 | 2013 | ||
2014 | azx_notifier_unregister(chip); | ||
2015 | |||
1988 | if (chip->initialized) { | 2016 | if (chip->initialized) { |
1989 | azx_clear_irq_pending(chip); | 2017 | azx_clear_irq_pending(chip); |
1990 | for (i = 0; i < chip->num_streams; i++) | 2018 | for (i = 0; i < chip->num_streams; i++) |
@@ -2158,7 +2186,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | |||
2158 | } | 2186 | } |
2159 | 2187 | ||
2160 | chip->addr = pci_resource_start(pci, 0); | 2188 | chip->addr = pci_resource_start(pci, 0); |
2161 | chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci,0)); | 2189 | chip->remap_addr = pci_ioremap_bar(pci, 0); |
2162 | if (chip->remap_addr == NULL) { | 2190 | if (chip->remap_addr == NULL) { |
2163 | snd_printk(KERN_ERR SFX "ioremap error\n"); | 2191 | snd_printk(KERN_ERR SFX "ioremap error\n"); |
2164 | err = -ENXIO; | 2192 | err = -ENXIO; |
@@ -2348,6 +2376,7 @@ static int __devinit azx_probe(struct pci_dev *pci, | |||
2348 | pci_set_drvdata(pci, card); | 2376 | pci_set_drvdata(pci, card); |
2349 | chip->running = 1; | 2377 | chip->running = 1; |
2350 | power_down_all_codecs(chip); | 2378 | power_down_all_codecs(chip); |
2379 | azx_notifier_register(chip); | ||
2351 | 2380 | ||
2352 | dev++; | 2381 | dev++; |
2353 | return err; | 2382 | return err; |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 2b00c4afdf97..d3fd432cb3ea 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -3860,6 +3860,7 @@ static const char *ad1884a_models[AD1884A_MODELS] = { | |||
3860 | 3860 | ||
3861 | static struct snd_pci_quirk ad1884a_cfg_tbl[] = { | 3861 | static struct snd_pci_quirk ad1884a_cfg_tbl[] = { |
3862 | SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), | 3862 | SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), |
3863 | SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE), | ||
3863 | SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X300", AD1884A_THINKPAD), | 3864 | SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X300", AD1884A_THINKPAD), |
3864 | {} | 3865 | {} |
3865 | }; | 3866 | }; |
diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c index 1a65775d28e1..2eed2c8b98da 100644 --- a/sound/pci/hda/patch_nvhdmi.c +++ b/sound/pci/hda/patch_nvhdmi.c | |||
@@ -116,6 +116,7 @@ static int nvhdmi_build_pcms(struct hda_codec *codec) | |||
116 | codec->pcm_info = info; | 116 | codec->pcm_info = info; |
117 | 117 | ||
118 | info->name = "NVIDIA HDMI"; | 118 | info->name = "NVIDIA HDMI"; |
119 | info->pcm_type = HDA_PCM_TYPE_HDMI; | ||
119 | info->stream[SNDRV_PCM_STREAM_PLAYBACK] = nvhdmi_pcm_digital_playback; | 120 | info->stream[SNDRV_PCM_STREAM_PLAYBACK] = nvhdmi_pcm_digital_playback; |
120 | 121 | ||
121 | return 0; | 122 | return 0; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 0b6e682c46d0..a4666c96a44f 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -307,6 +307,13 @@ struct alc_spec { | |||
307 | /* for PLL fix */ | 307 | /* for PLL fix */ |
308 | hda_nid_t pll_nid; | 308 | hda_nid_t pll_nid; |
309 | unsigned int pll_coef_idx, pll_coef_bit; | 309 | unsigned int pll_coef_idx, pll_coef_bit; |
310 | |||
311 | #ifdef SND_HDA_NEEDS_RESUME | ||
312 | #define ALC_MAX_PINS 16 | ||
313 | unsigned int num_pins; | ||
314 | hda_nid_t pin_nids[ALC_MAX_PINS]; | ||
315 | unsigned int pin_cfgs[ALC_MAX_PINS]; | ||
316 | #endif | ||
310 | }; | 317 | }; |
311 | 318 | ||
312 | /* | 319 | /* |
@@ -822,6 +829,31 @@ static void alc_sku_automute(struct hda_codec *codec) | |||
822 | spec->jack_present ? 0 : PIN_OUT); | 829 | spec->jack_present ? 0 : PIN_OUT); |
823 | } | 830 | } |
824 | 831 | ||
832 | #if 0 /* it's broken in some acses -- temporarily disabled */ | ||
833 | static void alc_mic_automute(struct hda_codec *codec) | ||
834 | { | ||
835 | struct alc_spec *spec = codec->spec; | ||
836 | unsigned int present; | ||
837 | unsigned int mic_nid = spec->autocfg.input_pins[AUTO_PIN_MIC]; | ||
838 | unsigned int fmic_nid = spec->autocfg.input_pins[AUTO_PIN_FRONT_MIC]; | ||
839 | unsigned int mix_nid = spec->capsrc_nids[0]; | ||
840 | unsigned int capsrc_idx_mic, capsrc_idx_fmic; | ||
841 | |||
842 | capsrc_idx_mic = mic_nid - 0x18; | ||
843 | capsrc_idx_fmic = fmic_nid - 0x18; | ||
844 | present = snd_hda_codec_read(codec, mic_nid, 0, | ||
845 | AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; | ||
846 | snd_hda_codec_write(codec, mix_nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, | ||
847 | 0x7000 | (capsrc_idx_mic << 8) | (present ? 0 : 0x80)); | ||
848 | snd_hda_codec_write(codec, mix_nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, | ||
849 | 0x7000 | (capsrc_idx_fmic << 8) | (present ? 0x80 : 0)); | ||
850 | snd_hda_codec_amp_stereo(codec, 0x0b, HDA_INPUT, capsrc_idx_fmic, | ||
851 | HDA_AMP_MUTE, present ? HDA_AMP_MUTE : 0); | ||
852 | } | ||
853 | #else | ||
854 | #define alc_mic_automute(codec) /* NOP */ | ||
855 | #endif /* disabled */ | ||
856 | |||
825 | /* unsolicited event for HP jack sensing */ | 857 | /* unsolicited event for HP jack sensing */ |
826 | static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res) | 858 | static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res) |
827 | { | 859 | { |
@@ -829,10 +861,17 @@ static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res) | |||
829 | res >>= 28; | 861 | res >>= 28; |
830 | else | 862 | else |
831 | res >>= 26; | 863 | res >>= 26; |
832 | if (res != ALC880_HP_EVENT) | 864 | if (res == ALC880_HP_EVENT) |
833 | return; | 865 | alc_sku_automute(codec); |
866 | |||
867 | if (res == ALC880_MIC_EVENT) | ||
868 | alc_mic_automute(codec); | ||
869 | } | ||
834 | 870 | ||
871 | static void alc_inithook(struct hda_codec *codec) | ||
872 | { | ||
835 | alc_sku_automute(codec); | 873 | alc_sku_automute(codec); |
874 | alc_mic_automute(codec); | ||
836 | } | 875 | } |
837 | 876 | ||
838 | /* additional initialization for ALC888 variants */ | 877 | /* additional initialization for ALC888 variants */ |
@@ -1018,10 +1057,19 @@ do_sku: | |||
1018 | else | 1057 | else |
1019 | return; | 1058 | return; |
1020 | } | 1059 | } |
1021 | 1060 | if (spec->autocfg.hp_pins[0]) | |
1022 | snd_hda_codec_write(codec, spec->autocfg.hp_pins[0], 0, | 1061 | snd_hda_codec_write(codec, spec->autocfg.hp_pins[0], 0, |
1023 | AC_VERB_SET_UNSOLICITED_ENABLE, | 1062 | AC_VERB_SET_UNSOLICITED_ENABLE, |
1024 | AC_USRSP_EN | ALC880_HP_EVENT); | 1063 | AC_USRSP_EN | ALC880_HP_EVENT); |
1064 | |||
1065 | #if 0 /* it's broken in some acses -- temporarily disabled */ | ||
1066 | if (spec->autocfg.input_pins[AUTO_PIN_MIC] && | ||
1067 | spec->autocfg.input_pins[AUTO_PIN_FRONT_MIC]) | ||
1068 | snd_hda_codec_write(codec, | ||
1069 | spec->autocfg.input_pins[AUTO_PIN_MIC], 0, | ||
1070 | AC_VERB_SET_UNSOLICITED_ENABLE, | ||
1071 | AC_USRSP_EN | ALC880_MIC_EVENT); | ||
1072 | #endif /* disabled */ | ||
1025 | 1073 | ||
1026 | spec->unsol_event = alc_sku_unsol_event; | 1074 | spec->unsol_event = alc_sku_unsol_event; |
1027 | } | 1075 | } |
@@ -2743,6 +2791,64 @@ static void alc_free(struct hda_codec *codec) | |||
2743 | codec->spec = NULL; /* to be sure */ | 2791 | codec->spec = NULL; /* to be sure */ |
2744 | } | 2792 | } |
2745 | 2793 | ||
2794 | #ifdef SND_HDA_NEEDS_RESUME | ||
2795 | static void store_pin_configs(struct hda_codec *codec) | ||
2796 | { | ||
2797 | struct alc_spec *spec = codec->spec; | ||
2798 | hda_nid_t nid, end_nid; | ||
2799 | |||
2800 | end_nid = codec->start_nid + codec->num_nodes; | ||
2801 | for (nid = codec->start_nid; nid < end_nid; nid++) { | ||
2802 | unsigned int wid_caps = get_wcaps(codec, nid); | ||
2803 | unsigned int wid_type = | ||
2804 | (wid_caps & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT; | ||
2805 | if (wid_type != AC_WID_PIN) | ||
2806 | continue; | ||
2807 | if (spec->num_pins >= ARRAY_SIZE(spec->pin_nids)) | ||
2808 | break; | ||
2809 | spec->pin_nids[spec->num_pins] = nid; | ||
2810 | spec->pin_cfgs[spec->num_pins] = | ||
2811 | snd_hda_codec_read(codec, nid, 0, | ||
2812 | AC_VERB_GET_CONFIG_DEFAULT, 0); | ||
2813 | spec->num_pins++; | ||
2814 | } | ||
2815 | } | ||
2816 | |||
2817 | static void resume_pin_configs(struct hda_codec *codec) | ||
2818 | { | ||
2819 | struct alc_spec *spec = codec->spec; | ||
2820 | int i; | ||
2821 | |||
2822 | for (i = 0; i < spec->num_pins; i++) { | ||
2823 | hda_nid_t pin_nid = spec->pin_nids[i]; | ||
2824 | unsigned int pin_config = spec->pin_cfgs[i]; | ||
2825 | snd_hda_codec_write(codec, pin_nid, 0, | ||
2826 | AC_VERB_SET_CONFIG_DEFAULT_BYTES_0, | ||
2827 | pin_config & 0x000000ff); | ||
2828 | snd_hda_codec_write(codec, pin_nid, 0, | ||
2829 | AC_VERB_SET_CONFIG_DEFAULT_BYTES_1, | ||
2830 | (pin_config & 0x0000ff00) >> 8); | ||
2831 | snd_hda_codec_write(codec, pin_nid, 0, | ||
2832 | AC_VERB_SET_CONFIG_DEFAULT_BYTES_2, | ||
2833 | (pin_config & 0x00ff0000) >> 16); | ||
2834 | snd_hda_codec_write(codec, pin_nid, 0, | ||
2835 | AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, | ||
2836 | pin_config >> 24); | ||
2837 | } | ||
2838 | } | ||
2839 | |||
2840 | static int alc_resume(struct hda_codec *codec) | ||
2841 | { | ||
2842 | resume_pin_configs(codec); | ||
2843 | codec->patch_ops.init(codec); | ||
2844 | snd_hda_codec_resume_amp(codec); | ||
2845 | snd_hda_codec_resume_cache(codec); | ||
2846 | return 0; | ||
2847 | } | ||
2848 | #else | ||
2849 | #define store_pin_configs(codec) | ||
2850 | #endif | ||
2851 | |||
2746 | /* | 2852 | /* |
2747 | */ | 2853 | */ |
2748 | static struct hda_codec_ops alc_patch_ops = { | 2854 | static struct hda_codec_ops alc_patch_ops = { |
@@ -2751,6 +2857,9 @@ static struct hda_codec_ops alc_patch_ops = { | |||
2751 | .init = alc_init, | 2857 | .init = alc_init, |
2752 | .free = alc_free, | 2858 | .free = alc_free, |
2753 | .unsol_event = alc_unsol_event, | 2859 | .unsol_event = alc_unsol_event, |
2860 | #ifdef SND_HDA_NEEDS_RESUME | ||
2861 | .resume = alc_resume, | ||
2862 | #endif | ||
2754 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 2863 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
2755 | .check_power_status = alc_check_power_status, | 2864 | .check_power_status = alc_check_power_status, |
2756 | #endif | 2865 | #endif |
@@ -3797,6 +3906,7 @@ static int alc880_parse_auto_config(struct hda_codec *codec) | |||
3797 | spec->num_mux_defs = 1; | 3906 | spec->num_mux_defs = 1; |
3798 | spec->input_mux = &spec->private_imux; | 3907 | spec->input_mux = &spec->private_imux; |
3799 | 3908 | ||
3909 | store_pin_configs(codec); | ||
3800 | return 1; | 3910 | return 1; |
3801 | } | 3911 | } |
3802 | 3912 | ||
@@ -3808,7 +3918,7 @@ static void alc880_auto_init(struct hda_codec *codec) | |||
3808 | alc880_auto_init_extra_out(codec); | 3918 | alc880_auto_init_extra_out(codec); |
3809 | alc880_auto_init_analog_input(codec); | 3919 | alc880_auto_init_analog_input(codec); |
3810 | if (spec->unsol_event) | 3920 | if (spec->unsol_event) |
3811 | alc_sku_automute(codec); | 3921 | alc_inithook(codec); |
3812 | } | 3922 | } |
3813 | 3923 | ||
3814 | /* | 3924 | /* |
@@ -4961,7 +5071,7 @@ static struct hda_verb alc260_test_init_verbs[] = { | |||
4961 | */ | 5071 | */ |
4962 | 5072 | ||
4963 | static int alc260_add_playback_controls(struct alc_spec *spec, hda_nid_t nid, | 5073 | static int alc260_add_playback_controls(struct alc_spec *spec, hda_nid_t nid, |
4964 | const char *pfx) | 5074 | const char *pfx, int *vol_bits) |
4965 | { | 5075 | { |
4966 | hda_nid_t nid_vol; | 5076 | hda_nid_t nid_vol; |
4967 | unsigned long vol_val, sw_val; | 5077 | unsigned long vol_val, sw_val; |
@@ -4983,10 +5093,14 @@ static int alc260_add_playback_controls(struct alc_spec *spec, hda_nid_t nid, | |||
4983 | } else | 5093 | } else |
4984 | return 0; /* N/A */ | 5094 | return 0; /* N/A */ |
4985 | 5095 | ||
4986 | snprintf(name, sizeof(name), "%s Playback Volume", pfx); | 5096 | if (!(*vol_bits & (1 << nid_vol))) { |
4987 | err = add_control(spec, ALC_CTL_WIDGET_VOL, name, vol_val); | 5097 | /* first control for the volume widget */ |
4988 | if (err < 0) | 5098 | snprintf(name, sizeof(name), "%s Playback Volume", pfx); |
4989 | return err; | 5099 | err = add_control(spec, ALC_CTL_WIDGET_VOL, name, vol_val); |
5100 | if (err < 0) | ||
5101 | return err; | ||
5102 | *vol_bits |= (1 << nid_vol); | ||
5103 | } | ||
4990 | snprintf(name, sizeof(name), "%s Playback Switch", pfx); | 5104 | snprintf(name, sizeof(name), "%s Playback Switch", pfx); |
4991 | err = add_control(spec, ALC_CTL_WIDGET_MUTE, name, sw_val); | 5105 | err = add_control(spec, ALC_CTL_WIDGET_MUTE, name, sw_val); |
4992 | if (err < 0) | 5106 | if (err < 0) |
@@ -5000,6 +5114,7 @@ static int alc260_auto_create_multi_out_ctls(struct alc_spec *spec, | |||
5000 | { | 5114 | { |
5001 | hda_nid_t nid; | 5115 | hda_nid_t nid; |
5002 | int err; | 5116 | int err; |
5117 | int vols = 0; | ||
5003 | 5118 | ||
5004 | spec->multiout.num_dacs = 1; | 5119 | spec->multiout.num_dacs = 1; |
5005 | spec->multiout.dac_nids = spec->private_dac_nids; | 5120 | spec->multiout.dac_nids = spec->private_dac_nids; |
@@ -5007,21 +5122,22 @@ static int alc260_auto_create_multi_out_ctls(struct alc_spec *spec, | |||
5007 | 5122 | ||
5008 | nid = cfg->line_out_pins[0]; | 5123 | nid = cfg->line_out_pins[0]; |
5009 | if (nid) { | 5124 | if (nid) { |
5010 | err = alc260_add_playback_controls(spec, nid, "Front"); | 5125 | err = alc260_add_playback_controls(spec, nid, "Front", &vols); |
5011 | if (err < 0) | 5126 | if (err < 0) |
5012 | return err; | 5127 | return err; |
5013 | } | 5128 | } |
5014 | 5129 | ||
5015 | nid = cfg->speaker_pins[0]; | 5130 | nid = cfg->speaker_pins[0]; |
5016 | if (nid) { | 5131 | if (nid) { |
5017 | err = alc260_add_playback_controls(spec, nid, "Speaker"); | 5132 | err = alc260_add_playback_controls(spec, nid, "Speaker", &vols); |
5018 | if (err < 0) | 5133 | if (err < 0) |
5019 | return err; | 5134 | return err; |
5020 | } | 5135 | } |
5021 | 5136 | ||
5022 | nid = cfg->hp_pins[0]; | 5137 | nid = cfg->hp_pins[0]; |
5023 | if (nid) { | 5138 | if (nid) { |
5024 | err = alc260_add_playback_controls(spec, nid, "Headphone"); | 5139 | err = alc260_add_playback_controls(spec, nid, "Headphone", |
5140 | &vols); | ||
5025 | if (err < 0) | 5141 | if (err < 0) |
5026 | return err; | 5142 | return err; |
5027 | } | 5143 | } |
@@ -5209,6 +5325,7 @@ static int alc260_parse_auto_config(struct hda_codec *codec) | |||
5209 | } | 5325 | } |
5210 | spec->num_mixers++; | 5326 | spec->num_mixers++; |
5211 | 5327 | ||
5328 | store_pin_configs(codec); | ||
5212 | return 1; | 5329 | return 1; |
5213 | } | 5330 | } |
5214 | 5331 | ||
@@ -5219,7 +5336,7 @@ static void alc260_auto_init(struct hda_codec *codec) | |||
5219 | alc260_auto_init_multi_out(codec); | 5336 | alc260_auto_init_multi_out(codec); |
5220 | alc260_auto_init_analog_input(codec); | 5337 | alc260_auto_init_analog_input(codec); |
5221 | if (spec->unsol_event) | 5338 | if (spec->unsol_event) |
5222 | alc_sku_automute(codec); | 5339 | alc_inithook(codec); |
5223 | } | 5340 | } |
5224 | 5341 | ||
5225 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 5342 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
@@ -6629,7 +6746,7 @@ static void alc882_auto_init(struct hda_codec *codec) | |||
6629 | alc882_auto_init_analog_input(codec); | 6746 | alc882_auto_init_analog_input(codec); |
6630 | alc882_auto_init_input_src(codec); | 6747 | alc882_auto_init_input_src(codec); |
6631 | if (spec->unsol_event) | 6748 | if (spec->unsol_event) |
6632 | alc_sku_automute(codec); | 6749 | alc_inithook(codec); |
6633 | } | 6750 | } |
6634 | 6751 | ||
6635 | static int patch_alc883(struct hda_codec *codec); /* called in patch_alc882() */ | 6752 | static int patch_alc883(struct hda_codec *codec); /* called in patch_alc882() */ |
@@ -8297,6 +8414,7 @@ static const char *alc883_models[ALC883_MODEL_LAST] = { | |||
8297 | static struct snd_pci_quirk alc883_cfg_tbl[] = { | 8414 | static struct snd_pci_quirk alc883_cfg_tbl[] = { |
8298 | SND_PCI_QUIRK(0x1019, 0x6668, "ECS", ALC883_3ST_6ch_DIG), | 8415 | SND_PCI_QUIRK(0x1019, 0x6668, "ECS", ALC883_3ST_6ch_DIG), |
8299 | SND_PCI_QUIRK(0x1025, 0x006c, "Acer Aspire 9810", ALC883_ACER_ASPIRE), | 8416 | SND_PCI_QUIRK(0x1025, 0x006c, "Acer Aspire 9810", ALC883_ACER_ASPIRE), |
8417 | SND_PCI_QUIRK(0x1025, 0x0090, "Acer Aspire", ALC883_ACER_ASPIRE), | ||
8300 | SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_ACER_ASPIRE), | 8418 | SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_ACER_ASPIRE), |
8301 | SND_PCI_QUIRK(0x1025, 0x0112, "Acer Aspire 9303", ALC883_ACER_ASPIRE), | 8419 | SND_PCI_QUIRK(0x1025, 0x0112, "Acer Aspire 9303", ALC883_ACER_ASPIRE), |
8302 | SND_PCI_QUIRK(0x1025, 0x0121, "Acer Aspire 5920G", ALC883_ACER_ASPIRE), | 8420 | SND_PCI_QUIRK(0x1025, 0x0121, "Acer Aspire 5920G", ALC883_ACER_ASPIRE), |
@@ -8306,8 +8424,8 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
8306 | SND_PCI_QUIRK(0x103c, 0x2a4f, "HP Samba", ALC888_3ST_HP), | 8424 | SND_PCI_QUIRK(0x103c, 0x2a4f, "HP Samba", ALC888_3ST_HP), |
8307 | SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP), | 8425 | SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP), |
8308 | SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG), | 8426 | SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG), |
8427 | SND_PCI_QUIRK(0x1043, 0x1873, "Asus M90V", ALC888_ASUS_M90V), | ||
8309 | SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), | 8428 | SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), |
8310 | SND_PCI_QUIRK(0x1043, 0x8317, "Asus M90V", ALC888_ASUS_M90V), | ||
8311 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601), | 8429 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601), |
8312 | SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), | 8430 | SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), |
8313 | SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), | 8431 | SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), |
@@ -8758,7 +8876,7 @@ static void alc883_auto_init(struct hda_codec *codec) | |||
8758 | alc883_auto_init_analog_input(codec); | 8876 | alc883_auto_init_analog_input(codec); |
8759 | alc883_auto_init_input_src(codec); | 8877 | alc883_auto_init_input_src(codec); |
8760 | if (spec->unsol_event) | 8878 | if (spec->unsol_event) |
8761 | alc_sku_automute(codec); | 8879 | alc_inithook(codec); |
8762 | } | 8880 | } |
8763 | 8881 | ||
8764 | static int patch_alc883(struct hda_codec *codec) | 8882 | static int patch_alc883(struct hda_codec *codec) |
@@ -8802,8 +8920,13 @@ static int patch_alc883(struct hda_codec *codec) | |||
8802 | 8920 | ||
8803 | switch (codec->vendor_id) { | 8921 | switch (codec->vendor_id) { |
8804 | case 0x10ec0888: | 8922 | case 0x10ec0888: |
8805 | spec->stream_name_analog = "ALC888 Analog"; | 8923 | if (codec->revision_id == 0x100101) { |
8806 | spec->stream_name_digital = "ALC888 Digital"; | 8924 | spec->stream_name_analog = "ALC1200 Analog"; |
8925 | spec->stream_name_digital = "ALC1200 Digital"; | ||
8926 | } else { | ||
8927 | spec->stream_name_analog = "ALC888 Analog"; | ||
8928 | spec->stream_name_digital = "ALC888 Digital"; | ||
8929 | } | ||
8807 | break; | 8930 | break; |
8808 | case 0x10ec0889: | 8931 | case 0x10ec0889: |
8809 | spec->stream_name_analog = "ALC889 Analog"; | 8932 | spec->stream_name_analog = "ALC889 Analog"; |
@@ -10267,6 +10390,7 @@ static int alc262_parse_auto_config(struct hda_codec *codec) | |||
10267 | if (err < 0) | 10390 | if (err < 0) |
10268 | return err; | 10391 | return err; |
10269 | 10392 | ||
10393 | store_pin_configs(codec); | ||
10270 | return 1; | 10394 | return 1; |
10271 | } | 10395 | } |
10272 | 10396 | ||
@@ -10285,7 +10409,7 @@ static void alc262_auto_init(struct hda_codec *codec) | |||
10285 | alc262_auto_init_analog_input(codec); | 10409 | alc262_auto_init_analog_input(codec); |
10286 | alc262_auto_init_input_src(codec); | 10410 | alc262_auto_init_input_src(codec); |
10287 | if (spec->unsol_event) | 10411 | if (spec->unsol_event) |
10288 | alc_sku_automute(codec); | 10412 | alc_inithook(codec); |
10289 | } | 10413 | } |
10290 | 10414 | ||
10291 | /* | 10415 | /* |
@@ -10343,7 +10467,7 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = { | |||
10343 | SND_PCI_QUIRK(0x104d, 0x9015, "Sony 0x9015", ALC262_SONY_ASSAMD), | 10467 | SND_PCI_QUIRK(0x104d, 0x9015, "Sony 0x9015", ALC262_SONY_ASSAMD), |
10344 | SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1", | 10468 | SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1", |
10345 | ALC262_TOSHIBA_RX1), | 10469 | ALC262_TOSHIBA_RX1), |
10346 | SND_PCI_QUIRK(0x1179, 0x0268, "Toshiba S06", ALC262_TOSHIBA_S06), | 10470 | SND_PCI_QUIRK(0x1179, 0xff7b, "Toshiba S06", ALC262_TOSHIBA_S06), |
10347 | SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU), | 10471 | SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU), |
10348 | SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU), | 10472 | SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU), |
10349 | SND_PCI_QUIRK(0x144d, 0xc032, "Samsung Q1 Ultra", ALC262_ULTRA), | 10473 | SND_PCI_QUIRK(0x144d, 0xc032, "Samsung Q1 Ultra", ALC262_ULTRA), |
@@ -11401,6 +11525,7 @@ static int alc268_parse_auto_config(struct hda_codec *codec) | |||
11401 | if (err < 0) | 11525 | if (err < 0) |
11402 | return err; | 11526 | return err; |
11403 | 11527 | ||
11528 | store_pin_configs(codec); | ||
11404 | return 1; | 11529 | return 1; |
11405 | } | 11530 | } |
11406 | 11531 | ||
@@ -11417,7 +11542,7 @@ static void alc268_auto_init(struct hda_codec *codec) | |||
11417 | alc268_auto_init_mono_speaker_out(codec); | 11542 | alc268_auto_init_mono_speaker_out(codec); |
11418 | alc268_auto_init_analog_input(codec); | 11543 | alc268_auto_init_analog_input(codec); |
11419 | if (spec->unsol_event) | 11544 | if (spec->unsol_event) |
11420 | alc_sku_automute(codec); | 11545 | alc_inithook(codec); |
11421 | } | 11546 | } |
11422 | 11547 | ||
11423 | /* | 11548 | /* |
@@ -12120,8 +12245,26 @@ static int alc269_auto_create_multi_out_ctls(struct alc_spec *spec, | |||
12120 | return 0; | 12245 | return 0; |
12121 | } | 12246 | } |
12122 | 12247 | ||
12123 | #define alc269_auto_create_analog_input_ctls \ | 12248 | static int alc269_auto_create_analog_input_ctls(struct alc_spec *spec, |
12124 | alc880_auto_create_analog_input_ctls | 12249 | const struct auto_pin_cfg *cfg) |
12250 | { | ||
12251 | int err; | ||
12252 | |||
12253 | err = alc880_auto_create_analog_input_ctls(spec, cfg); | ||
12254 | if (err < 0) | ||
12255 | return err; | ||
12256 | /* digital-mic input pin is excluded in alc880_auto_create..() | ||
12257 | * because it's under 0x18 | ||
12258 | */ | ||
12259 | if (cfg->input_pins[AUTO_PIN_MIC] == 0x12 || | ||
12260 | cfg->input_pins[AUTO_PIN_FRONT_MIC] == 0x12) { | ||
12261 | struct hda_input_mux *imux = &spec->private_imux; | ||
12262 | imux->items[imux->num_items].label = "Int Mic"; | ||
12263 | imux->items[imux->num_items].index = 0x05; | ||
12264 | imux->num_items++; | ||
12265 | } | ||
12266 | return 0; | ||
12267 | } | ||
12125 | 12268 | ||
12126 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 12269 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
12127 | #define alc269_loopbacks alc880_loopbacks | 12270 | #define alc269_loopbacks alc880_loopbacks |
@@ -12184,6 +12327,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec) | |||
12184 | spec->mixers[spec->num_mixers] = alc269_capture_mixer; | 12327 | spec->mixers[spec->num_mixers] = alc269_capture_mixer; |
12185 | spec->num_mixers++; | 12328 | spec->num_mixers++; |
12186 | 12329 | ||
12330 | store_pin_configs(codec); | ||
12187 | return 1; | 12331 | return 1; |
12188 | } | 12332 | } |
12189 | 12333 | ||
@@ -12200,7 +12344,7 @@ static void alc269_auto_init(struct hda_codec *codec) | |||
12200 | alc269_auto_init_hp_out(codec); | 12344 | alc269_auto_init_hp_out(codec); |
12201 | alc269_auto_init_analog_input(codec); | 12345 | alc269_auto_init_analog_input(codec); |
12202 | if (spec->unsol_event) | 12346 | if (spec->unsol_event) |
12203 | alc_sku_automute(codec); | 12347 | alc_inithook(codec); |
12204 | } | 12348 | } |
12205 | 12349 | ||
12206 | /* | 12350 | /* |
@@ -13270,6 +13414,7 @@ static int alc861_parse_auto_config(struct hda_codec *codec) | |||
13270 | spec->mixers[spec->num_mixers] = alc861_capture_mixer; | 13414 | spec->mixers[spec->num_mixers] = alc861_capture_mixer; |
13271 | spec->num_mixers++; | 13415 | spec->num_mixers++; |
13272 | 13416 | ||
13417 | store_pin_configs(codec); | ||
13273 | return 1; | 13418 | return 1; |
13274 | } | 13419 | } |
13275 | 13420 | ||
@@ -13281,7 +13426,7 @@ static void alc861_auto_init(struct hda_codec *codec) | |||
13281 | alc861_auto_init_hp_out(codec); | 13426 | alc861_auto_init_hp_out(codec); |
13282 | alc861_auto_init_analog_input(codec); | 13427 | alc861_auto_init_analog_input(codec); |
13283 | if (spec->unsol_event) | 13428 | if (spec->unsol_event) |
13284 | alc_sku_automute(codec); | 13429 | alc_inithook(codec); |
13285 | } | 13430 | } |
13286 | 13431 | ||
13287 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 13432 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
@@ -14381,6 +14526,7 @@ static int alc861vd_parse_auto_config(struct hda_codec *codec) | |||
14381 | if (err < 0) | 14526 | if (err < 0) |
14382 | return err; | 14527 | return err; |
14383 | 14528 | ||
14529 | store_pin_configs(codec); | ||
14384 | return 1; | 14530 | return 1; |
14385 | } | 14531 | } |
14386 | 14532 | ||
@@ -14393,7 +14539,7 @@ static void alc861vd_auto_init(struct hda_codec *codec) | |||
14393 | alc861vd_auto_init_analog_input(codec); | 14539 | alc861vd_auto_init_analog_input(codec); |
14394 | alc861vd_auto_init_input_src(codec); | 14540 | alc861vd_auto_init_input_src(codec); |
14395 | if (spec->unsol_event) | 14541 | if (spec->unsol_event) |
14396 | alc_sku_automute(codec); | 14542 | alc_inithook(codec); |
14397 | } | 14543 | } |
14398 | 14544 | ||
14399 | static int patch_alc861vd(struct hda_codec *codec) | 14545 | static int patch_alc861vd(struct hda_codec *codec) |
@@ -15667,7 +15813,7 @@ static const char *alc662_models[ALC662_MODEL_LAST] = { | |||
15667 | 15813 | ||
15668 | static struct snd_pci_quirk alc662_cfg_tbl[] = { | 15814 | static struct snd_pci_quirk alc662_cfg_tbl[] = { |
15669 | SND_PCI_QUIRK(0x1043, 0x1878, "ASUS M51VA", ALC663_ASUS_M51VA), | 15815 | SND_PCI_QUIRK(0x1043, 0x1878, "ASUS M51VA", ALC663_ASUS_M51VA), |
15670 | SND_PCI_QUIRK(0x1043, 0x19a3, "ASUS M51VA", ALC663_ASUS_G50V), | 15816 | SND_PCI_QUIRK(0x1043, 0x19a3, "ASUS G50V", ALC663_ASUS_G50V), |
15671 | SND_PCI_QUIRK(0x1043, 0x8290, "ASUS P5GC-MX", ALC662_3ST_6ch_DIG), | 15817 | SND_PCI_QUIRK(0x1043, 0x8290, "ASUS P5GC-MX", ALC662_3ST_6ch_DIG), |
15672 | SND_PCI_QUIRK(0x1043, 0x82a1, "ASUS Eeepc", ALC662_ASUS_EEEPC_P701), | 15818 | SND_PCI_QUIRK(0x1043, 0x82a1, "ASUS Eeepc", ALC662_ASUS_EEEPC_P701), |
15673 | SND_PCI_QUIRK(0x1043, 0x82d1, "ASUS Eeepc EP20", ALC662_ASUS_EEEPC_EP20), | 15819 | SND_PCI_QUIRK(0x1043, 0x82d1, "ASUS Eeepc EP20", ALC662_ASUS_EEEPC_EP20), |
@@ -15680,6 +15826,7 @@ static struct snd_pci_quirk alc662_cfg_tbl[] = { | |||
15680 | SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC663_ASUS_MODE1), | 15826 | SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC663_ASUS_MODE1), |
15681 | SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC663_ASUS_MODE1), | 15827 | SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC663_ASUS_MODE1), |
15682 | SND_PCI_QUIRK(0x1043, 0x19e3, "ASUS NB", ALC663_ASUS_MODE1), | 15828 | SND_PCI_QUIRK(0x1043, 0x19e3, "ASUS NB", ALC663_ASUS_MODE1), |
15829 | SND_PCI_QUIRK(0x1043, 0x1993, "ASUS N20", ALC663_ASUS_MODE1), | ||
15683 | SND_PCI_QUIRK(0x1043, 0x19c3, "ASUS F5Z/F6x", ALC662_ASUS_MODE2), | 15830 | SND_PCI_QUIRK(0x1043, 0x19c3, "ASUS F5Z/F6x", ALC662_ASUS_MODE2), |
15684 | SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_ASUS_MODE2), | 15831 | SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_ASUS_MODE2), |
15685 | SND_PCI_QUIRK(0x1043, 0x1913, "ASUS NB", ALC662_ASUS_MODE2), | 15832 | SND_PCI_QUIRK(0x1043, 0x1913, "ASUS NB", ALC662_ASUS_MODE2), |
@@ -16211,6 +16358,8 @@ static int alc662_parse_auto_config(struct hda_codec *codec) | |||
16211 | 16358 | ||
16212 | spec->mixers[spec->num_mixers] = alc662_capture_mixer; | 16359 | spec->mixers[spec->num_mixers] = alc662_capture_mixer; |
16213 | spec->num_mixers++; | 16360 | spec->num_mixers++; |
16361 | |||
16362 | store_pin_configs(codec); | ||
16214 | return 1; | 16363 | return 1; |
16215 | } | 16364 | } |
16216 | 16365 | ||
@@ -16223,7 +16372,7 @@ static void alc662_auto_init(struct hda_codec *codec) | |||
16223 | alc662_auto_init_analog_input(codec); | 16372 | alc662_auto_init_analog_input(codec); |
16224 | alc662_auto_init_input_src(codec); | 16373 | alc662_auto_init_input_src(codec); |
16225 | if (spec->unsol_event) | 16374 | if (spec->unsol_event) |
16226 | alc_sku_automute(codec); | 16375 | alc_inithook(codec); |
16227 | } | 16376 | } |
16228 | 16377 | ||
16229 | static int patch_alc662(struct hda_codec *codec) | 16378 | static int patch_alc662(struct hda_codec *codec) |
@@ -16268,6 +16417,9 @@ static int patch_alc662(struct hda_codec *codec) | |||
16268 | if (codec->vendor_id == 0x10ec0663) { | 16417 | if (codec->vendor_id == 0x10ec0663) { |
16269 | spec->stream_name_analog = "ALC663 Analog"; | 16418 | spec->stream_name_analog = "ALC663 Analog"; |
16270 | spec->stream_name_digital = "ALC663 Digital"; | 16419 | spec->stream_name_digital = "ALC663 Digital"; |
16420 | } else if (codec->vendor_id == 0x10ec0272) { | ||
16421 | spec->stream_name_analog = "ALC272 Analog"; | ||
16422 | spec->stream_name_digital = "ALC272 Digital"; | ||
16271 | } else { | 16423 | } else { |
16272 | spec->stream_name_analog = "ALC662 Analog"; | 16424 | spec->stream_name_analog = "ALC662 Analog"; |
16273 | spec->stream_name_digital = "ALC662 Digital"; | 16425 | spec->stream_name_digital = "ALC662 Digital"; |
@@ -16305,6 +16457,7 @@ struct hda_codec_preset snd_hda_preset_realtek[] = { | |||
16305 | { .id = 0x10ec0267, .name = "ALC267", .patch = patch_alc268 }, | 16457 | { .id = 0x10ec0267, .name = "ALC267", .patch = patch_alc268 }, |
16306 | { .id = 0x10ec0268, .name = "ALC268", .patch = patch_alc268 }, | 16458 | { .id = 0x10ec0268, .name = "ALC268", .patch = patch_alc268 }, |
16307 | { .id = 0x10ec0269, .name = "ALC269", .patch = patch_alc269 }, | 16459 | { .id = 0x10ec0269, .name = "ALC269", .patch = patch_alc269 }, |
16460 | { .id = 0x10ec0272, .name = "ALC272", .patch = patch_alc662 }, | ||
16308 | { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660", | 16461 | { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660", |
16309 | .patch = patch_alc861 }, | 16462 | .patch = patch_alc861 }, |
16310 | { .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd }, | 16463 | { .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd }, |
@@ -16323,7 +16476,10 @@ struct hda_codec_preset snd_hda_preset_realtek[] = { | |||
16323 | { .id = 0x10ec0885, .rev = 0x100103, .name = "ALC889A", | 16476 | { .id = 0x10ec0885, .rev = 0x100103, .name = "ALC889A", |
16324 | .patch = patch_alc882 }, /* should be patch_alc883() in future */ | 16477 | .patch = patch_alc882 }, /* should be patch_alc883() in future */ |
16325 | { .id = 0x10ec0885, .name = "ALC885", .patch = patch_alc882 }, | 16478 | { .id = 0x10ec0885, .name = "ALC885", .patch = patch_alc882 }, |
16479 | { .id = 0x10ec0887, .name = "ALC887", .patch = patch_alc883 }, | ||
16326 | { .id = 0x10ec0888, .name = "ALC888", .patch = patch_alc883 }, | 16480 | { .id = 0x10ec0888, .name = "ALC888", .patch = patch_alc883 }, |
16481 | { .id = 0x10ec0888, .rev = 0x100101, .name = "ALC1200", | ||
16482 | .patch = patch_alc883 }, | ||
16327 | { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc883 }, | 16483 | { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc883 }, |
16328 | {} /* terminator */ | 16484 | {} /* terminator */ |
16329 | }; | 16485 | }; |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index c59065513118..e6085915d86d 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -69,6 +69,7 @@ enum { | |||
69 | enum { | 69 | enum { |
70 | STAC_92HD73XX_REF, | 70 | STAC_92HD73XX_REF, |
71 | STAC_DELL_M6, | 71 | STAC_DELL_M6, |
72 | STAC_DELL_EQ, | ||
72 | STAC_92HD73XX_MODELS | 73 | STAC_92HD73XX_MODELS |
73 | }; | 74 | }; |
74 | 75 | ||
@@ -566,10 +567,8 @@ static int stac92xx_smux_enum_put(struct snd_kcontrol *kcontrol, | |||
566 | nid = codec->slave_dig_outs[smux_idx - 1]; | 567 | nid = codec->slave_dig_outs[smux_idx - 1]; |
567 | if (spec->cur_smux[smux_idx] == smux->num_items - 1) | 568 | if (spec->cur_smux[smux_idx] == smux->num_items - 1) |
568 | val = AMP_OUT_MUTE; | 569 | val = AMP_OUT_MUTE; |
569 | if (smux_idx == 0) | ||
570 | nid = spec->multiout.dig_out_nid; | ||
571 | else | 570 | else |
572 | nid = codec->slave_dig_outs[smux_idx - 1]; | 571 | val = AMP_OUT_UNMUTE; |
573 | /* un/mute SPDIF out */ | 572 | /* un/mute SPDIF out */ |
574 | snd_hda_codec_write_cache(codec, nid, 0, | 573 | snd_hda_codec_write_cache(codec, nid, 0, |
575 | AC_VERB_SET_AMP_GAIN_MUTE, val); | 574 | AC_VERB_SET_AMP_GAIN_MUTE, val); |
@@ -775,9 +774,7 @@ static struct hda_verb dell_eq_core_init[] = { | |||
775 | }; | 774 | }; |
776 | 775 | ||
777 | static struct hda_verb dell_m6_core_init[] = { | 776 | static struct hda_verb dell_m6_core_init[] = { |
778 | /* set master volume to max value without distortion | 777 | { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, |
779 | * and direct control */ | ||
780 | { 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xec}, | ||
781 | /* setup audio connections */ | 778 | /* setup audio connections */ |
782 | { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00}, | 779 | { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00}, |
783 | { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01}, | 780 | { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01}, |
@@ -1282,7 +1279,7 @@ static int stac92xx_build_controls(struct hda_codec *codec) | |||
1282 | return err; | 1279 | return err; |
1283 | spec->multiout.share_spdif = 1; | 1280 | spec->multiout.share_spdif = 1; |
1284 | } | 1281 | } |
1285 | if (spec->dig_in_nid && (!spec->gpio_dir & 0x01)) { | 1282 | if (spec->dig_in_nid && !(spec->gpio_dir & 0x01)) { |
1286 | err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid); | 1283 | err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid); |
1287 | if (err < 0) | 1284 | if (err < 0) |
1288 | return err; | 1285 | return err; |
@@ -1602,11 +1599,13 @@ static unsigned int dell_m6_pin_configs[13] = { | |||
1602 | static unsigned int *stac92hd73xx_brd_tbl[STAC_92HD73XX_MODELS] = { | 1599 | static unsigned int *stac92hd73xx_brd_tbl[STAC_92HD73XX_MODELS] = { |
1603 | [STAC_92HD73XX_REF] = ref92hd73xx_pin_configs, | 1600 | [STAC_92HD73XX_REF] = ref92hd73xx_pin_configs, |
1604 | [STAC_DELL_M6] = dell_m6_pin_configs, | 1601 | [STAC_DELL_M6] = dell_m6_pin_configs, |
1602 | [STAC_DELL_EQ] = dell_m6_pin_configs, | ||
1605 | }; | 1603 | }; |
1606 | 1604 | ||
1607 | static const char *stac92hd73xx_models[STAC_92HD73XX_MODELS] = { | 1605 | static const char *stac92hd73xx_models[STAC_92HD73XX_MODELS] = { |
1608 | [STAC_92HD73XX_REF] = "ref", | 1606 | [STAC_92HD73XX_REF] = "ref", |
1609 | [STAC_DELL_M6] = "dell-m6", | 1607 | [STAC_DELL_M6] = "dell-m6", |
1608 | [STAC_DELL_EQ] = "dell-eq", | ||
1610 | }; | 1609 | }; |
1611 | 1610 | ||
1612 | static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = { | 1611 | static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = { |
@@ -2816,7 +2815,7 @@ static int stac92xx_auto_create_multi_out_ctls(struct hda_codec *codec, | |||
2816 | static const char *chname[4] = { | 2815 | static const char *chname[4] = { |
2817 | "Front", "Surround", NULL /*CLFE*/, "Side" | 2816 | "Front", "Surround", NULL /*CLFE*/, "Side" |
2818 | }; | 2817 | }; |
2819 | hda_nid_t nid; | 2818 | hda_nid_t nid = 0; |
2820 | int i, err; | 2819 | int i, err; |
2821 | 2820 | ||
2822 | struct sigmatel_spec *spec = codec->spec; | 2821 | struct sigmatel_spec *spec = codec->spec; |
@@ -4133,12 +4132,17 @@ again: | |||
4133 | sizeof(stac92hd73xx_dmux)); | 4132 | sizeof(stac92hd73xx_dmux)); |
4134 | 4133 | ||
4135 | switch (spec->board_config) { | 4134 | switch (spec->board_config) { |
4136 | case STAC_DELL_M6: | 4135 | case STAC_DELL_EQ: |
4137 | spec->init = dell_eq_core_init; | 4136 | spec->init = dell_eq_core_init; |
4137 | /* fallthru */ | ||
4138 | case STAC_DELL_M6: | ||
4138 | spec->num_smuxes = 0; | 4139 | spec->num_smuxes = 0; |
4139 | spec->mixer = &stac92hd73xx_6ch_mixer[DELL_M6_MIXER]; | 4140 | spec->mixer = &stac92hd73xx_6ch_mixer[DELL_M6_MIXER]; |
4140 | spec->amp_nids = &stac92hd73xx_amp_nids[DELL_M6_AMP]; | 4141 | spec->amp_nids = &stac92hd73xx_amp_nids[DELL_M6_AMP]; |
4141 | spec->num_amps = 1; | 4142 | spec->num_amps = 1; |
4143 | |||
4144 | if (!spec->init) | ||
4145 | spec->init = dell_m6_core_init; | ||
4142 | switch (codec->subsystem_id) { | 4146 | switch (codec->subsystem_id) { |
4143 | case 0x1028025e: /* Analog Mics */ | 4147 | case 0x1028025e: /* Analog Mics */ |
4144 | case 0x1028025f: | 4148 | case 0x1028025f: |
@@ -4148,8 +4152,6 @@ again: | |||
4148 | break; | 4152 | break; |
4149 | case 0x10280271: /* Digital Mics */ | 4153 | case 0x10280271: /* Digital Mics */ |
4150 | case 0x10280272: | 4154 | case 0x10280272: |
4151 | spec->init = dell_m6_core_init; | ||
4152 | /* fall-through */ | ||
4153 | case 0x10280254: | 4155 | case 0x10280254: |
4154 | case 0x10280255: | 4156 | case 0x10280255: |
4155 | stac92xx_set_config_reg(codec, 0x13, 0x90A60160); | 4157 | stac92xx_set_config_reg(codec, 0x13, 0x90A60160); |