aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_nvhdmi.c1
-rw-r--r--sound/pci/hda/patch_realtek.c110
-rw-r--r--sound/pci/hda/patch_sigmatel.c4
3 files changed, 85 insertions, 30 deletions
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..ef4955c73c88 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -822,6 +822,27 @@ static void alc_sku_automute(struct hda_codec *codec)
822 spec->jack_present ? 0 : PIN_OUT); 822 spec->jack_present ? 0 : PIN_OUT);
823} 823}
824 824
825static void alc_mic_automute(struct hda_codec *codec)
826{
827 struct alc_spec *spec = codec->spec;
828 unsigned int present;
829 unsigned int mic_nid = spec->autocfg.input_pins[AUTO_PIN_MIC];
830 unsigned int fmic_nid = spec->autocfg.input_pins[AUTO_PIN_FRONT_MIC];
831 unsigned int mix_nid = spec->capsrc_nids[0];
832 unsigned int capsrc_idx_mic, capsrc_idx_fmic;
833
834 capsrc_idx_mic = mic_nid - 0x18;
835 capsrc_idx_fmic = fmic_nid - 0x18;
836 present = snd_hda_codec_read(codec, mic_nid, 0,
837 AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
838 snd_hda_codec_write(codec, mix_nid, 0, AC_VERB_SET_AMP_GAIN_MUTE,
839 0x7000 | (capsrc_idx_mic << 8) | (present ? 0 : 0x80));
840 snd_hda_codec_write(codec, mix_nid, 0, AC_VERB_SET_AMP_GAIN_MUTE,
841 0x7000 | (capsrc_idx_fmic << 8) | (present ? 0x80 : 0));
842 snd_hda_codec_amp_stereo(codec, 0x0b, HDA_INPUT, capsrc_idx_fmic,
843 HDA_AMP_MUTE, present ? HDA_AMP_MUTE : 0);
844}
845
825/* unsolicited event for HP jack sensing */ 846/* unsolicited event for HP jack sensing */
826static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res) 847static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res)
827{ 848{
@@ -829,10 +850,17 @@ static void alc_sku_unsol_event(struct hda_codec *codec, unsigned int res)
829 res >>= 28; 850 res >>= 28;
830 else 851 else
831 res >>= 26; 852 res >>= 26;
832 if (res != ALC880_HP_EVENT) 853 if (res == ALC880_HP_EVENT)
833 return; 854 alc_sku_automute(codec);
834 855
856 if (res == ALC880_MIC_EVENT)
857 alc_mic_automute(codec);
858}
859
860static void alc_inithook(struct hda_codec *codec)
861{
835 alc_sku_automute(codec); 862 alc_sku_automute(codec);
863 alc_mic_automute(codec);
836} 864}
837 865
838/* additional initialization for ALC888 variants */ 866/* additional initialization for ALC888 variants */
@@ -1018,10 +1046,17 @@ do_sku:
1018 else 1046 else
1019 return; 1047 return;
1020 } 1048 }
1049 if (spec->autocfg.hp_pins[0])
1050 snd_hda_codec_write(codec, spec->autocfg.hp_pins[0], 0,
1051 AC_VERB_SET_UNSOLICITED_ENABLE,
1052 AC_USRSP_EN | ALC880_HP_EVENT);
1021 1053
1022 snd_hda_codec_write(codec, spec->autocfg.hp_pins[0], 0, 1054 if (spec->autocfg.input_pins[AUTO_PIN_MIC] &&
1023 AC_VERB_SET_UNSOLICITED_ENABLE, 1055 spec->autocfg.input_pins[AUTO_PIN_FRONT_MIC])
1024 AC_USRSP_EN | ALC880_HP_EVENT); 1056 snd_hda_codec_write(codec,
1057 spec->autocfg.input_pins[AUTO_PIN_MIC], 0,
1058 AC_VERB_SET_UNSOLICITED_ENABLE,
1059 AC_USRSP_EN | ALC880_MIC_EVENT);
1025 1060
1026 spec->unsol_event = alc_sku_unsol_event; 1061 spec->unsol_event = alc_sku_unsol_event;
1027} 1062}
@@ -3808,7 +3843,7 @@ static void alc880_auto_init(struct hda_codec *codec)
3808 alc880_auto_init_extra_out(codec); 3843 alc880_auto_init_extra_out(codec);
3809 alc880_auto_init_analog_input(codec); 3844 alc880_auto_init_analog_input(codec);
3810 if (spec->unsol_event) 3845 if (spec->unsol_event)
3811 alc_sku_automute(codec); 3846 alc_inithook(codec);
3812} 3847}
3813 3848
3814/* 3849/*
@@ -4961,7 +4996,7 @@ static struct hda_verb alc260_test_init_verbs[] = {
4961 */ 4996 */
4962 4997
4963static int alc260_add_playback_controls(struct alc_spec *spec, hda_nid_t nid, 4998static int alc260_add_playback_controls(struct alc_spec *spec, hda_nid_t nid,
4964 const char *pfx) 4999 const char *pfx, int *vol_bits)
4965{ 5000{
4966 hda_nid_t nid_vol; 5001 hda_nid_t nid_vol;
4967 unsigned long vol_val, sw_val; 5002 unsigned long vol_val, sw_val;
@@ -4983,10 +5018,14 @@ static int alc260_add_playback_controls(struct alc_spec *spec, hda_nid_t nid,
4983 } else 5018 } else
4984 return 0; /* N/A */ 5019 return 0; /* N/A */
4985 5020
4986 snprintf(name, sizeof(name), "%s Playback Volume", pfx); 5021 if (!(*vol_bits & (1 << nid_vol))) {
4987 err = add_control(spec, ALC_CTL_WIDGET_VOL, name, vol_val); 5022 /* first control for the volume widget */
4988 if (err < 0) 5023 snprintf(name, sizeof(name), "%s Playback Volume", pfx);
4989 return err; 5024 err = add_control(spec, ALC_CTL_WIDGET_VOL, name, vol_val);
5025 if (err < 0)
5026 return err;
5027 *vol_bits |= (1 << nid_vol);
5028 }
4990 snprintf(name, sizeof(name), "%s Playback Switch", pfx); 5029 snprintf(name, sizeof(name), "%s Playback Switch", pfx);
4991 err = add_control(spec, ALC_CTL_WIDGET_MUTE, name, sw_val); 5030 err = add_control(spec, ALC_CTL_WIDGET_MUTE, name, sw_val);
4992 if (err < 0) 5031 if (err < 0)
@@ -5000,6 +5039,7 @@ static int alc260_auto_create_multi_out_ctls(struct alc_spec *spec,
5000{ 5039{
5001 hda_nid_t nid; 5040 hda_nid_t nid;
5002 int err; 5041 int err;
5042 int vols = 0;
5003 5043
5004 spec->multiout.num_dacs = 1; 5044 spec->multiout.num_dacs = 1;
5005 spec->multiout.dac_nids = spec->private_dac_nids; 5045 spec->multiout.dac_nids = spec->private_dac_nids;
@@ -5007,21 +5047,22 @@ static int alc260_auto_create_multi_out_ctls(struct alc_spec *spec,
5007 5047
5008 nid = cfg->line_out_pins[0]; 5048 nid = cfg->line_out_pins[0];
5009 if (nid) { 5049 if (nid) {
5010 err = alc260_add_playback_controls(spec, nid, "Front"); 5050 err = alc260_add_playback_controls(spec, nid, "Front", &vols);
5011 if (err < 0) 5051 if (err < 0)
5012 return err; 5052 return err;
5013 } 5053 }
5014 5054
5015 nid = cfg->speaker_pins[0]; 5055 nid = cfg->speaker_pins[0];
5016 if (nid) { 5056 if (nid) {
5017 err = alc260_add_playback_controls(spec, nid, "Speaker"); 5057 err = alc260_add_playback_controls(spec, nid, "Speaker", &vols);
5018 if (err < 0) 5058 if (err < 0)
5019 return err; 5059 return err;
5020 } 5060 }
5021 5061
5022 nid = cfg->hp_pins[0]; 5062 nid = cfg->hp_pins[0];
5023 if (nid) { 5063 if (nid) {
5024 err = alc260_add_playback_controls(spec, nid, "Headphone"); 5064 err = alc260_add_playback_controls(spec, nid, "Headphone",
5065 &vols);
5025 if (err < 0) 5066 if (err < 0)
5026 return err; 5067 return err;
5027 } 5068 }
@@ -5219,7 +5260,7 @@ static void alc260_auto_init(struct hda_codec *codec)
5219 alc260_auto_init_multi_out(codec); 5260 alc260_auto_init_multi_out(codec);
5220 alc260_auto_init_analog_input(codec); 5261 alc260_auto_init_analog_input(codec);
5221 if (spec->unsol_event) 5262 if (spec->unsol_event)
5222 alc_sku_automute(codec); 5263 alc_inithook(codec);
5223} 5264}
5224 5265
5225#ifdef CONFIG_SND_HDA_POWER_SAVE 5266#ifdef CONFIG_SND_HDA_POWER_SAVE
@@ -6629,7 +6670,7 @@ static void alc882_auto_init(struct hda_codec *codec)
6629 alc882_auto_init_analog_input(codec); 6670 alc882_auto_init_analog_input(codec);
6630 alc882_auto_init_input_src(codec); 6671 alc882_auto_init_input_src(codec);
6631 if (spec->unsol_event) 6672 if (spec->unsol_event)
6632 alc_sku_automute(codec); 6673 alc_inithook(codec);
6633} 6674}
6634 6675
6635static int patch_alc883(struct hda_codec *codec); /* called in patch_alc882() */ 6676static int patch_alc883(struct hda_codec *codec); /* called in patch_alc882() */
@@ -8306,8 +8347,8 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
8306 SND_PCI_QUIRK(0x103c, 0x2a4f, "HP Samba", ALC888_3ST_HP), 8347 SND_PCI_QUIRK(0x103c, 0x2a4f, "HP Samba", ALC888_3ST_HP),
8307 SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP), 8348 SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP),
8308 SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG), 8349 SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG),
8350 SND_PCI_QUIRK(0x1043, 0x1873, "Asus M90V", ALC888_ASUS_M90V),
8309 SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), 8351 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), 8352 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601),
8312 SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG), 8353 SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG),
8313 SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), 8354 SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG),
@@ -8758,7 +8799,7 @@ static void alc883_auto_init(struct hda_codec *codec)
8758 alc883_auto_init_analog_input(codec); 8799 alc883_auto_init_analog_input(codec);
8759 alc883_auto_init_input_src(codec); 8800 alc883_auto_init_input_src(codec);
8760 if (spec->unsol_event) 8801 if (spec->unsol_event)
8761 alc_sku_automute(codec); 8802 alc_inithook(codec);
8762} 8803}
8763 8804
8764static int patch_alc883(struct hda_codec *codec) 8805static int patch_alc883(struct hda_codec *codec)
@@ -8802,8 +8843,13 @@ static int patch_alc883(struct hda_codec *codec)
8802 8843
8803 switch (codec->vendor_id) { 8844 switch (codec->vendor_id) {
8804 case 0x10ec0888: 8845 case 0x10ec0888:
8805 spec->stream_name_analog = "ALC888 Analog"; 8846 if (codec->revision_id == 0x100101) {
8806 spec->stream_name_digital = "ALC888 Digital"; 8847 spec->stream_name_analog = "ALC1200 Analog";
8848 spec->stream_name_digital = "ALC1200 Digital";
8849 } else {
8850 spec->stream_name_analog = "ALC888 Analog";
8851 spec->stream_name_digital = "ALC888 Digital";
8852 }
8807 break; 8853 break;
8808 case 0x10ec0889: 8854 case 0x10ec0889:
8809 spec->stream_name_analog = "ALC889 Analog"; 8855 spec->stream_name_analog = "ALC889 Analog";
@@ -10285,7 +10331,7 @@ static void alc262_auto_init(struct hda_codec *codec)
10285 alc262_auto_init_analog_input(codec); 10331 alc262_auto_init_analog_input(codec);
10286 alc262_auto_init_input_src(codec); 10332 alc262_auto_init_input_src(codec);
10287 if (spec->unsol_event) 10333 if (spec->unsol_event)
10288 alc_sku_automute(codec); 10334 alc_inithook(codec);
10289} 10335}
10290 10336
10291/* 10337/*
@@ -10343,7 +10389,7 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = {
10343 SND_PCI_QUIRK(0x104d, 0x9015, "Sony 0x9015", ALC262_SONY_ASSAMD), 10389 SND_PCI_QUIRK(0x104d, 0x9015, "Sony 0x9015", ALC262_SONY_ASSAMD),
10344 SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1", 10390 SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1",
10345 ALC262_TOSHIBA_RX1), 10391 ALC262_TOSHIBA_RX1),
10346 SND_PCI_QUIRK(0x1179, 0x0268, "Toshiba S06", ALC262_TOSHIBA_S06), 10392 SND_PCI_QUIRK(0x1179, 0xff7b, "Toshiba S06", ALC262_TOSHIBA_S06),
10347 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU), 10393 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU),
10348 SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU), 10394 SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU),
10349 SND_PCI_QUIRK(0x144d, 0xc032, "Samsung Q1 Ultra", ALC262_ULTRA), 10395 SND_PCI_QUIRK(0x144d, 0xc032, "Samsung Q1 Ultra", ALC262_ULTRA),
@@ -11417,7 +11463,7 @@ static void alc268_auto_init(struct hda_codec *codec)
11417 alc268_auto_init_mono_speaker_out(codec); 11463 alc268_auto_init_mono_speaker_out(codec);
11418 alc268_auto_init_analog_input(codec); 11464 alc268_auto_init_analog_input(codec);
11419 if (spec->unsol_event) 11465 if (spec->unsol_event)
11420 alc_sku_automute(codec); 11466 alc_inithook(codec);
11421} 11467}
11422 11468
11423/* 11469/*
@@ -12200,7 +12246,7 @@ static void alc269_auto_init(struct hda_codec *codec)
12200 alc269_auto_init_hp_out(codec); 12246 alc269_auto_init_hp_out(codec);
12201 alc269_auto_init_analog_input(codec); 12247 alc269_auto_init_analog_input(codec);
12202 if (spec->unsol_event) 12248 if (spec->unsol_event)
12203 alc_sku_automute(codec); 12249 alc_inithook(codec);
12204} 12250}
12205 12251
12206/* 12252/*
@@ -13281,7 +13327,7 @@ static void alc861_auto_init(struct hda_codec *codec)
13281 alc861_auto_init_hp_out(codec); 13327 alc861_auto_init_hp_out(codec);
13282 alc861_auto_init_analog_input(codec); 13328 alc861_auto_init_analog_input(codec);
13283 if (spec->unsol_event) 13329 if (spec->unsol_event)
13284 alc_sku_automute(codec); 13330 alc_inithook(codec);
13285} 13331}
13286 13332
13287#ifdef CONFIG_SND_HDA_POWER_SAVE 13333#ifdef CONFIG_SND_HDA_POWER_SAVE
@@ -14393,7 +14439,7 @@ static void alc861vd_auto_init(struct hda_codec *codec)
14393 alc861vd_auto_init_analog_input(codec); 14439 alc861vd_auto_init_analog_input(codec);
14394 alc861vd_auto_init_input_src(codec); 14440 alc861vd_auto_init_input_src(codec);
14395 if (spec->unsol_event) 14441 if (spec->unsol_event)
14396 alc_sku_automute(codec); 14442 alc_inithook(codec);
14397} 14443}
14398 14444
14399static int patch_alc861vd(struct hda_codec *codec) 14445static int patch_alc861vd(struct hda_codec *codec)
@@ -15667,7 +15713,7 @@ static const char *alc662_models[ALC662_MODEL_LAST] = {
15667 15713
15668static struct snd_pci_quirk alc662_cfg_tbl[] = { 15714static struct snd_pci_quirk alc662_cfg_tbl[] = {
15669 SND_PCI_QUIRK(0x1043, 0x1878, "ASUS M51VA", ALC663_ASUS_M51VA), 15715 SND_PCI_QUIRK(0x1043, 0x1878, "ASUS M51VA", ALC663_ASUS_M51VA),
15670 SND_PCI_QUIRK(0x1043, 0x19a3, "ASUS M51VA", ALC663_ASUS_G50V), 15716 SND_PCI_QUIRK(0x1043, 0x19a3, "ASUS G50V", ALC663_ASUS_G50V),
15671 SND_PCI_QUIRK(0x1043, 0x8290, "ASUS P5GC-MX", ALC662_3ST_6ch_DIG), 15717 SND_PCI_QUIRK(0x1043, 0x8290, "ASUS P5GC-MX", ALC662_3ST_6ch_DIG),
15672 SND_PCI_QUIRK(0x1043, 0x82a1, "ASUS Eeepc", ALC662_ASUS_EEEPC_P701), 15718 SND_PCI_QUIRK(0x1043, 0x82a1, "ASUS Eeepc", ALC662_ASUS_EEEPC_P701),
15673 SND_PCI_QUIRK(0x1043, 0x82d1, "ASUS Eeepc EP20", ALC662_ASUS_EEEPC_EP20), 15719 SND_PCI_QUIRK(0x1043, 0x82d1, "ASUS Eeepc EP20", ALC662_ASUS_EEEPC_EP20),
@@ -15680,6 +15726,7 @@ static struct snd_pci_quirk alc662_cfg_tbl[] = {
15680 SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC663_ASUS_MODE1), 15726 SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC663_ASUS_MODE1),
15681 SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC663_ASUS_MODE1), 15727 SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC663_ASUS_MODE1),
15682 SND_PCI_QUIRK(0x1043, 0x19e3, "ASUS NB", ALC663_ASUS_MODE1), 15728 SND_PCI_QUIRK(0x1043, 0x19e3, "ASUS NB", ALC663_ASUS_MODE1),
15729 SND_PCI_QUIRK(0x1043, 0x1993, "ASUS N20", ALC663_ASUS_MODE1),
15683 SND_PCI_QUIRK(0x1043, 0x19c3, "ASUS F5Z/F6x", ALC662_ASUS_MODE2), 15730 SND_PCI_QUIRK(0x1043, 0x19c3, "ASUS F5Z/F6x", ALC662_ASUS_MODE2),
15684 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_ASUS_MODE2), 15731 SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_ASUS_MODE2),
15685 SND_PCI_QUIRK(0x1043, 0x1913, "ASUS NB", ALC662_ASUS_MODE2), 15732 SND_PCI_QUIRK(0x1043, 0x1913, "ASUS NB", ALC662_ASUS_MODE2),
@@ -16223,7 +16270,7 @@ static void alc662_auto_init(struct hda_codec *codec)
16223 alc662_auto_init_analog_input(codec); 16270 alc662_auto_init_analog_input(codec);
16224 alc662_auto_init_input_src(codec); 16271 alc662_auto_init_input_src(codec);
16225 if (spec->unsol_event) 16272 if (spec->unsol_event)
16226 alc_sku_automute(codec); 16273 alc_inithook(codec);
16227} 16274}
16228 16275
16229static int patch_alc662(struct hda_codec *codec) 16276static int patch_alc662(struct hda_codec *codec)
@@ -16268,6 +16315,9 @@ static int patch_alc662(struct hda_codec *codec)
16268 if (codec->vendor_id == 0x10ec0663) { 16315 if (codec->vendor_id == 0x10ec0663) {
16269 spec->stream_name_analog = "ALC663 Analog"; 16316 spec->stream_name_analog = "ALC663 Analog";
16270 spec->stream_name_digital = "ALC663 Digital"; 16317 spec->stream_name_digital = "ALC663 Digital";
16318 } else if (codec->vendor_id == 0x10ec0272) {
16319 spec->stream_name_analog = "ALC272 Analog";
16320 spec->stream_name_digital = "ALC272 Digital";
16271 } else { 16321 } else {
16272 spec->stream_name_analog = "ALC662 Analog"; 16322 spec->stream_name_analog = "ALC662 Analog";
16273 spec->stream_name_digital = "ALC662 Digital"; 16323 spec->stream_name_digital = "ALC662 Digital";
@@ -16305,6 +16355,7 @@ struct hda_codec_preset snd_hda_preset_realtek[] = {
16305 { .id = 0x10ec0267, .name = "ALC267", .patch = patch_alc268 }, 16355 { .id = 0x10ec0267, .name = "ALC267", .patch = patch_alc268 },
16306 { .id = 0x10ec0268, .name = "ALC268", .patch = patch_alc268 }, 16356 { .id = 0x10ec0268, .name = "ALC268", .patch = patch_alc268 },
16307 { .id = 0x10ec0269, .name = "ALC269", .patch = patch_alc269 }, 16357 { .id = 0x10ec0269, .name = "ALC269", .patch = patch_alc269 },
16358 { .id = 0x10ec0272, .name = "ALC272", .patch = patch_alc662 },
16308 { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660", 16359 { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660",
16309 .patch = patch_alc861 }, 16360 .patch = patch_alc861 },
16310 { .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd }, 16361 { .id = 0x10ec0660, .name = "ALC660-VD", .patch = patch_alc861vd },
@@ -16323,7 +16374,10 @@ struct hda_codec_preset snd_hda_preset_realtek[] = {
16323 { .id = 0x10ec0885, .rev = 0x100103, .name = "ALC889A", 16374 { .id = 0x10ec0885, .rev = 0x100103, .name = "ALC889A",
16324 .patch = patch_alc882 }, /* should be patch_alc883() in future */ 16375 .patch = patch_alc882 }, /* should be patch_alc883() in future */
16325 { .id = 0x10ec0885, .name = "ALC885", .patch = patch_alc882 }, 16376 { .id = 0x10ec0885, .name = "ALC885", .patch = patch_alc882 },
16377 { .id = 0x10ec0887, .name = "ALC887", .patch = patch_alc883 },
16326 { .id = 0x10ec0888, .name = "ALC888", .patch = patch_alc883 }, 16378 { .id = 0x10ec0888, .name = "ALC888", .patch = patch_alc883 },
16379 { .id = 0x10ec0888, .rev = 0x100101, .name = "ALC1200",
16380 .patch = patch_alc883 },
16327 { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc883 }, 16381 { .id = 0x10ec0889, .name = "ALC889", .patch = patch_alc883 },
16328 {} /* terminator */ 16382 {} /* terminator */
16329}; 16383};
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index c59065513118..788fdc6f3264 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -1282,7 +1282,7 @@ static int stac92xx_build_controls(struct hda_codec *codec)
1282 return err; 1282 return err;
1283 spec->multiout.share_spdif = 1; 1283 spec->multiout.share_spdif = 1;
1284 } 1284 }
1285 if (spec->dig_in_nid && (!spec->gpio_dir & 0x01)) { 1285 if (spec->dig_in_nid && !(spec->gpio_dir & 0x01)) {
1286 err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid); 1286 err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid);
1287 if (err < 0) 1287 if (err < 0)
1288 return err; 1288 return err;
@@ -2816,7 +2816,7 @@ static int stac92xx_auto_create_multi_out_ctls(struct hda_codec *codec,
2816 static const char *chname[4] = { 2816 static const char *chname[4] = {
2817 "Front", "Surround", NULL /*CLFE*/, "Side" 2817 "Front", "Surround", NULL /*CLFE*/, "Side"
2818 }; 2818 };
2819 hda_nid_t nid; 2819 hda_nid_t nid = 0;
2820 int i, err; 2820 int i, err;
2821 2821
2822 struct sigmatel_spec *spec = codec->spec; 2822 struct sigmatel_spec *spec = codec->spec;