aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/sound/alsa/HD-Audio.txt16
-rw-r--r--sound/pci/hda/hda_intel.c1
-rw-r--r--sound/pci/hda/patch_analog.c8
-rw-r--r--sound/pci/hda/patch_realtek.c164
4 files changed, 138 insertions, 51 deletions
diff --git a/Documentation/sound/alsa/HD-Audio.txt b/Documentation/sound/alsa/HD-Audio.txt
index f4dd3bf99d12..98d14cb8a85d 100644
--- a/Documentation/sound/alsa/HD-Audio.txt
+++ b/Documentation/sound/alsa/HD-Audio.txt
@@ -119,10 +119,18 @@ the codec slots 0 and 1 no matter what the hardware reports.
119 119
120Interrupt Handling 120Interrupt Handling
121~~~~~~~~~~~~~~~~~~ 121~~~~~~~~~~~~~~~~~~
122In rare but some cases, the interrupt isn't properly handled as 122HD-audio driver uses MSI as default (if available) since 2.6.33
123default. You would notice this by the DMA transfer error reported by 123kernel as MSI works better on some machines, and in general, it's
124ALSA PCM core, for example. Using MSI might help in such a case. 124better for performance. However, Nvidia controllers showed bad
125Pass `enable_msi=1` option for enabling MSI. 125regressions with MSI (especially in a combination with AMD chipset),
126thus we disabled MSI for them.
127
128There seem also still other devices that don't work with MSI. If you
129see a regression wrt the sound quality (stuttering, etc) or a lock-up
130in the recent kernel, try to pass `enable_msi=0` option to disable
131MSI. If it works, you can add the known bad device to the blacklist
132defined in hda_intel.c. In such a case, please report and give the
133patch back to the upstream developer.
126 134
127 135
128HD-AUDIO CODEC 136HD-AUDIO CODEC
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 4bb90675f70f..f8fd586ae024 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2362,6 +2362,7 @@ static struct snd_pci_quirk msi_black_list[] __devinitdata = {
2362 SND_PCI_QUIRK(0x1043, 0x81f6, "ASUS", 0), /* nvidia */ 2362 SND_PCI_QUIRK(0x1043, 0x81f6, "ASUS", 0), /* nvidia */
2363 SND_PCI_QUIRK(0x1043, 0x822d, "ASUS", 0), /* Athlon64 X2 + nvidia MCP55 */ 2363 SND_PCI_QUIRK(0x1043, 0x822d, "ASUS", 0), /* Athlon64 X2 + nvidia MCP55 */
2364 SND_PCI_QUIRK(0x1849, 0x0888, "ASRock", 0), /* Athlon64 X2 + nvidia */ 2364 SND_PCI_QUIRK(0x1849, 0x0888, "ASRock", 0), /* Athlon64 X2 + nvidia */
2365 SND_PCI_QUIRK(0xa0a0, 0x0575, "Aopen MZ915-M", 0), /* ICH6 */
2365 {} 2366 {}
2366}; 2367};
2367 2368
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index e6d1bdff1b6e..af34606c30c3 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -1896,6 +1896,14 @@ static int patch_ad1981(struct hda_codec *codec)
1896 case AD1981_THINKPAD: 1896 case AD1981_THINKPAD:
1897 spec->mixers[0] = ad1981_thinkpad_mixers; 1897 spec->mixers[0] = ad1981_thinkpad_mixers;
1898 spec->input_mux = &ad1981_thinkpad_capture_source; 1898 spec->input_mux = &ad1981_thinkpad_capture_source;
1899 /* set the upper-limit for mixer amp to 0dB for avoiding the
1900 * possible damage by overloading
1901 */
1902 snd_hda_override_amp_caps(codec, 0x11, HDA_INPUT,
1903 (0x17 << AC_AMPCAP_OFFSET_SHIFT) |
1904 (0x17 << AC_AMPCAP_NUM_STEPS_SHIFT) |
1905 (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) |
1906 (1 << AC_AMPCAP_MUTE_SHIFT));
1899 break; 1907 break;
1900 case AD1981_TOSHIBA: 1908 case AD1981_TOSHIBA:
1901 spec->mixers[0] = ad1981_hp_mixers; 1909 spec->mixers[0] = ad1981_hp_mixers;
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 9a23444e9e7a..c7730dbb9ddb 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1621,6 +1621,11 @@ static struct hda_verb alc888_acer_aspire_4930g_verbs[] = {
1621 */ 1621 */
1622 1622
1623static struct hda_verb alc888_acer_aspire_6530g_verbs[] = { 1623static struct hda_verb alc888_acer_aspire_6530g_verbs[] = {
1624/* Route to built-in subwoofer as well as speakers */
1625 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
1626 {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
1627 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
1628 {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
1624/* Bias voltage on for external mic port */ 1629/* Bias voltage on for external mic port */
1625 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN | PIN_VREF80}, 1630 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN | PIN_VREF80},
1626/* Front Mic: set to PIN_IN (empty by default) */ 1631/* Front Mic: set to PIN_IN (empty by default) */
@@ -1632,10 +1637,12 @@ static struct hda_verb alc888_acer_aspire_6530g_verbs[] = {
1632/* Enable speaker output */ 1637/* Enable speaker output */
1633 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, 1638 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1634 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, 1639 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1640 {0x14, AC_VERB_SET_EAPD_BTLENABLE, 2},
1635/* Enable headphone output */ 1641/* Enable headphone output */
1636 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT | PIN_HP}, 1642 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT | PIN_HP},
1637 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, 1643 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1638 {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, 1644 {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
1645 {0x15, AC_VERB_SET_EAPD_BTLENABLE, 2},
1639 { } 1646 { }
1640}; 1647};
1641 1648
@@ -4984,6 +4991,70 @@ static void set_capture_mixer(struct hda_codec *codec)
4984 } 4991 }
4985} 4992}
4986 4993
4994/* fill adc_nids (and capsrc_nids) containing all active input pins */
4995static void fillup_priv_adc_nids(struct hda_codec *codec, hda_nid_t *nids,
4996 int num_nids)
4997{
4998 struct alc_spec *spec = codec->spec;
4999 int n;
5000 hda_nid_t fallback_adc = 0, fallback_cap = 0;
5001
5002 for (n = 0; n < num_nids; n++) {
5003 hda_nid_t adc, cap;
5004 hda_nid_t conn[HDA_MAX_NUM_INPUTS];
5005 int nconns, i, j;
5006
5007 adc = nids[n];
5008 if (get_wcaps_type(get_wcaps(codec, adc)) != AC_WID_AUD_IN)
5009 continue;
5010 cap = adc;
5011 nconns = snd_hda_get_connections(codec, cap, conn,
5012 ARRAY_SIZE(conn));
5013 if (nconns == 1) {
5014 cap = conn[0];
5015 nconns = snd_hda_get_connections(codec, cap, conn,
5016 ARRAY_SIZE(conn));
5017 }
5018 if (nconns <= 0)
5019 continue;
5020 if (!fallback_adc) {
5021 fallback_adc = adc;
5022 fallback_cap = cap;
5023 }
5024 for (i = 0; i < AUTO_PIN_LAST; i++) {
5025 hda_nid_t nid = spec->autocfg.input_pins[i];
5026 if (!nid)
5027 continue;
5028 for (j = 0; j < nconns; j++) {
5029 if (conn[j] == nid)
5030 break;
5031 }
5032 if (j >= nconns)
5033 break;
5034 }
5035 if (i >= AUTO_PIN_LAST) {
5036 int num_adcs = spec->num_adc_nids;
5037 spec->private_adc_nids[num_adcs] = adc;
5038 spec->private_capsrc_nids[num_adcs] = cap;
5039 spec->num_adc_nids++;
5040 spec->adc_nids = spec->private_adc_nids;
5041 if (adc != cap)
5042 spec->capsrc_nids = spec->private_capsrc_nids;
5043 }
5044 }
5045 if (!spec->num_adc_nids) {
5046 printk(KERN_WARNING "hda_codec: %s: no valid ADC found;"
5047 " using fallback 0x%x\n",
5048 codec->chip_name, fallback_adc);
5049 spec->private_adc_nids[0] = fallback_adc;
5050 spec->adc_nids = spec->private_adc_nids;
5051 if (fallback_adc != fallback_cap) {
5052 spec->private_capsrc_nids[0] = fallback_cap;
5053 spec->capsrc_nids = spec->private_adc_nids;
5054 }
5055 }
5056}
5057
4987#ifdef CONFIG_SND_HDA_INPUT_BEEP 5058#ifdef CONFIG_SND_HDA_INPUT_BEEP
4988#define set_beep_amp(spec, nid, idx, dir) \ 5059#define set_beep_amp(spec, nid, idx, dir) \
4989 ((spec)->beep_amp = HDA_COMPOSE_AMP_VAL(nid, 3, idx, dir)) 5060 ((spec)->beep_amp = HDA_COMPOSE_AMP_VAL(nid, 3, idx, dir))
@@ -8398,9 +8469,7 @@ static struct snd_kcontrol_new alc883_acer_aspire_mixer[] = {
8398 8469
8399static struct snd_kcontrol_new alc888_acer_aspire_6530_mixer[] = { 8470static struct snd_kcontrol_new alc888_acer_aspire_6530_mixer[] = {
8400 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 8471 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
8401 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
8402 HDA_CODEC_VOLUME("LFE Playback Volume", 0x0f, 0x0, HDA_OUTPUT), 8472 HDA_CODEC_VOLUME("LFE Playback Volume", 0x0f, 0x0, HDA_OUTPUT),
8403 HDA_BIND_MUTE("LFE Playback Switch", 0x0f, 2, HDA_INPUT),
8404 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), 8473 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
8405 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), 8474 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
8406 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), 8475 HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
@@ -10041,13 +10110,12 @@ static void alc882_auto_set_output_and_unmute(struct hda_codec *codec,
10041 int idx; 10110 int idx;
10042 10111
10043 alc_set_pin_output(codec, nid, pin_type); 10112 alc_set_pin_output(codec, nid, pin_type);
10113 if (dac_idx >= spec->multiout.num_dacs)
10114 return;
10044 if (spec->multiout.dac_nids[dac_idx] == 0x25) 10115 if (spec->multiout.dac_nids[dac_idx] == 0x25)
10045 idx = 4; 10116 idx = 4;
10046 else { 10117 else
10047 if (spec->multiout.num_dacs >= dac_idx)
10048 return;
10049 idx = spec->multiout.dac_nids[dac_idx] - 2; 10118 idx = spec->multiout.dac_nids[dac_idx] - 2;
10050 }
10051 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CONNECT_SEL, idx); 10119 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CONNECT_SEL, idx);
10052 10120
10053} 10121}
@@ -12459,11 +12527,11 @@ static void alc268_aspire_one_speaker_automute(struct hda_codec *codec)
12459 unsigned char bits; 12527 unsigned char bits;
12460 12528
12461 present = snd_hda_jack_detect(codec, 0x15); 12529 present = snd_hda_jack_detect(codec, 0x15);
12462 bits = present ? AMP_IN_MUTE(0) : 0; 12530 bits = present ? HDA_AMP_MUTE : 0;
12463 snd_hda_codec_amp_stereo(codec, 0x0f, HDA_INPUT, 0, 12531 snd_hda_codec_amp_stereo(codec, 0x0f, HDA_INPUT, 0,
12464 AMP_IN_MUTE(0), bits); 12532 HDA_AMP_MUTE, bits);
12465 snd_hda_codec_amp_stereo(codec, 0x0f, HDA_INPUT, 1, 12533 snd_hda_codec_amp_stereo(codec, 0x0f, HDA_INPUT, 1,
12466 AMP_IN_MUTE(0), bits); 12534 HDA_AMP_MUTE, bits);
12467} 12535}
12468 12536
12469static void alc268_acer_lc_unsol_event(struct hda_codec *codec, 12537static void alc268_acer_lc_unsol_event(struct hda_codec *codec,
@@ -13333,9 +13401,9 @@ static hda_nid_t alc269vb_capsrc_nids[1] = {
13333 0x22, 13401 0x22,
13334}; 13402};
13335 13403
13336/* NOTE: ADC2 (0x07) is connected from a recording *MIXER* (0x24), 13404static hda_nid_t alc269_adc_candidates[] = {
13337 * not a mux! 13405 0x08, 0x09, 0x07,
13338 */ 13406};
13339 13407
13340#define alc269_modes alc260_modes 13408#define alc269_modes alc260_modes
13341#define alc269_capture_source alc880_lg_lw_capture_source 13409#define alc269_capture_source alc880_lg_lw_capture_source
@@ -13482,11 +13550,11 @@ static void alc269_quanta_fl1_speaker_automute(struct hda_codec *codec)
13482 unsigned char bits; 13550 unsigned char bits;
13483 13551
13484 present = snd_hda_jack_detect(codec, 0x15); 13552 present = snd_hda_jack_detect(codec, 0x15);
13485 bits = present ? AMP_IN_MUTE(0) : 0; 13553 bits = present ? HDA_AMP_MUTE : 0;
13486 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, 13554 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0,
13487 AMP_IN_MUTE(0), bits); 13555 HDA_AMP_MUTE, bits);
13488 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, 13556 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1,
13489 AMP_IN_MUTE(0), bits); 13557 HDA_AMP_MUTE, bits);
13490 13558
13491 snd_hda_codec_write(codec, 0x20, 0, 13559 snd_hda_codec_write(codec, 0x20, 0,
13492 AC_VERB_SET_COEF_INDEX, 0x0c); 13560 AC_VERB_SET_COEF_INDEX, 0x0c);
@@ -13511,11 +13579,11 @@ static void alc269_lifebook_speaker_automute(struct hda_codec *codec)
13511 /* Check port replicator headphone socket */ 13579 /* Check port replicator headphone socket */
13512 present |= snd_hda_jack_detect(codec, 0x1a); 13580 present |= snd_hda_jack_detect(codec, 0x1a);
13513 13581
13514 bits = present ? AMP_IN_MUTE(0) : 0; 13582 bits = present ? HDA_AMP_MUTE : 0;
13515 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, 13583 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0,
13516 AMP_IN_MUTE(0), bits); 13584 HDA_AMP_MUTE, bits);
13517 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, 13585 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1,
13518 AMP_IN_MUTE(0), bits); 13586 HDA_AMP_MUTE, bits);
13519 13587
13520 snd_hda_codec_write(codec, 0x20, 0, 13588 snd_hda_codec_write(codec, 0x20, 0,
13521 AC_VERB_SET_COEF_INDEX, 0x0c); 13589 AC_VERB_SET_COEF_INDEX, 0x0c);
@@ -13646,11 +13714,11 @@ static void alc269_speaker_automute(struct hda_codec *codec)
13646 unsigned char bits; 13714 unsigned char bits;
13647 13715
13648 present = snd_hda_jack_detect(codec, nid); 13716 present = snd_hda_jack_detect(codec, nid);
13649 bits = present ? AMP_IN_MUTE(0) : 0; 13717 bits = present ? HDA_AMP_MUTE : 0;
13650 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, 13718 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0,
13651 AMP_IN_MUTE(0), bits); 13719 HDA_AMP_MUTE, bits);
13652 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, 13720 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1,
13653 AMP_IN_MUTE(0), bits); 13721 HDA_AMP_MUTE, bits);
13654} 13722}
13655 13723
13656/* unsolicited event for HP jack sensing */ 13724/* unsolicited event for HP jack sensing */
@@ -13842,7 +13910,6 @@ static int alc269_parse_auto_config(struct hda_codec *codec)
13842 struct alc_spec *spec = codec->spec; 13910 struct alc_spec *spec = codec->spec;
13843 int err; 13911 int err;
13844 static hda_nid_t alc269_ignore[] = { 0x1d, 0 }; 13912 static hda_nid_t alc269_ignore[] = { 0x1d, 0 };
13845 hda_nid_t real_capsrc_nids;
13846 13913
13847 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, 13914 err = snd_hda_parse_pin_def_config(codec, &spec->autocfg,
13848 alc269_ignore); 13915 alc269_ignore);
@@ -13866,18 +13933,19 @@ static int alc269_parse_auto_config(struct hda_codec *codec)
13866 13933
13867 if ((alc_read_coef_idx(codec, 0) & 0x00f0) == 0x0010) { 13934 if ((alc_read_coef_idx(codec, 0) & 0x00f0) == 0x0010) {
13868 add_verb(spec, alc269vb_init_verbs); 13935 add_verb(spec, alc269vb_init_verbs);
13869 real_capsrc_nids = alc269vb_capsrc_nids[0];
13870 alc_ssid_check(codec, 0, 0x1b, 0x14, 0x21); 13936 alc_ssid_check(codec, 0, 0x1b, 0x14, 0x21);
13871 } else { 13937 } else {
13872 add_verb(spec, alc269_init_verbs); 13938 add_verb(spec, alc269_init_verbs);
13873 real_capsrc_nids = alc269_capsrc_nids[0];
13874 alc_ssid_check(codec, 0x15, 0x1b, 0x14, 0); 13939 alc_ssid_check(codec, 0x15, 0x1b, 0x14, 0);
13875 } 13940 }
13876 13941
13877 spec->num_mux_defs = 1; 13942 spec->num_mux_defs = 1;
13878 spec->input_mux = &spec->private_imux[0]; 13943 spec->input_mux = &spec->private_imux[0];
13944 fillup_priv_adc_nids(codec, alc269_adc_candidates,
13945 sizeof(alc269_adc_candidates));
13946
13879 /* set default input source */ 13947 /* set default input source */
13880 snd_hda_codec_write_cache(codec, real_capsrc_nids, 13948 snd_hda_codec_write_cache(codec, spec->capsrc_nids[0],
13881 0, AC_VERB_SET_CONNECT_SEL, 13949 0, AC_VERB_SET_CONNECT_SEL,
13882 spec->input_mux->items[0].index); 13950 spec->input_mux->items[0].index);
13883 13951
@@ -14156,14 +14224,16 @@ static int patch_alc269(struct hda_codec *codec)
14156 spec->stream_digital_playback = &alc269_pcm_digital_playback; 14224 spec->stream_digital_playback = &alc269_pcm_digital_playback;
14157 spec->stream_digital_capture = &alc269_pcm_digital_capture; 14225 spec->stream_digital_capture = &alc269_pcm_digital_capture;
14158 14226
14159 if (!is_alc269vb) { 14227 if (!spec->adc_nids) { /* wasn't filled automatically? use default */
14160 spec->adc_nids = alc269_adc_nids; 14228 if (!is_alc269vb) {
14161 spec->num_adc_nids = ARRAY_SIZE(alc269_adc_nids); 14229 spec->adc_nids = alc269_adc_nids;
14162 spec->capsrc_nids = alc269_capsrc_nids; 14230 spec->num_adc_nids = ARRAY_SIZE(alc269_adc_nids);
14163 } else { 14231 spec->capsrc_nids = alc269_capsrc_nids;
14164 spec->adc_nids = alc269vb_adc_nids; 14232 } else {
14165 spec->num_adc_nids = ARRAY_SIZE(alc269vb_adc_nids); 14233 spec->adc_nids = alc269vb_adc_nids;
14166 spec->capsrc_nids = alc269vb_capsrc_nids; 14234 spec->num_adc_nids = ARRAY_SIZE(alc269vb_adc_nids);
14235 spec->capsrc_nids = alc269vb_capsrc_nids;
14236 }
14167 } 14237 }
14168 14238
14169 if (!spec->cap_mixer) 14239 if (!spec->cap_mixer)
@@ -17115,9 +17185,9 @@ static void alc663_m51va_speaker_automute(struct hda_codec *codec)
17115 present = snd_hda_jack_detect(codec, 0x21); 17185 present = snd_hda_jack_detect(codec, 0x21);
17116 bits = present ? HDA_AMP_MUTE : 0; 17186 bits = present ? HDA_AMP_MUTE : 0;
17117 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, 17187 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0,
17118 AMP_IN_MUTE(0), bits); 17188 HDA_AMP_MUTE, bits);
17119 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, 17189 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1,
17120 AMP_IN_MUTE(0), bits); 17190 HDA_AMP_MUTE, bits);
17121} 17191}
17122 17192
17123static void alc663_21jd_two_speaker_automute(struct hda_codec *codec) 17193static void alc663_21jd_two_speaker_automute(struct hda_codec *codec)
@@ -17128,13 +17198,13 @@ static void alc663_21jd_two_speaker_automute(struct hda_codec *codec)
17128 present = snd_hda_jack_detect(codec, 0x21); 17198 present = snd_hda_jack_detect(codec, 0x21);
17129 bits = present ? HDA_AMP_MUTE : 0; 17199 bits = present ? HDA_AMP_MUTE : 0;
17130 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, 17200 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0,
17131 AMP_IN_MUTE(0), bits); 17201 HDA_AMP_MUTE, bits);
17132 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, 17202 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1,
17133 AMP_IN_MUTE(0), bits); 17203 HDA_AMP_MUTE, bits);
17134 snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 0, 17204 snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 0,
17135 AMP_IN_MUTE(0), bits); 17205 HDA_AMP_MUTE, bits);
17136 snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 1, 17206 snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 1,
17137 AMP_IN_MUTE(0), bits); 17207 HDA_AMP_MUTE, bits);
17138} 17208}
17139 17209
17140static void alc663_15jd_two_speaker_automute(struct hda_codec *codec) 17210static void alc663_15jd_two_speaker_automute(struct hda_codec *codec)
@@ -17145,13 +17215,13 @@ static void alc663_15jd_two_speaker_automute(struct hda_codec *codec)
17145 present = snd_hda_jack_detect(codec, 0x15); 17215 present = snd_hda_jack_detect(codec, 0x15);
17146 bits = present ? HDA_AMP_MUTE : 0; 17216 bits = present ? HDA_AMP_MUTE : 0;
17147 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, 17217 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0,
17148 AMP_IN_MUTE(0), bits); 17218 HDA_AMP_MUTE, bits);
17149 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, 17219 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1,
17150 AMP_IN_MUTE(0), bits); 17220 HDA_AMP_MUTE, bits);
17151 snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 0, 17221 snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 0,
17152 AMP_IN_MUTE(0), bits); 17222 HDA_AMP_MUTE, bits);
17153 snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 1, 17223 snd_hda_codec_amp_stereo(codec, 0x0e, HDA_INPUT, 1,
17154 AMP_IN_MUTE(0), bits); 17224 HDA_AMP_MUTE, bits);
17155} 17225}
17156 17226
17157static void alc662_f5z_speaker_automute(struct hda_codec *codec) 17227static void alc662_f5z_speaker_automute(struct hda_codec *codec)
@@ -17190,14 +17260,14 @@ static void alc663_two_hp_m2_speaker_automute(struct hda_codec *codec)
17190 17260
17191 if (present1 || present2) { 17261 if (present1 || present2) {
17192 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, 17262 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0,
17193 AMP_IN_MUTE(0), AMP_IN_MUTE(0)); 17263 HDA_AMP_MUTE, HDA_AMP_MUTE);
17194 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, 17264 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1,
17195 AMP_IN_MUTE(0), AMP_IN_MUTE(0)); 17265 HDA_AMP_MUTE, HDA_AMP_MUTE);
17196 } else { 17266 } else {
17197 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0, 17267 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 0,
17198 AMP_IN_MUTE(0), 0); 17268 HDA_AMP_MUTE, 0);
17199 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1, 17269 snd_hda_codec_amp_stereo(codec, 0x0c, HDA_INPUT, 1,
17200 AMP_IN_MUTE(0), 0); 17270 HDA_AMP_MUTE, 0);
17201 } 17271 }
17202} 17272}
17203 17273