diff options
-rw-r--r-- | Documentation/sound/alsa/HD-Audio-Models.txt | 1 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.c | 3 | ||||
-rw-r--r-- | sound/pci/hda/patch_analog.c | 72 | ||||
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 108 | ||||
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 92 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 693 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 17 |
7 files changed, 549 insertions, 437 deletions
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt index 37c6aad5e590..16ae4300c747 100644 --- a/Documentation/sound/alsa/HD-Audio-Models.txt +++ b/Documentation/sound/alsa/HD-Audio-Models.txt | |||
@@ -149,7 +149,6 @@ ALC882/883/885/888/889 | |||
149 | acer-aspire-7730g Acer Aspire 7730G | 149 | acer-aspire-7730g Acer Aspire 7730G |
150 | acer-aspire-8930g Acer Aspire 8930G | 150 | acer-aspire-8930g Acer Aspire 8930G |
151 | medion Medion Laptops | 151 | medion Medion Laptops |
152 | medion-md2 Medion MD2 | ||
153 | targa-dig Targa/MSI | 152 | targa-dig Targa/MSI |
154 | targa-2ch-dig Targa/MSI with 2-channel | 153 | targa-2ch-dig Targa/MSI with 2-channel |
155 | targa-8ch-dig Targa/MSI with 8-channel (MSI GX620) | 154 | targa-8ch-dig Targa/MSI with 8-channel (MSI GX620) |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 98b6d02a36c9..05e5ec88c2d9 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -4571,6 +4571,9 @@ int snd_hda_parse_pin_def_config(struct hda_codec *codec, | |||
4571 | } | 4571 | } |
4572 | memset(cfg->hp_pins + cfg->hp_outs, 0, | 4572 | memset(cfg->hp_pins + cfg->hp_outs, 0, |
4573 | sizeof(hda_nid_t) * (AUTO_CFG_MAX_OUTS - cfg->hp_outs)); | 4573 | sizeof(hda_nid_t) * (AUTO_CFG_MAX_OUTS - cfg->hp_outs)); |
4574 | if (!cfg->hp_outs) | ||
4575 | cfg->line_out_type = AUTO_PIN_HP_OUT; | ||
4576 | |||
4574 | } | 4577 | } |
4575 | 4578 | ||
4576 | /* sort by sequence */ | 4579 | /* sort by sequence */ |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index f7ff3f7ccb8e..46780670162b 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -666,7 +666,7 @@ static struct snd_kcontrol_new ad1986a_mixers[] = { | |||
666 | HDA_CODEC_MUTE("Aux Playback Switch", 0x16, 0x0, HDA_OUTPUT), | 666 | HDA_CODEC_MUTE("Aux Playback Switch", 0x16, 0x0, HDA_OUTPUT), |
667 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT), | 667 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT), |
668 | HDA_CODEC_MUTE("Mic Playback Switch", 0x13, 0x0, HDA_OUTPUT), | 668 | HDA_CODEC_MUTE("Mic Playback Switch", 0x13, 0x0, HDA_OUTPUT), |
669 | HDA_CODEC_VOLUME("Mic Boost", 0x0f, 0x0, HDA_OUTPUT), | 669 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x0f, 0x0, HDA_OUTPUT), |
670 | HDA_CODEC_VOLUME("Mono Playback Volume", 0x1e, 0x0, HDA_OUTPUT), | 670 | HDA_CODEC_VOLUME("Mono Playback Volume", 0x1e, 0x0, HDA_OUTPUT), |
671 | HDA_CODEC_MUTE("Mono Playback Switch", 0x1e, 0x0, HDA_OUTPUT), | 671 | HDA_CODEC_MUTE("Mono Playback Switch", 0x1e, 0x0, HDA_OUTPUT), |
672 | HDA_CODEC_VOLUME("Capture Volume", 0x12, 0x0, HDA_OUTPUT), | 672 | HDA_CODEC_VOLUME("Capture Volume", 0x12, 0x0, HDA_OUTPUT), |
@@ -729,7 +729,7 @@ static struct snd_kcontrol_new ad1986a_laptop_mixers[] = { | |||
729 | HDA_CODEC_MUTE("Aux Playback Switch", 0x16, 0x0, HDA_OUTPUT), | 729 | HDA_CODEC_MUTE("Aux Playback Switch", 0x16, 0x0, HDA_OUTPUT), |
730 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT), | 730 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT), |
731 | HDA_CODEC_MUTE("Mic Playback Switch", 0x13, 0x0, HDA_OUTPUT), | 731 | HDA_CODEC_MUTE("Mic Playback Switch", 0x13, 0x0, HDA_OUTPUT), |
732 | HDA_CODEC_VOLUME("Mic Boost", 0x0f, 0x0, HDA_OUTPUT), | 732 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x0f, 0x0, HDA_OUTPUT), |
733 | /* | 733 | /* |
734 | HDA_CODEC_VOLUME("Mono Playback Volume", 0x1e, 0x0, HDA_OUTPUT), | 734 | HDA_CODEC_VOLUME("Mono Playback Volume", 0x1e, 0x0, HDA_OUTPUT), |
735 | HDA_CODEC_MUTE("Mono Playback Switch", 0x1e, 0x0, HDA_OUTPUT), */ | 735 | HDA_CODEC_MUTE("Mono Playback Switch", 0x1e, 0x0, HDA_OUTPUT), */ |
@@ -775,7 +775,7 @@ static struct snd_kcontrol_new ad1986a_laptop_eapd_mixers[] = { | |||
775 | HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT), | 775 | HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT), |
776 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT), | 776 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT), |
777 | HDA_CODEC_MUTE("Mic Playback Switch", 0x13, 0x0, HDA_OUTPUT), | 777 | HDA_CODEC_MUTE("Mic Playback Switch", 0x13, 0x0, HDA_OUTPUT), |
778 | HDA_CODEC_VOLUME("Mic Boost", 0x0f, 0x0, HDA_OUTPUT), | 778 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x0f, 0x0, HDA_OUTPUT), |
779 | HDA_CODEC_VOLUME("Capture Volume", 0x12, 0x0, HDA_OUTPUT), | 779 | HDA_CODEC_VOLUME("Capture Volume", 0x12, 0x0, HDA_OUTPUT), |
780 | HDA_CODEC_MUTE("Capture Switch", 0x12, 0x0, HDA_OUTPUT), | 780 | HDA_CODEC_MUTE("Capture Switch", 0x12, 0x0, HDA_OUTPUT), |
781 | { | 781 | { |
@@ -1358,7 +1358,7 @@ static struct snd_kcontrol_new ad1983_mixers[] = { | |||
1358 | HDA_CODEC_MUTE("Mic Playback Switch", 0x12, 0x0, HDA_OUTPUT), | 1358 | HDA_CODEC_MUTE("Mic Playback Switch", 0x12, 0x0, HDA_OUTPUT), |
1359 | HDA_CODEC_VOLUME("Line Playback Volume", 0x13, 0x0, HDA_OUTPUT), | 1359 | HDA_CODEC_VOLUME("Line Playback Volume", 0x13, 0x0, HDA_OUTPUT), |
1360 | HDA_CODEC_MUTE("Line Playback Switch", 0x13, 0x0, HDA_OUTPUT), | 1360 | HDA_CODEC_MUTE("Line Playback Switch", 0x13, 0x0, HDA_OUTPUT), |
1361 | HDA_CODEC_VOLUME("Mic Boost", 0x0c, 0x0, HDA_OUTPUT), | 1361 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x0c, 0x0, HDA_OUTPUT), |
1362 | HDA_CODEC_VOLUME("Capture Volume", 0x15, 0x0, HDA_OUTPUT), | 1362 | HDA_CODEC_VOLUME("Capture Volume", 0x15, 0x0, HDA_OUTPUT), |
1363 | HDA_CODEC_MUTE("Capture Switch", 0x15, 0x0, HDA_OUTPUT), | 1363 | HDA_CODEC_MUTE("Capture Switch", 0x15, 0x0, HDA_OUTPUT), |
1364 | { | 1364 | { |
@@ -1515,8 +1515,8 @@ static struct snd_kcontrol_new ad1981_mixers[] = { | |||
1515 | HDA_CODEC_MUTE("Mic Playback Switch", 0x1c, 0x0, HDA_OUTPUT), | 1515 | HDA_CODEC_MUTE("Mic Playback Switch", 0x1c, 0x0, HDA_OUTPUT), |
1516 | HDA_CODEC_VOLUME("CD Playback Volume", 0x1d, 0x0, HDA_OUTPUT), | 1516 | HDA_CODEC_VOLUME("CD Playback Volume", 0x1d, 0x0, HDA_OUTPUT), |
1517 | HDA_CODEC_MUTE("CD Playback Switch", 0x1d, 0x0, HDA_OUTPUT), | 1517 | HDA_CODEC_MUTE("CD Playback Switch", 0x1d, 0x0, HDA_OUTPUT), |
1518 | HDA_CODEC_VOLUME("Front Mic Boost", 0x08, 0x0, HDA_INPUT), | 1518 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x08, 0x0, HDA_INPUT), |
1519 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0x0, HDA_INPUT), | 1519 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0x0, HDA_INPUT), |
1520 | HDA_CODEC_VOLUME("Capture Volume", 0x15, 0x0, HDA_OUTPUT), | 1520 | HDA_CODEC_VOLUME("Capture Volume", 0x15, 0x0, HDA_OUTPUT), |
1521 | HDA_CODEC_MUTE("Capture Switch", 0x15, 0x0, HDA_OUTPUT), | 1521 | HDA_CODEC_MUTE("Capture Switch", 0x15, 0x0, HDA_OUTPUT), |
1522 | { | 1522 | { |
@@ -1726,8 +1726,8 @@ static struct snd_kcontrol_new ad1981_hp_mixers[] = { | |||
1726 | HDA_CODEC_VOLUME("CD Playback Volume", 0x1d, 0x0, HDA_OUTPUT), | 1726 | HDA_CODEC_VOLUME("CD Playback Volume", 0x1d, 0x0, HDA_OUTPUT), |
1727 | HDA_CODEC_MUTE("CD Playback Switch", 0x1d, 0x0, HDA_OUTPUT), | 1727 | HDA_CODEC_MUTE("CD Playback Switch", 0x1d, 0x0, HDA_OUTPUT), |
1728 | #endif | 1728 | #endif |
1729 | HDA_CODEC_VOLUME("Mic Boost", 0x08, 0x0, HDA_INPUT), | 1729 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x08, 0x0, HDA_INPUT), |
1730 | HDA_CODEC_VOLUME("Internal Mic Boost", 0x18, 0x0, HDA_INPUT), | 1730 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x18, 0x0, HDA_INPUT), |
1731 | HDA_CODEC_VOLUME("Capture Volume", 0x15, 0x0, HDA_OUTPUT), | 1731 | HDA_CODEC_VOLUME("Capture Volume", 0x15, 0x0, HDA_OUTPUT), |
1732 | HDA_CODEC_MUTE("Capture Switch", 0x15, 0x0, HDA_OUTPUT), | 1732 | HDA_CODEC_MUTE("Capture Switch", 0x15, 0x0, HDA_OUTPUT), |
1733 | { | 1733 | { |
@@ -1774,7 +1774,7 @@ static struct snd_kcontrol_new ad1981_thinkpad_mixers[] = { | |||
1774 | HDA_CODEC_MUTE("Mic Playback Switch", 0x12, 0x0, HDA_OUTPUT), | 1774 | HDA_CODEC_MUTE("Mic Playback Switch", 0x12, 0x0, HDA_OUTPUT), |
1775 | HDA_CODEC_VOLUME("CD Playback Volume", 0x1d, 0x0, HDA_OUTPUT), | 1775 | HDA_CODEC_VOLUME("CD Playback Volume", 0x1d, 0x0, HDA_OUTPUT), |
1776 | HDA_CODEC_MUTE("CD Playback Switch", 0x1d, 0x0, HDA_OUTPUT), | 1776 | HDA_CODEC_MUTE("CD Playback Switch", 0x1d, 0x0, HDA_OUTPUT), |
1777 | HDA_CODEC_VOLUME("Mic Boost", 0x08, 0x0, HDA_INPUT), | 1777 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x08, 0x0, HDA_INPUT), |
1778 | HDA_CODEC_VOLUME("Capture Volume", 0x15, 0x0, HDA_OUTPUT), | 1778 | HDA_CODEC_VOLUME("Capture Volume", 0x15, 0x0, HDA_OUTPUT), |
1779 | HDA_CODEC_MUTE("Capture Switch", 0x15, 0x0, HDA_OUTPUT), | 1779 | HDA_CODEC_MUTE("Capture Switch", 0x15, 0x0, HDA_OUTPUT), |
1780 | { | 1780 | { |
@@ -2160,8 +2160,8 @@ static struct snd_kcontrol_new ad1988_6stack_mixers2[] = { | |||
2160 | HDA_CODEC_VOLUME("Analog Mix Playback Volume", 0x21, 0x0, HDA_OUTPUT), | 2160 | HDA_CODEC_VOLUME("Analog Mix Playback Volume", 0x21, 0x0, HDA_OUTPUT), |
2161 | HDA_CODEC_MUTE("Analog Mix Playback Switch", 0x21, 0x0, HDA_OUTPUT), | 2161 | HDA_CODEC_MUTE("Analog Mix Playback Switch", 0x21, 0x0, HDA_OUTPUT), |
2162 | 2162 | ||
2163 | HDA_CODEC_VOLUME("Front Mic Boost", 0x39, 0x0, HDA_OUTPUT), | 2163 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x39, 0x0, HDA_OUTPUT), |
2164 | HDA_CODEC_VOLUME("Mic Boost", 0x3c, 0x0, HDA_OUTPUT), | 2164 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x3c, 0x0, HDA_OUTPUT), |
2165 | 2165 | ||
2166 | { } /* end */ | 2166 | { } /* end */ |
2167 | }; | 2167 | }; |
@@ -2203,8 +2203,8 @@ static struct snd_kcontrol_new ad1988_3stack_mixers2[] = { | |||
2203 | HDA_CODEC_VOLUME("Analog Mix Playback Volume", 0x21, 0x0, HDA_OUTPUT), | 2203 | HDA_CODEC_VOLUME("Analog Mix Playback Volume", 0x21, 0x0, HDA_OUTPUT), |
2204 | HDA_CODEC_MUTE("Analog Mix Playback Switch", 0x21, 0x0, HDA_OUTPUT), | 2204 | HDA_CODEC_MUTE("Analog Mix Playback Switch", 0x21, 0x0, HDA_OUTPUT), |
2205 | 2205 | ||
2206 | HDA_CODEC_VOLUME("Front Mic Boost", 0x39, 0x0, HDA_OUTPUT), | 2206 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x39, 0x0, HDA_OUTPUT), |
2207 | HDA_CODEC_VOLUME("Mic Boost", 0x3c, 0x0, HDA_OUTPUT), | 2207 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x3c, 0x0, HDA_OUTPUT), |
2208 | { | 2208 | { |
2209 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 2209 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
2210 | .name = "Channel Mode", | 2210 | .name = "Channel Mode", |
@@ -2232,7 +2232,7 @@ static struct snd_kcontrol_new ad1988_laptop_mixers[] = { | |||
2232 | HDA_CODEC_VOLUME("Analog Mix Playback Volume", 0x21, 0x0, HDA_OUTPUT), | 2232 | HDA_CODEC_VOLUME("Analog Mix Playback Volume", 0x21, 0x0, HDA_OUTPUT), |
2233 | HDA_CODEC_MUTE("Analog Mix Playback Switch", 0x21, 0x0, HDA_OUTPUT), | 2233 | HDA_CODEC_MUTE("Analog Mix Playback Switch", 0x21, 0x0, HDA_OUTPUT), |
2234 | 2234 | ||
2235 | HDA_CODEC_VOLUME("Mic Boost", 0x39, 0x0, HDA_OUTPUT), | 2235 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x39, 0x0, HDA_OUTPUT), |
2236 | 2236 | ||
2237 | { | 2237 | { |
2238 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 2238 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
@@ -2902,7 +2902,7 @@ static int new_analog_input(struct ad198x_spec *spec, hda_nid_t pin, | |||
2902 | idx = ad1988_pin_idx(pin); | 2902 | idx = ad1988_pin_idx(pin); |
2903 | bnid = ad1988_boost_nids[idx]; | 2903 | bnid = ad1988_boost_nids[idx]; |
2904 | if (bnid) { | 2904 | if (bnid) { |
2905 | sprintf(name, "%s Boost", ctlname); | 2905 | sprintf(name, "%s Boost Volume", ctlname); |
2906 | return add_control(spec, AD_CTL_WIDGET_VOL, name, | 2906 | return add_control(spec, AD_CTL_WIDGET_VOL, name, |
2907 | HDA_COMPOSE_AMP_VAL(bnid, 3, idx, HDA_OUTPUT)); | 2907 | HDA_COMPOSE_AMP_VAL(bnid, 3, idx, HDA_OUTPUT)); |
2908 | 2908 | ||
@@ -3300,8 +3300,8 @@ static struct snd_kcontrol_new ad1884_base_mixers[] = { | |||
3300 | HDA_CODEC_MUTE("Mic Playback Switch", 0x20, 0x01, HDA_INPUT), | 3300 | HDA_CODEC_MUTE("Mic Playback Switch", 0x20, 0x01, HDA_INPUT), |
3301 | HDA_CODEC_VOLUME("CD Playback Volume", 0x20, 0x02, HDA_INPUT), | 3301 | HDA_CODEC_VOLUME("CD Playback Volume", 0x20, 0x02, HDA_INPUT), |
3302 | HDA_CODEC_MUTE("CD Playback Switch", 0x20, 0x02, HDA_INPUT), | 3302 | HDA_CODEC_MUTE("CD Playback Switch", 0x20, 0x02, HDA_INPUT), |
3303 | HDA_CODEC_VOLUME("Mic Boost", 0x15, 0x0, HDA_INPUT), | 3303 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x15, 0x0, HDA_INPUT), |
3304 | HDA_CODEC_VOLUME("Front Mic Boost", 0x14, 0x0, HDA_INPUT), | 3304 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x14, 0x0, HDA_INPUT), |
3305 | HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT), | 3305 | HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT), |
3306 | HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT), | 3306 | HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT), |
3307 | HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x0d, 0x0, HDA_OUTPUT), | 3307 | HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x0d, 0x0, HDA_OUTPUT), |
@@ -3499,9 +3499,9 @@ static struct snd_kcontrol_new ad1984_thinkpad_mixers[] = { | |||
3499 | HDA_CODEC_MUTE("Beep Playback Switch", 0x20, 0x03, HDA_INPUT), | 3499 | HDA_CODEC_MUTE("Beep Playback Switch", 0x20, 0x03, HDA_INPUT), |
3500 | HDA_CODEC_VOLUME("Docking Mic Playback Volume", 0x20, 0x04, HDA_INPUT), | 3500 | HDA_CODEC_VOLUME("Docking Mic Playback Volume", 0x20, 0x04, HDA_INPUT), |
3501 | HDA_CODEC_MUTE("Docking Mic Playback Switch", 0x20, 0x04, HDA_INPUT), | 3501 | HDA_CODEC_MUTE("Docking Mic Playback Switch", 0x20, 0x04, HDA_INPUT), |
3502 | HDA_CODEC_VOLUME("Mic Boost", 0x14, 0x0, HDA_INPUT), | 3502 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x14, 0x0, HDA_INPUT), |
3503 | HDA_CODEC_VOLUME("Internal Mic Boost", 0x15, 0x0, HDA_INPUT), | 3503 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x15, 0x0, HDA_INPUT), |
3504 | HDA_CODEC_VOLUME("Docking Mic Boost", 0x25, 0x0, HDA_OUTPUT), | 3504 | HDA_CODEC_VOLUME("Dock Mic Boost Volume", 0x25, 0x0, HDA_OUTPUT), |
3505 | HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT), | 3505 | HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT), |
3506 | HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT), | 3506 | HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT), |
3507 | HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x0d, 0x0, HDA_OUTPUT), | 3507 | HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x0d, 0x0, HDA_OUTPUT), |
@@ -3560,8 +3560,8 @@ static struct snd_kcontrol_new ad1984_dell_desktop_mixers[] = { | |||
3560 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x20, 0x00, HDA_INPUT), | 3560 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x20, 0x00, HDA_INPUT), |
3561 | HDA_CODEC_VOLUME("Line-In Playback Volume", 0x20, 0x01, HDA_INPUT), | 3561 | HDA_CODEC_VOLUME("Line-In Playback Volume", 0x20, 0x01, HDA_INPUT), |
3562 | HDA_CODEC_MUTE("Line-In Playback Switch", 0x20, 0x01, HDA_INPUT), | 3562 | HDA_CODEC_MUTE("Line-In Playback Switch", 0x20, 0x01, HDA_INPUT), |
3563 | HDA_CODEC_VOLUME("Line-In Boost", 0x15, 0x0, HDA_INPUT), | 3563 | HDA_CODEC_VOLUME("Line-In Boost Volume", 0x15, 0x0, HDA_INPUT), |
3564 | HDA_CODEC_VOLUME("Front Mic Boost", 0x14, 0x0, HDA_INPUT), | 3564 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x14, 0x0, HDA_INPUT), |
3565 | HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT), | 3565 | HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT), |
3566 | HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT), | 3566 | HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT), |
3567 | HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x0d, 0x0, HDA_OUTPUT), | 3567 | HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x0d, 0x0, HDA_OUTPUT), |
@@ -3745,9 +3745,9 @@ static struct snd_kcontrol_new ad1884a_base_mixers[] = { | |||
3745 | HDA_CODEC_MUTE("Mic Playback Switch", 0x20, 0x04, HDA_INPUT), | 3745 | HDA_CODEC_MUTE("Mic Playback Switch", 0x20, 0x04, HDA_INPUT), |
3746 | HDA_CODEC_VOLUME("CD Playback Volume", 0x20, 0x02, HDA_INPUT), | 3746 | HDA_CODEC_VOLUME("CD Playback Volume", 0x20, 0x02, HDA_INPUT), |
3747 | HDA_CODEC_MUTE("CD Playback Switch", 0x20, 0x02, HDA_INPUT), | 3747 | HDA_CODEC_MUTE("CD Playback Switch", 0x20, 0x02, HDA_INPUT), |
3748 | HDA_CODEC_VOLUME("Front Mic Boost", 0x14, 0x0, HDA_INPUT), | 3748 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x14, 0x0, HDA_INPUT), |
3749 | HDA_CODEC_VOLUME("Line Boost", 0x15, 0x0, HDA_INPUT), | 3749 | HDA_CODEC_VOLUME("Line Boost Volume", 0x15, 0x0, HDA_INPUT), |
3750 | HDA_CODEC_VOLUME("Mic Boost", 0x25, 0x0, HDA_OUTPUT), | 3750 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x25, 0x0, HDA_OUTPUT), |
3751 | HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT), | 3751 | HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT), |
3752 | HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT), | 3752 | HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT), |
3753 | HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x0d, 0x0, HDA_OUTPUT), | 3753 | HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x0d, 0x0, HDA_OUTPUT), |
@@ -3888,9 +3888,9 @@ static struct snd_kcontrol_new ad1884a_laptop_mixers[] = { | |||
3888 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x20, 0x01, HDA_INPUT), | 3888 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x20, 0x01, HDA_INPUT), |
3889 | HDA_CODEC_VOLUME("Dock Mic Playback Volume", 0x20, 0x04, HDA_INPUT), | 3889 | HDA_CODEC_VOLUME("Dock Mic Playback Volume", 0x20, 0x04, HDA_INPUT), |
3890 | HDA_CODEC_MUTE("Dock Mic Playback Switch", 0x20, 0x04, HDA_INPUT), | 3890 | HDA_CODEC_MUTE("Dock Mic Playback Switch", 0x20, 0x04, HDA_INPUT), |
3891 | HDA_CODEC_VOLUME("Mic Boost", 0x14, 0x0, HDA_INPUT), | 3891 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x14, 0x0, HDA_INPUT), |
3892 | HDA_CODEC_VOLUME("Internal Mic Boost", 0x15, 0x0, HDA_INPUT), | 3892 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x15, 0x0, HDA_INPUT), |
3893 | HDA_CODEC_VOLUME("Dock Mic Boost", 0x25, 0x0, HDA_OUTPUT), | 3893 | HDA_CODEC_VOLUME("Dock Mic Boost Volume", 0x25, 0x0, HDA_OUTPUT), |
3894 | HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT), | 3894 | HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT), |
3895 | HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT), | 3895 | HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT), |
3896 | { } /* end */ | 3896 | { } /* end */ |
@@ -4126,8 +4126,8 @@ static struct snd_kcontrol_new ad1984a_thinkpad_mixers[] = { | |||
4126 | HDA_CODEC_MUTE("PCM Playback Switch", 0x20, 0x5, HDA_INPUT), | 4126 | HDA_CODEC_MUTE("PCM Playback Switch", 0x20, 0x5, HDA_INPUT), |
4127 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x20, 0x00, HDA_INPUT), | 4127 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x20, 0x00, HDA_INPUT), |
4128 | HDA_CODEC_MUTE("Mic Playback Switch", 0x20, 0x00, HDA_INPUT), | 4128 | HDA_CODEC_MUTE("Mic Playback Switch", 0x20, 0x00, HDA_INPUT), |
4129 | HDA_CODEC_VOLUME("Mic Boost", 0x14, 0x0, HDA_INPUT), | 4129 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x14, 0x0, HDA_INPUT), |
4130 | HDA_CODEC_VOLUME("Internal Mic Boost", 0x17, 0x0, HDA_INPUT), | 4130 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x17, 0x0, HDA_INPUT), |
4131 | HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT), | 4131 | HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT), |
4132 | HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT), | 4132 | HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT), |
4133 | { | 4133 | { |
@@ -4255,8 +4255,8 @@ static struct snd_kcontrol_new ad1984a_touchsmart_mixers[] = { | |||
4255 | HDA_CODEC_MUTE("PCM Playback Switch", 0x20, 0x5, HDA_INPUT), | 4255 | HDA_CODEC_MUTE("PCM Playback Switch", 0x20, 0x5, HDA_INPUT), |
4256 | HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT), | 4256 | HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT), |
4257 | HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT), | 4257 | HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT), |
4258 | HDA_CODEC_VOLUME("Mic Boost", 0x25, 0x0, HDA_OUTPUT), | 4258 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x25, 0x0, HDA_OUTPUT), |
4259 | HDA_CODEC_VOLUME("Internal Mic Boost", 0x17, 0x0, HDA_INPUT), | 4259 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x17, 0x0, HDA_INPUT), |
4260 | { } /* end */ | 4260 | { } /* end */ |
4261 | }; | 4261 | }; |
4262 | 4262 | ||
@@ -4494,9 +4494,9 @@ static struct snd_kcontrol_new ad1882_base_mixers[] = { | |||
4494 | HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x13, 1, 0x0, HDA_OUTPUT), | 4494 | HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x13, 1, 0x0, HDA_OUTPUT), |
4495 | HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x13, 1, 0x0, HDA_OUTPUT), | 4495 | HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x13, 1, 0x0, HDA_OUTPUT), |
4496 | 4496 | ||
4497 | HDA_CODEC_VOLUME("Mic Boost", 0x3c, 0x0, HDA_OUTPUT), | 4497 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x3c, 0x0, HDA_OUTPUT), |
4498 | HDA_CODEC_VOLUME("Front Mic Boost", 0x39, 0x0, HDA_OUTPUT), | 4498 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x39, 0x0, HDA_OUTPUT), |
4499 | HDA_CODEC_VOLUME("Line-In Boost", 0x3a, 0x0, HDA_OUTPUT), | 4499 | HDA_CODEC_VOLUME("Line-In Boost Volume", 0x3a, 0x0, HDA_OUTPUT), |
4500 | HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT), | 4500 | HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT), |
4501 | HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT), | 4501 | HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT), |
4502 | HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x0d, 0x0, HDA_OUTPUT), | 4502 | HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x0d, 0x0, HDA_OUTPUT), |
@@ -4547,7 +4547,7 @@ static struct snd_kcontrol_new ad1882a_loopback_mixers[] = { | |||
4547 | HDA_CODEC_MUTE("Line Playback Switch", 0x20, 0x01, HDA_INPUT), | 4547 | HDA_CODEC_MUTE("Line Playback Switch", 0x20, 0x01, HDA_INPUT), |
4548 | HDA_CODEC_VOLUME("CD Playback Volume", 0x20, 0x06, HDA_INPUT), | 4548 | HDA_CODEC_VOLUME("CD Playback Volume", 0x20, 0x06, HDA_INPUT), |
4549 | HDA_CODEC_MUTE("CD Playback Switch", 0x20, 0x06, HDA_INPUT), | 4549 | HDA_CODEC_MUTE("CD Playback Switch", 0x20, 0x06, HDA_INPUT), |
4550 | HDA_CODEC_VOLUME("Digital Mic Boost", 0x1f, 0x0, HDA_INPUT), | 4550 | HDA_CODEC_VOLUME("Digital Mic Boost Volume", 0x1f, 0x0, HDA_INPUT), |
4551 | { } /* end */ | 4551 | { } /* end */ |
4552 | }; | 4552 | }; |
4553 | 4553 | ||
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 76bd58a0e2b6..e96581fcdbdb 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -869,16 +869,16 @@ static void cxt5045_hp_unsol_event(struct hda_codec *codec, | |||
869 | } | 869 | } |
870 | 870 | ||
871 | static struct snd_kcontrol_new cxt5045_mixers[] = { | 871 | static struct snd_kcontrol_new cxt5045_mixers[] = { |
872 | HDA_CODEC_VOLUME("Int Mic Capture Volume", 0x1a, 0x01, HDA_INPUT), | 872 | HDA_CODEC_VOLUME("Internal Mic Capture Volume", 0x1a, 0x01, HDA_INPUT), |
873 | HDA_CODEC_MUTE("Int Mic Capture Switch", 0x1a, 0x01, HDA_INPUT), | 873 | HDA_CODEC_MUTE("Internal Mic Capture Switch", 0x1a, 0x01, HDA_INPUT), |
874 | HDA_CODEC_VOLUME("Ext Mic Capture Volume", 0x1a, 0x02, HDA_INPUT), | 874 | HDA_CODEC_VOLUME("Mic Capture Volume", 0x1a, 0x02, HDA_INPUT), |
875 | HDA_CODEC_MUTE("Ext Mic Capture Switch", 0x1a, 0x02, HDA_INPUT), | 875 | HDA_CODEC_MUTE("Mic Capture Switch", 0x1a, 0x02, HDA_INPUT), |
876 | HDA_CODEC_VOLUME("PCM Playback Volume", 0x17, 0x0, HDA_INPUT), | 876 | HDA_CODEC_VOLUME("PCM Playback Volume", 0x17, 0x0, HDA_INPUT), |
877 | HDA_CODEC_MUTE("PCM Playback Switch", 0x17, 0x0, HDA_INPUT), | 877 | HDA_CODEC_MUTE("PCM Playback Switch", 0x17, 0x0, HDA_INPUT), |
878 | HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x17, 0x1, HDA_INPUT), | 878 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0x1, HDA_INPUT), |
879 | HDA_CODEC_MUTE("Int Mic Playback Switch", 0x17, 0x1, HDA_INPUT), | 879 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x17, 0x1, HDA_INPUT), |
880 | HDA_CODEC_VOLUME("Ext Mic Playback Volume", 0x17, 0x2, HDA_INPUT), | 880 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x17, 0x2, HDA_INPUT), |
881 | HDA_CODEC_MUTE("Ext Mic Playback Switch", 0x17, 0x2, HDA_INPUT), | 881 | HDA_CODEC_MUTE("Mic Playback Switch", 0x17, 0x2, HDA_INPUT), |
882 | HDA_BIND_VOL("Master Playback Volume", &cxt5045_hp_bind_master_vol), | 882 | HDA_BIND_VOL("Master Playback Volume", &cxt5045_hp_bind_master_vol), |
883 | { | 883 | { |
884 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 884 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
@@ -910,16 +910,16 @@ static struct snd_kcontrol_new cxt5045_benq_mixers[] = { | |||
910 | }; | 910 | }; |
911 | 911 | ||
912 | static struct snd_kcontrol_new cxt5045_mixers_hp530[] = { | 912 | static struct snd_kcontrol_new cxt5045_mixers_hp530[] = { |
913 | HDA_CODEC_VOLUME("Int Mic Capture Volume", 0x1a, 0x02, HDA_INPUT), | 913 | HDA_CODEC_VOLUME("Internal Mic Capture Volume", 0x1a, 0x02, HDA_INPUT), |
914 | HDA_CODEC_MUTE("Int Mic Capture Switch", 0x1a, 0x02, HDA_INPUT), | 914 | HDA_CODEC_MUTE("Internal Mic Capture Switch", 0x1a, 0x02, HDA_INPUT), |
915 | HDA_CODEC_VOLUME("Ext Mic Capture Volume", 0x1a, 0x01, HDA_INPUT), | 915 | HDA_CODEC_VOLUME("Mic Capture Volume", 0x1a, 0x01, HDA_INPUT), |
916 | HDA_CODEC_MUTE("Ext Mic Capture Switch", 0x1a, 0x01, HDA_INPUT), | 916 | HDA_CODEC_MUTE("Mic Capture Switch", 0x1a, 0x01, HDA_INPUT), |
917 | HDA_CODEC_VOLUME("PCM Playback Volume", 0x17, 0x0, HDA_INPUT), | 917 | HDA_CODEC_VOLUME("PCM Playback Volume", 0x17, 0x0, HDA_INPUT), |
918 | HDA_CODEC_MUTE("PCM Playback Switch", 0x17, 0x0, HDA_INPUT), | 918 | HDA_CODEC_MUTE("PCM Playback Switch", 0x17, 0x0, HDA_INPUT), |
919 | HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x17, 0x2, HDA_INPUT), | 919 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0x2, HDA_INPUT), |
920 | HDA_CODEC_MUTE("Int Mic Playback Switch", 0x17, 0x2, HDA_INPUT), | 920 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x17, 0x2, HDA_INPUT), |
921 | HDA_CODEC_VOLUME("Ext Mic Playback Volume", 0x17, 0x1, HDA_INPUT), | 921 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x17, 0x1, HDA_INPUT), |
922 | HDA_CODEC_MUTE("Ext Mic Playback Switch", 0x17, 0x1, HDA_INPUT), | 922 | HDA_CODEC_MUTE("Mic Playback Switch", 0x17, 0x1, HDA_INPUT), |
923 | HDA_BIND_VOL("Master Playback Volume", &cxt5045_hp_bind_master_vol), | 923 | HDA_BIND_VOL("Master Playback Volume", &cxt5045_hp_bind_master_vol), |
924 | { | 924 | { |
925 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 925 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
@@ -947,7 +947,7 @@ static struct hda_verb cxt5045_init_verbs[] = { | |||
947 | {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, | 947 | {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, |
948 | {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, | 948 | {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, |
949 | {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, | 949 | {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, |
950 | /* Record selector: Int mic */ | 950 | /* Record selector: Internal mic */ |
951 | {0x1a, AC_VERB_SET_CONNECT_SEL,0x1}, | 951 | {0x1a, AC_VERB_SET_CONNECT_SEL,0x1}, |
952 | {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, | 952 | {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, |
953 | AC_AMP_SET_INPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x17}, | 953 | AC_AMP_SET_INPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x17}, |
@@ -960,7 +960,7 @@ static struct hda_verb cxt5045_init_verbs[] = { | |||
960 | }; | 960 | }; |
961 | 961 | ||
962 | static struct hda_verb cxt5045_benq_init_verbs[] = { | 962 | static struct hda_verb cxt5045_benq_init_verbs[] = { |
963 | /* Int Mic, Mic */ | 963 | /* Internal Mic, Mic */ |
964 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_80 }, | 964 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_80 }, |
965 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_80 }, | 965 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_80 }, |
966 | /* Line In,HP, Amp */ | 966 | /* Line In,HP, Amp */ |
@@ -973,7 +973,7 @@ static struct hda_verb cxt5045_benq_init_verbs[] = { | |||
973 | {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, | 973 | {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, |
974 | {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, | 974 | {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, |
975 | {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, | 975 | {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, |
976 | /* Record selector: Int mic */ | 976 | /* Record selector: Internal mic */ |
977 | {0x1a, AC_VERB_SET_CONNECT_SEL, 0x1}, | 977 | {0x1a, AC_VERB_SET_CONNECT_SEL, 0x1}, |
978 | {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, | 978 | {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, |
979 | AC_AMP_SET_INPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x17}, | 979 | AC_AMP_SET_INPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x17}, |
@@ -1376,7 +1376,7 @@ static void cxt5047_hp_unsol_event(struct hda_codec *codec, | |||
1376 | static struct snd_kcontrol_new cxt5047_base_mixers[] = { | 1376 | static struct snd_kcontrol_new cxt5047_base_mixers[] = { |
1377 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x19, 0x02, HDA_INPUT), | 1377 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x19, 0x02, HDA_INPUT), |
1378 | HDA_CODEC_MUTE("Mic Playback Switch", 0x19, 0x02, HDA_INPUT), | 1378 | HDA_CODEC_MUTE("Mic Playback Switch", 0x19, 0x02, HDA_INPUT), |
1379 | HDA_CODEC_VOLUME("Mic Boost", 0x1a, 0x0, HDA_OUTPUT), | 1379 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x1a, 0x0, HDA_OUTPUT), |
1380 | HDA_CODEC_VOLUME("Capture Volume", 0x12, 0x03, HDA_INPUT), | 1380 | HDA_CODEC_VOLUME("Capture Volume", 0x12, 0x03, HDA_INPUT), |
1381 | HDA_CODEC_MUTE("Capture Switch", 0x12, 0x03, HDA_INPUT), | 1381 | HDA_CODEC_MUTE("Capture Switch", 0x12, 0x03, HDA_INPUT), |
1382 | HDA_CODEC_VOLUME("PCM Volume", 0x10, 0x00, HDA_OUTPUT), | 1382 | HDA_CODEC_VOLUME("PCM Volume", 0x10, 0x00, HDA_OUTPUT), |
@@ -1796,8 +1796,8 @@ static struct snd_kcontrol_new cxt5051_playback_mixers[] = { | |||
1796 | static struct snd_kcontrol_new cxt5051_capture_mixers[] = { | 1796 | static struct snd_kcontrol_new cxt5051_capture_mixers[] = { |
1797 | HDA_CODEC_VOLUME("Internal Mic Volume", 0x14, 0x00, HDA_INPUT), | 1797 | HDA_CODEC_VOLUME("Internal Mic Volume", 0x14, 0x00, HDA_INPUT), |
1798 | HDA_CODEC_MUTE("Internal Mic Switch", 0x14, 0x00, HDA_INPUT), | 1798 | HDA_CODEC_MUTE("Internal Mic Switch", 0x14, 0x00, HDA_INPUT), |
1799 | HDA_CODEC_VOLUME("External Mic Volume", 0x14, 0x01, HDA_INPUT), | 1799 | HDA_CODEC_VOLUME("Mic Volume", 0x14, 0x01, HDA_INPUT), |
1800 | HDA_CODEC_MUTE("External Mic Switch", 0x14, 0x01, HDA_INPUT), | 1800 | HDA_CODEC_MUTE("Mic Switch", 0x14, 0x01, HDA_INPUT), |
1801 | HDA_CODEC_VOLUME("Docking Mic Volume", 0x15, 0x00, HDA_INPUT), | 1801 | HDA_CODEC_VOLUME("Docking Mic Volume", 0x15, 0x00, HDA_INPUT), |
1802 | HDA_CODEC_MUTE("Docking Mic Switch", 0x15, 0x00, HDA_INPUT), | 1802 | HDA_CODEC_MUTE("Docking Mic Switch", 0x15, 0x00, HDA_INPUT), |
1803 | {} | 1803 | {} |
@@ -1806,8 +1806,8 @@ static struct snd_kcontrol_new cxt5051_capture_mixers[] = { | |||
1806 | static struct snd_kcontrol_new cxt5051_hp_mixers[] = { | 1806 | static struct snd_kcontrol_new cxt5051_hp_mixers[] = { |
1807 | HDA_CODEC_VOLUME("Internal Mic Volume", 0x14, 0x00, HDA_INPUT), | 1807 | HDA_CODEC_VOLUME("Internal Mic Volume", 0x14, 0x00, HDA_INPUT), |
1808 | HDA_CODEC_MUTE("Internal Mic Switch", 0x14, 0x00, HDA_INPUT), | 1808 | HDA_CODEC_MUTE("Internal Mic Switch", 0x14, 0x00, HDA_INPUT), |
1809 | HDA_CODEC_VOLUME("External Mic Volume", 0x15, 0x00, HDA_INPUT), | 1809 | HDA_CODEC_VOLUME("Mic Volume", 0x15, 0x00, HDA_INPUT), |
1810 | HDA_CODEC_MUTE("External Mic Switch", 0x15, 0x00, HDA_INPUT), | 1810 | HDA_CODEC_MUTE("Mic Switch", 0x15, 0x00, HDA_INPUT), |
1811 | {} | 1811 | {} |
1812 | }; | 1812 | }; |
1813 | 1813 | ||
@@ -1826,8 +1826,8 @@ static struct snd_kcontrol_new cxt5051_f700_mixers[] = { | |||
1826 | static struct snd_kcontrol_new cxt5051_toshiba_mixers[] = { | 1826 | static struct snd_kcontrol_new cxt5051_toshiba_mixers[] = { |
1827 | HDA_CODEC_VOLUME("Internal Mic Volume", 0x14, 0x00, HDA_INPUT), | 1827 | HDA_CODEC_VOLUME("Internal Mic Volume", 0x14, 0x00, HDA_INPUT), |
1828 | HDA_CODEC_MUTE("Internal Mic Switch", 0x14, 0x00, HDA_INPUT), | 1828 | HDA_CODEC_MUTE("Internal Mic Switch", 0x14, 0x00, HDA_INPUT), |
1829 | HDA_CODEC_VOLUME("External Mic Volume", 0x14, 0x01, HDA_INPUT), | 1829 | HDA_CODEC_VOLUME("Mic Volume", 0x14, 0x01, HDA_INPUT), |
1830 | HDA_CODEC_MUTE("External Mic Switch", 0x14, 0x01, HDA_INPUT), | 1830 | HDA_CODEC_MUTE("Mic Switch", 0x14, 0x01, HDA_INPUT), |
1831 | {} | 1831 | {} |
1832 | }; | 1832 | }; |
1833 | 1833 | ||
@@ -1847,7 +1847,7 @@ static struct hda_verb cxt5051_init_verbs[] = { | |||
1847 | {0x16, AC_VERB_SET_CONNECT_SEL, 0x00}, | 1847 | {0x16, AC_VERB_SET_CONNECT_SEL, 0x00}, |
1848 | /* DAC1 */ | 1848 | /* DAC1 */ |
1849 | {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | 1849 | {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, |
1850 | /* Record selector: Int mic */ | 1850 | /* Record selector: Internal mic */ |
1851 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) | 0x44}, | 1851 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) | 0x44}, |
1852 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1) | 0x44}, | 1852 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1) | 0x44}, |
1853 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) | 0x44}, | 1853 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) | 0x44}, |
@@ -1874,7 +1874,7 @@ static struct hda_verb cxt5051_hp_dv6736_init_verbs[] = { | |||
1874 | {0x16, AC_VERB_SET_CONNECT_SEL, 0x00}, | 1874 | {0x16, AC_VERB_SET_CONNECT_SEL, 0x00}, |
1875 | /* DAC1 */ | 1875 | /* DAC1 */ |
1876 | {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | 1876 | {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, |
1877 | /* Record selector: Int mic */ | 1877 | /* Record selector: Internal mic */ |
1878 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1) | 0x44}, | 1878 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1) | 0x44}, |
1879 | {0x14, AC_VERB_SET_CONNECT_SEL, 0x1}, | 1879 | {0x14, AC_VERB_SET_CONNECT_SEL, 0x1}, |
1880 | /* SPDIF route: PCM */ | 1880 | /* SPDIF route: PCM */ |
@@ -1904,7 +1904,7 @@ static struct hda_verb cxt5051_lenovo_x200_init_verbs[] = { | |||
1904 | {0x19, AC_VERB_SET_CONNECT_SEL, 0x00}, | 1904 | {0x19, AC_VERB_SET_CONNECT_SEL, 0x00}, |
1905 | /* DAC1 */ | 1905 | /* DAC1 */ |
1906 | {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | 1906 | {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, |
1907 | /* Record selector: Int mic */ | 1907 | /* Record selector: Internal mic */ |
1908 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) | 0x44}, | 1908 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) | 0x44}, |
1909 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1) | 0x44}, | 1909 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1) | 0x44}, |
1910 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) | 0x44}, | 1910 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) | 0x44}, |
@@ -1932,7 +1932,7 @@ static struct hda_verb cxt5051_f700_init_verbs[] = { | |||
1932 | {0x16, AC_VERB_SET_CONNECT_SEL, 0x00}, | 1932 | {0x16, AC_VERB_SET_CONNECT_SEL, 0x00}, |
1933 | /* DAC1 */ | 1933 | /* DAC1 */ |
1934 | {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | 1934 | {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, |
1935 | /* Record selector: Int mic */ | 1935 | /* Record selector: Internal mic */ |
1936 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1) | 0x44}, | 1936 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1) | 0x44}, |
1937 | {0x14, AC_VERB_SET_CONNECT_SEL, 0x1}, | 1937 | {0x14, AC_VERB_SET_CONNECT_SEL, 0x1}, |
1938 | /* SPDIF route: PCM */ | 1938 | /* SPDIF route: PCM */ |
@@ -2111,6 +2111,11 @@ static struct hda_channel_mode cxt5066_modes[1] = { | |||
2111 | { 2, NULL }, | 2111 | { 2, NULL }, |
2112 | }; | 2112 | }; |
2113 | 2113 | ||
2114 | #define HP_PRESENT_PORT_A (1 << 0) | ||
2115 | #define HP_PRESENT_PORT_D (1 << 1) | ||
2116 | #define hp_port_a_present(spec) ((spec)->hp_present & HP_PRESENT_PORT_A) | ||
2117 | #define hp_port_d_present(spec) ((spec)->hp_present & HP_PRESENT_PORT_D) | ||
2118 | |||
2114 | static void cxt5066_update_speaker(struct hda_codec *codec) | 2119 | static void cxt5066_update_speaker(struct hda_codec *codec) |
2115 | { | 2120 | { |
2116 | struct conexant_spec *spec = codec->spec; | 2121 | struct conexant_spec *spec = codec->spec; |
@@ -2120,24 +2125,20 @@ static void cxt5066_update_speaker(struct hda_codec *codec) | |||
2120 | spec->hp_present, spec->cur_eapd); | 2125 | spec->hp_present, spec->cur_eapd); |
2121 | 2126 | ||
2122 | /* Port A (HP) */ | 2127 | /* Port A (HP) */ |
2123 | pinctl = ((spec->hp_present & 1) && spec->cur_eapd) ? PIN_HP : 0; | 2128 | pinctl = (hp_port_a_present(spec) && spec->cur_eapd) ? PIN_HP : 0; |
2124 | snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, | 2129 | snd_hda_codec_write(codec, 0x19, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, |
2125 | pinctl); | 2130 | pinctl); |
2126 | 2131 | ||
2127 | /* Port D (HP/LO) */ | 2132 | /* Port D (HP/LO) */ |
2128 | if (spec->dell_automute) { | 2133 | pinctl = spec->cur_eapd ? spec->port_d_mode : 0; |
2129 | /* DELL AIO Port Rule: PortA> PortD> IntSpk */ | 2134 | if (spec->dell_automute || spec->thinkpad) { |
2130 | pinctl = (!(spec->hp_present & 1) && spec->cur_eapd) | 2135 | /* Mute if Port A is connected */ |
2131 | ? PIN_OUT : 0; | 2136 | if (hp_port_a_present(spec)) |
2132 | } else if (spec->thinkpad) { | ||
2133 | if (spec->cur_eapd) | ||
2134 | pinctl = spec->port_d_mode; | ||
2135 | /* Mute dock line-out if Port A (laptop HP) is present */ | ||
2136 | if (spec->hp_present& 1) | ||
2137 | pinctl = 0; | 2137 | pinctl = 0; |
2138 | } else { | 2138 | } else { |
2139 | pinctl = ((spec->hp_present & 2) && spec->cur_eapd) | 2139 | /* Thinkpad/Dell doesn't give pin-D status */ |
2140 | ? spec->port_d_mode : 0; | 2140 | if (!hp_port_d_present(spec)) |
2141 | pinctl = 0; | ||
2141 | } | 2142 | } |
2142 | snd_hda_codec_write(codec, 0x1c, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, | 2143 | snd_hda_codec_write(codec, 0x1c, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, |
2143 | pinctl); | 2144 | pinctl); |
@@ -2379,8 +2380,8 @@ static void cxt5066_hp_automute(struct hda_codec *codec) | |||
2379 | /* Port D */ | 2380 | /* Port D */ |
2380 | portD = snd_hda_jack_detect(codec, 0x1c); | 2381 | portD = snd_hda_jack_detect(codec, 0x1c); |
2381 | 2382 | ||
2382 | spec->hp_present = !!(portA); | 2383 | spec->hp_present = portA ? HP_PRESENT_PORT_A : 0; |
2383 | spec->hp_present |= portD ? 2 : 0; | 2384 | spec->hp_present |= portD ? HP_PRESENT_PORT_D : 0; |
2384 | snd_printdd("CXT5066: hp automute portA=%x portD=%x present=%d\n", | 2385 | snd_printdd("CXT5066: hp automute portA=%x portD=%x present=%d\n", |
2385 | portA, portD, spec->hp_present); | 2386 | portA, portD, spec->hp_present); |
2386 | cxt5066_update_speaker(codec); | 2387 | cxt5066_update_speaker(codec); |
@@ -2728,7 +2729,7 @@ static struct snd_kcontrol_new cxt5066_mixers[] = { | |||
2728 | static struct snd_kcontrol_new cxt5066_vostro_mixers[] = { | 2729 | static struct snd_kcontrol_new cxt5066_vostro_mixers[] = { |
2729 | { | 2730 | { |
2730 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 2731 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
2731 | .name = "Int Mic Boost Capture Enum", | 2732 | .name = "Internal Mic Boost Capture Enum", |
2732 | .info = cxt5066_mic_boost_mux_enum_info, | 2733 | .info = cxt5066_mic_boost_mux_enum_info, |
2733 | .get = cxt5066_mic_boost_mux_enum_get, | 2734 | .get = cxt5066_mic_boost_mux_enum_get, |
2734 | .put = cxt5066_mic_boost_mux_enum_put, | 2735 | .put = cxt5066_mic_boost_mux_enum_put, |
@@ -2954,7 +2955,7 @@ static struct hda_verb cxt5066_init_verbs_ideapad[] = { | |||
2954 | {0x22, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | 2955 | {0x22, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, |
2955 | 2956 | ||
2956 | /* internal microphone */ | 2957 | /* internal microphone */ |
2957 | {0x23, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, /* enable int mic */ | 2958 | {0x23, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, /* enable internal mic */ |
2958 | 2959 | ||
2959 | /* EAPD */ | 2960 | /* EAPD */ |
2960 | {0x1d, AC_VERB_SET_EAPD_BTLENABLE, 0x2}, /* default on */ | 2961 | {0x1d, AC_VERB_SET_EAPD_BTLENABLE, 0x2}, /* default on */ |
@@ -3009,7 +3010,7 @@ static struct hda_verb cxt5066_init_verbs_thinkpad[] = { | |||
3009 | {0x22, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | 3010 | {0x22, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, |
3010 | 3011 | ||
3011 | /* internal microphone */ | 3012 | /* internal microphone */ |
3012 | {0x23, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, /* enable int mic */ | 3013 | {0x23, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, /* enable internal mic */ |
3013 | 3014 | ||
3014 | /* EAPD */ | 3015 | /* EAPD */ |
3015 | {0x1d, AC_VERB_SET_EAPD_BTLENABLE, 0x2}, /* default on */ | 3016 | {0x1d, AC_VERB_SET_EAPD_BTLENABLE, 0x2}, /* default on */ |
@@ -3097,6 +3098,7 @@ static struct snd_pci_quirk cxt5066_cfg_tbl[] = { | |||
3097 | SND_PCI_QUIRK_MASK(0x1025, 0xff00, 0x0400, "Acer", CXT5066_IDEAPAD), | 3098 | SND_PCI_QUIRK_MASK(0x1025, 0xff00, 0x0400, "Acer", CXT5066_IDEAPAD), |
3098 | SND_PCI_QUIRK(0x1028, 0x02d8, "Dell Vostro", CXT5066_DELL_VOSTRO), | 3099 | SND_PCI_QUIRK(0x1028, 0x02d8, "Dell Vostro", CXT5066_DELL_VOSTRO), |
3099 | SND_PCI_QUIRK(0x1028, 0x02f5, "Dell Vostro 320", CXT5066_IDEAPAD), | 3100 | SND_PCI_QUIRK(0x1028, 0x02f5, "Dell Vostro 320", CXT5066_IDEAPAD), |
3101 | SND_PCI_QUIRK(0x1028, 0x0401, "Dell Vostro 1014", CXT5066_DELL_VOSTRO), | ||
3100 | SND_PCI_QUIRK(0x1028, 0x0402, "Dell Vostro", CXT5066_DELL_VOSTRO), | 3102 | SND_PCI_QUIRK(0x1028, 0x0402, "Dell Vostro", CXT5066_DELL_VOSTRO), |
3101 | SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD), | 3103 | SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD), |
3102 | SND_PCI_QUIRK(0x103c, 0x360b, "HP G60", CXT5066_HP_LAPTOP), | 3104 | SND_PCI_QUIRK(0x103c, 0x360b, "HP G60", CXT5066_HP_LAPTOP), |
@@ -3108,16 +3110,9 @@ static struct snd_pci_quirk cxt5066_cfg_tbl[] = { | |||
3108 | CXT5066_LAPTOP), | 3110 | CXT5066_LAPTOP), |
3109 | SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT5066_OLPC_XO_1_5), | 3111 | SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT5066_OLPC_XO_1_5), |
3110 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400s", CXT5066_THINKPAD), | 3112 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400s", CXT5066_THINKPAD), |
3111 | SND_PCI_QUIRK(0x17aa, 0x21b2, "Thinkpad X100e", CXT5066_IDEAPAD), | ||
3112 | SND_PCI_QUIRK(0x17aa, 0x21c5, "Thinkpad Edge 13", CXT5066_THINKPAD), | 3113 | SND_PCI_QUIRK(0x17aa, 0x21c5, "Thinkpad Edge 13", CXT5066_THINKPAD), |
3113 | SND_PCI_QUIRK(0x17aa, 0x21b3, "Thinkpad Edge 13 (197)", CXT5066_IDEAPAD), | ||
3114 | SND_PCI_QUIRK(0x17aa, 0x21b4, "Thinkpad Edge", CXT5066_IDEAPAD), | ||
3115 | SND_PCI_QUIRK(0x17aa, 0x21c8, "Thinkpad Edge 11", CXT5066_IDEAPAD), | ||
3116 | SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo Thinkpad", CXT5066_THINKPAD), | 3114 | SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo Thinkpad", CXT5066_THINKPAD), |
3117 | SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo G series", CXT5066_IDEAPAD), | 3115 | SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo", CXT5066_IDEAPAD), /* Fallback for Lenovos without dock mic */ |
3118 | SND_PCI_QUIRK(0x17aa, 0x390a, "Lenovo S10-3t", CXT5066_IDEAPAD), | ||
3119 | SND_PCI_QUIRK(0x17aa, 0x3938, "Lenovo G series (AMD)", CXT5066_IDEAPAD), | ||
3120 | SND_PCI_QUIRK(0x17aa, 0x3a0d, "ideapad", CXT5066_IDEAPAD), | ||
3121 | {} | 3116 | {} |
3122 | }; | 3117 | }; |
3123 | 3118 | ||
@@ -3422,6 +3417,9 @@ static void cx_auto_hp_automute(struct hda_codec *codec) | |||
3422 | AC_VERB_SET_PIN_WIDGET_CONTROL, | 3417 | AC_VERB_SET_PIN_WIDGET_CONTROL, |
3423 | present ? 0 : PIN_OUT); | 3418 | present ? 0 : PIN_OUT); |
3424 | } | 3419 | } |
3420 | for (i = 0; !present && i < cfg->line_outs; i++) | ||
3421 | if (snd_hda_jack_detect(codec, cfg->line_out_pins[i])) | ||
3422 | present = 1; | ||
3425 | for (i = 0; i < cfg->speaker_outs; i++) { | 3423 | for (i = 0; i < cfg->speaker_outs; i++) { |
3426 | snd_hda_codec_write(codec, cfg->speaker_pins[i], 0, | 3424 | snd_hda_codec_write(codec, cfg->speaker_pins[i], 0, |
3427 | AC_VERB_SET_PIN_WIDGET_CONTROL, | 3425 | AC_VERB_SET_PIN_WIDGET_CONTROL, |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 31df7747990d..f29b97b5de8f 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -31,10 +31,15 @@ | |||
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
33 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
34 | #include <linux/moduleparam.h> | ||
34 | #include <sound/core.h> | 35 | #include <sound/core.h> |
35 | #include "hda_codec.h" | 36 | #include "hda_codec.h" |
36 | #include "hda_local.h" | 37 | #include "hda_local.h" |
37 | 38 | ||
39 | static bool static_hdmi_pcm; | ||
40 | module_param(static_hdmi_pcm, bool, 0644); | ||
41 | MODULE_PARM_DESC(static_hdmi_pcm, "Don't restrict PCM parameters per ELD info"); | ||
42 | |||
38 | /* | 43 | /* |
39 | * The HDMI/DisplayPort configuration can be highly dynamic. A graphics device | 44 | * The HDMI/DisplayPort configuration can be highly dynamic. A graphics device |
40 | * could support two independent pipes, each of them can be connected to one or | 45 | * could support two independent pipes, each of them can be connected to one or |
@@ -827,7 +832,7 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo, | |||
827 | *codec_pars = *hinfo; | 832 | *codec_pars = *hinfo; |
828 | 833 | ||
829 | eld = &spec->sink_eld[idx]; | 834 | eld = &spec->sink_eld[idx]; |
830 | if (eld->sad_count > 0) { | 835 | if (!static_hdmi_pcm && eld->eld_valid && eld->sad_count > 0) { |
831 | hdmi_eld_update_pcm_info(eld, hinfo, codec_pars); | 836 | hdmi_eld_update_pcm_info(eld, hinfo, codec_pars); |
832 | if (hinfo->channels_min > hinfo->channels_max || | 837 | if (hinfo->channels_min > hinfo->channels_max || |
833 | !hinfo->rates || !hinfo->formats) | 838 | !hinfo->rates || !hinfo->formats) |
@@ -904,23 +909,28 @@ static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid) | |||
904 | spec->pin[spec->num_pins] = pin_nid; | 909 | spec->pin[spec->num_pins] = pin_nid; |
905 | spec->num_pins++; | 910 | spec->num_pins++; |
906 | 911 | ||
907 | /* | ||
908 | * It is assumed that converter nodes come first in the node list and | ||
909 | * hence have been registered and usable now. | ||
910 | */ | ||
911 | return hdmi_read_pin_conn(codec, pin_nid); | 912 | return hdmi_read_pin_conn(codec, pin_nid); |
912 | } | 913 | } |
913 | 914 | ||
914 | static int hdmi_add_cvt(struct hda_codec *codec, hda_nid_t nid) | 915 | static int hdmi_add_cvt(struct hda_codec *codec, hda_nid_t nid) |
915 | { | 916 | { |
917 | int i, found_pin = 0; | ||
916 | struct hdmi_spec *spec = codec->spec; | 918 | struct hdmi_spec *spec = codec->spec; |
917 | 919 | ||
918 | if (spec->num_cvts >= MAX_HDMI_CVTS) { | 920 | for (i = 0; i < spec->num_pins; i++) |
919 | snd_printk(KERN_WARNING | 921 | if (nid == spec->pin_cvt[i]) { |
920 | "HDMI: no space for converter %d\n", nid); | 922 | found_pin = 1; |
921 | return -E2BIG; | 923 | break; |
924 | } | ||
925 | |||
926 | if (!found_pin) { | ||
927 | snd_printdd("HDMI: Skipping node %d (no connection)\n", nid); | ||
928 | return -EINVAL; | ||
922 | } | 929 | } |
923 | 930 | ||
931 | if (snd_BUG_ON(spec->num_cvts >= MAX_HDMI_CVTS)) | ||
932 | return -E2BIG; | ||
933 | |||
924 | spec->cvt[spec->num_cvts] = nid; | 934 | spec->cvt[spec->num_cvts] = nid; |
925 | spec->num_cvts++; | 935 | spec->num_cvts++; |
926 | 936 | ||
@@ -931,6 +941,8 @@ static int hdmi_parse_codec(struct hda_codec *codec) | |||
931 | { | 941 | { |
932 | hda_nid_t nid; | 942 | hda_nid_t nid; |
933 | int i, nodes; | 943 | int i, nodes; |
944 | int num_tmp_cvts = 0; | ||
945 | hda_nid_t tmp_cvt[MAX_HDMI_CVTS]; | ||
934 | 946 | ||
935 | nodes = snd_hda_get_sub_nodes(codec, codec->afg, &nid); | 947 | nodes = snd_hda_get_sub_nodes(codec, codec->afg, &nid); |
936 | if (!nid || nodes < 0) { | 948 | if (!nid || nodes < 0) { |
@@ -941,6 +953,7 @@ static int hdmi_parse_codec(struct hda_codec *codec) | |||
941 | for (i = 0; i < nodes; i++, nid++) { | 953 | for (i = 0; i < nodes; i++, nid++) { |
942 | unsigned int caps; | 954 | unsigned int caps; |
943 | unsigned int type; | 955 | unsigned int type; |
956 | unsigned int config; | ||
944 | 957 | ||
945 | caps = snd_hda_param_read(codec, nid, AC_PAR_AUDIO_WIDGET_CAP); | 958 | caps = snd_hda_param_read(codec, nid, AC_PAR_AUDIO_WIDGET_CAP); |
946 | type = get_wcaps_type(caps); | 959 | type = get_wcaps_type(caps); |
@@ -950,17 +963,32 @@ static int hdmi_parse_codec(struct hda_codec *codec) | |||
950 | 963 | ||
951 | switch (type) { | 964 | switch (type) { |
952 | case AC_WID_AUD_OUT: | 965 | case AC_WID_AUD_OUT: |
953 | hdmi_add_cvt(codec, nid); | 966 | if (num_tmp_cvts >= MAX_HDMI_CVTS) { |
967 | snd_printk(KERN_WARNING | ||
968 | "HDMI: no space for converter %d\n", nid); | ||
969 | continue; | ||
970 | } | ||
971 | tmp_cvt[num_tmp_cvts] = nid; | ||
972 | num_tmp_cvts++; | ||
954 | break; | 973 | break; |
955 | case AC_WID_PIN: | 974 | case AC_WID_PIN: |
956 | caps = snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP); | 975 | caps = snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP); |
957 | if (!(caps & (AC_PINCAP_HDMI | AC_PINCAP_DP))) | 976 | if (!(caps & (AC_PINCAP_HDMI | AC_PINCAP_DP))) |
958 | continue; | 977 | continue; |
978 | |||
979 | config = snd_hda_codec_read(codec, nid, 0, | ||
980 | AC_VERB_GET_CONFIG_DEFAULT, 0); | ||
981 | if (get_defcfg_connect(config) == AC_JACK_PORT_NONE) | ||
982 | continue; | ||
983 | |||
959 | hdmi_add_pin(codec, nid); | 984 | hdmi_add_pin(codec, nid); |
960 | break; | 985 | break; |
961 | } | 986 | } |
962 | } | 987 | } |
963 | 988 | ||
989 | for (i = 0; i < num_tmp_cvts; i++) | ||
990 | hdmi_add_cvt(codec, tmp_cvt[i]); | ||
991 | |||
964 | /* | 992 | /* |
965 | * G45/IbexPeak don't support EPSS: the unsolicited pin hot plug event | 993 | * G45/IbexPeak don't support EPSS: the unsolicited pin hot plug event |
966 | * can be lost and presence sense verb will become inaccurate if the | 994 | * can be lost and presence sense verb will become inaccurate if the |
@@ -1165,11 +1193,53 @@ static int nvhdmi_7x_init(struct hda_codec *codec) | |||
1165 | return 0; | 1193 | return 0; |
1166 | } | 1194 | } |
1167 | 1195 | ||
1196 | static unsigned int channels_2_6_8[] = { | ||
1197 | 2, 6, 8 | ||
1198 | }; | ||
1199 | |||
1200 | static unsigned int channels_2_8[] = { | ||
1201 | 2, 8 | ||
1202 | }; | ||
1203 | |||
1204 | static struct snd_pcm_hw_constraint_list hw_constraints_2_6_8_channels = { | ||
1205 | .count = ARRAY_SIZE(channels_2_6_8), | ||
1206 | .list = channels_2_6_8, | ||
1207 | .mask = 0, | ||
1208 | }; | ||
1209 | |||
1210 | static struct snd_pcm_hw_constraint_list hw_constraints_2_8_channels = { | ||
1211 | .count = ARRAY_SIZE(channels_2_8), | ||
1212 | .list = channels_2_8, | ||
1213 | .mask = 0, | ||
1214 | }; | ||
1215 | |||
1168 | static int simple_playback_pcm_open(struct hda_pcm_stream *hinfo, | 1216 | static int simple_playback_pcm_open(struct hda_pcm_stream *hinfo, |
1169 | struct hda_codec *codec, | 1217 | struct hda_codec *codec, |
1170 | struct snd_pcm_substream *substream) | 1218 | struct snd_pcm_substream *substream) |
1171 | { | 1219 | { |
1172 | struct hdmi_spec *spec = codec->spec; | 1220 | struct hdmi_spec *spec = codec->spec; |
1221 | struct snd_pcm_hw_constraint_list *hw_constraints_channels = NULL; | ||
1222 | |||
1223 | switch (codec->preset->id) { | ||
1224 | case 0x10de0002: | ||
1225 | case 0x10de0003: | ||
1226 | case 0x10de0005: | ||
1227 | case 0x10de0006: | ||
1228 | hw_constraints_channels = &hw_constraints_2_8_channels; | ||
1229 | break; | ||
1230 | case 0x10de0007: | ||
1231 | hw_constraints_channels = &hw_constraints_2_6_8_channels; | ||
1232 | break; | ||
1233 | default: | ||
1234 | break; | ||
1235 | } | ||
1236 | |||
1237 | if (hw_constraints_channels != NULL) { | ||
1238 | snd_pcm_hw_constraint_list(substream->runtime, 0, | ||
1239 | SNDRV_PCM_HW_PARAM_CHANNELS, | ||
1240 | hw_constraints_channels); | ||
1241 | } | ||
1242 | |||
1173 | return snd_hda_multi_out_dig_open(codec, &spec->multiout); | 1243 | return snd_hda_multi_out_dig_open(codec, &spec->multiout); |
1174 | } | 1244 | } |
1175 | 1245 | ||
@@ -1532,7 +1602,7 @@ static struct hda_codec_preset snd_hda_preset_hdmi[] = { | |||
1532 | { .id = 0x1002793c, .name = "RS600 HDMI", .patch = patch_atihdmi }, | 1602 | { .id = 0x1002793c, .name = "RS600 HDMI", .patch = patch_atihdmi }, |
1533 | { .id = 0x10027919, .name = "RS600 HDMI", .patch = patch_atihdmi }, | 1603 | { .id = 0x10027919, .name = "RS600 HDMI", .patch = patch_atihdmi }, |
1534 | { .id = 0x1002791a, .name = "RS690/780 HDMI", .patch = patch_atihdmi }, | 1604 | { .id = 0x1002791a, .name = "RS690/780 HDMI", .patch = patch_atihdmi }, |
1535 | { .id = 0x1002aa01, .name = "R6xx HDMI", .patch = patch_atihdmi }, | 1605 | { .id = 0x1002aa01, .name = "R6xx HDMI", .patch = patch_generic_hdmi }, |
1536 | { .id = 0x10951390, .name = "SiI1390 HDMI", .patch = patch_generic_hdmi }, | 1606 | { .id = 0x10951390, .name = "SiI1390 HDMI", .patch = patch_generic_hdmi }, |
1537 | { .id = 0x10951392, .name = "SiI1392 HDMI", .patch = patch_generic_hdmi }, | 1607 | { .id = 0x10951392, .name = "SiI1392 HDMI", .patch = patch_generic_hdmi }, |
1538 | { .id = 0x17e80047, .name = "Chrontel HDMI", .patch = patch_generic_hdmi }, | 1608 | { .id = 0x17e80047, .name = "Chrontel HDMI", .patch = patch_generic_hdmi }, |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 6e0d872bbf7b..51c08edd7563 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -231,7 +231,6 @@ enum { | |||
231 | ALC888_ACER_ASPIRE_8930G, | 231 | ALC888_ACER_ASPIRE_8930G, |
232 | ALC888_ACER_ASPIRE_7730G, | 232 | ALC888_ACER_ASPIRE_7730G, |
233 | ALC883_MEDION, | 233 | ALC883_MEDION, |
234 | ALC883_MEDION_MD2, | ||
235 | ALC883_MEDION_WIM2160, | 234 | ALC883_MEDION_WIM2160, |
236 | ALC883_LAPTOP_EAPD, | 235 | ALC883_LAPTOP_EAPD, |
237 | ALC883_LENOVO_101E_2ch, | 236 | ALC883_LENOVO_101E_2ch, |
@@ -1678,29 +1677,32 @@ struct alc_pincfg { | |||
1678 | u32 val; | 1677 | u32 val; |
1679 | }; | 1678 | }; |
1680 | 1679 | ||
1680 | struct alc_model_fixup { | ||
1681 | const int id; | ||
1682 | const char *name; | ||
1683 | }; | ||
1684 | |||
1681 | struct alc_fixup { | 1685 | struct alc_fixup { |
1682 | unsigned int sku; | 1686 | unsigned int sku; |
1683 | const struct alc_pincfg *pins; | 1687 | const struct alc_pincfg *pins; |
1684 | const struct hda_verb *verbs; | 1688 | const struct hda_verb *verbs; |
1689 | void (*func)(struct hda_codec *codec, const struct alc_fixup *fix, | ||
1690 | int pre_init); | ||
1685 | }; | 1691 | }; |
1686 | 1692 | ||
1687 | static void alc_pick_fixup(struct hda_codec *codec, | 1693 | static void __alc_pick_fixup(struct hda_codec *codec, |
1688 | const struct snd_pci_quirk *quirk, | 1694 | const struct alc_fixup *fix, |
1689 | const struct alc_fixup *fix, | 1695 | const char *modelname, |
1690 | int pre_init) | 1696 | int pre_init) |
1691 | { | 1697 | { |
1692 | const struct alc_pincfg *cfg; | 1698 | const struct alc_pincfg *cfg; |
1693 | struct alc_spec *spec; | 1699 | struct alc_spec *spec; |
1694 | 1700 | ||
1695 | quirk = snd_pci_quirk_lookup(codec->bus->pci, quirk); | ||
1696 | if (!quirk) | ||
1697 | return; | ||
1698 | fix += quirk->value; | ||
1699 | cfg = fix->pins; | 1701 | cfg = fix->pins; |
1700 | if (pre_init && fix->sku) { | 1702 | if (pre_init && fix->sku) { |
1701 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 1703 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
1702 | snd_printdd(KERN_INFO "hda_codec: %s: Apply sku override for %s\n", | 1704 | snd_printdd(KERN_INFO "hda_codec: %s: Apply sku override for %s\n", |
1703 | codec->chip_name, quirk->name); | 1705 | codec->chip_name, modelname); |
1704 | #endif | 1706 | #endif |
1705 | spec = codec->spec; | 1707 | spec = codec->spec; |
1706 | spec->cdefine.sku_cfg = fix->sku; | 1708 | spec->cdefine.sku_cfg = fix->sku; |
@@ -1709,7 +1711,7 @@ static void alc_pick_fixup(struct hda_codec *codec, | |||
1709 | if (pre_init && cfg) { | 1711 | if (pre_init && cfg) { |
1710 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 1712 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
1711 | snd_printdd(KERN_INFO "hda_codec: %s: Apply pincfg for %s\n", | 1713 | snd_printdd(KERN_INFO "hda_codec: %s: Apply pincfg for %s\n", |
1712 | codec->chip_name, quirk->name); | 1714 | codec->chip_name, modelname); |
1713 | #endif | 1715 | #endif |
1714 | for (; cfg->nid; cfg++) | 1716 | for (; cfg->nid; cfg++) |
1715 | snd_hda_codec_set_pincfg(codec, cfg->nid, cfg->val); | 1717 | snd_hda_codec_set_pincfg(codec, cfg->nid, cfg->val); |
@@ -1717,10 +1719,53 @@ static void alc_pick_fixup(struct hda_codec *codec, | |||
1717 | if (!pre_init && fix->verbs) { | 1719 | if (!pre_init && fix->verbs) { |
1718 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 1720 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
1719 | snd_printdd(KERN_INFO "hda_codec: %s: Apply fix-verbs for %s\n", | 1721 | snd_printdd(KERN_INFO "hda_codec: %s: Apply fix-verbs for %s\n", |
1720 | codec->chip_name, quirk->name); | 1722 | codec->chip_name, modelname); |
1721 | #endif | 1723 | #endif |
1722 | add_verb(codec->spec, fix->verbs); | 1724 | add_verb(codec->spec, fix->verbs); |
1723 | } | 1725 | } |
1726 | if (fix->func) { | ||
1727 | #ifdef CONFIG_SND_DEBUG_VERBOSE | ||
1728 | snd_printdd(KERN_INFO "hda_codec: %s: Apply fix-func for %s\n", | ||
1729 | codec->chip_name, modelname); | ||
1730 | #endif | ||
1731 | fix->func(codec, fix, pre_init); | ||
1732 | } | ||
1733 | } | ||
1734 | |||
1735 | static void alc_pick_fixup(struct hda_codec *codec, | ||
1736 | const struct snd_pci_quirk *quirk, | ||
1737 | const struct alc_fixup *fix, | ||
1738 | int pre_init) | ||
1739 | { | ||
1740 | quirk = snd_pci_quirk_lookup(codec->bus->pci, quirk); | ||
1741 | if (quirk) { | ||
1742 | fix += quirk->value; | ||
1743 | #ifdef CONFIG_SND_DEBUG_VERBOSE | ||
1744 | __alc_pick_fixup(codec, fix, quirk->name, pre_init); | ||
1745 | #else | ||
1746 | __alc_pick_fixup(codec, fix, NULL, pre_init); | ||
1747 | #endif | ||
1748 | } | ||
1749 | } | ||
1750 | |||
1751 | static void alc_pick_fixup_model(struct hda_codec *codec, | ||
1752 | const struct alc_model_fixup *models, | ||
1753 | const struct snd_pci_quirk *quirk, | ||
1754 | const struct alc_fixup *fix, | ||
1755 | int pre_init) | ||
1756 | { | ||
1757 | if (codec->modelname && models) { | ||
1758 | while (models->name) { | ||
1759 | if (!strcmp(codec->modelname, models->name)) { | ||
1760 | fix += models->id; | ||
1761 | break; | ||
1762 | } | ||
1763 | models++; | ||
1764 | } | ||
1765 | __alc_pick_fixup(codec, fix, codec->modelname, pre_init); | ||
1766 | } else { | ||
1767 | alc_pick_fixup(codec, quirk, fix, pre_init); | ||
1768 | } | ||
1724 | } | 1769 | } |
1725 | 1770 | ||
1726 | static int alc_read_coef_idx(struct hda_codec *codec, | 1771 | static int alc_read_coef_idx(struct hda_codec *codec, |
@@ -1981,6 +2026,7 @@ static struct hda_verb alc888_acer_aspire_4930g_verbs[] = { | |||
1981 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, | 2026 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, |
1982 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | 2027 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, |
1983 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | 2028 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, |
2029 | {0x15, AC_VERB_SET_EAPD_BTLENABLE, 2}, | ||
1984 | { } | 2030 | { } |
1985 | }; | 2031 | }; |
1986 | 2032 | ||
@@ -2120,17 +2166,17 @@ static struct hda_input_mux alc888_acer_aspire_6530_sources[2] = { | |||
2120 | { | 2166 | { |
2121 | .num_items = 5, | 2167 | .num_items = 5, |
2122 | .items = { | 2168 | .items = { |
2123 | { "Ext Mic", 0x0 }, | 2169 | { "Mic", 0x0 }, |
2124 | { "Line In", 0x2 }, | 2170 | { "Line In", 0x2 }, |
2125 | { "CD", 0x4 }, | 2171 | { "CD", 0x4 }, |
2126 | { "Input Mix", 0xa }, | 2172 | { "Input Mix", 0xa }, |
2127 | { "Int Mic", 0xb }, | 2173 | { "Internal Mic", 0xb }, |
2128 | }, | 2174 | }, |
2129 | }, | 2175 | }, |
2130 | { | 2176 | { |
2131 | .num_items = 4, | 2177 | .num_items = 4, |
2132 | .items = { | 2178 | .items = { |
2133 | { "Ext Mic", 0x0 }, | 2179 | { "Mic", 0x0 }, |
2134 | { "Line In", 0x2 }, | 2180 | { "Line In", 0x2 }, |
2135 | { "CD", 0x4 }, | 2181 | { "CD", 0x4 }, |
2136 | { "Input Mix", 0xa }, | 2182 | { "Input Mix", 0xa }, |
@@ -2187,7 +2233,7 @@ static struct snd_kcontrol_new alc888_base_mixer[] = { | |||
2187 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | 2233 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), |
2188 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 2234 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
2189 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 2235 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
2190 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 2236 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
2191 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 2237 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
2192 | { } /* end */ | 2238 | { } /* end */ |
2193 | }; | 2239 | }; |
@@ -2205,7 +2251,7 @@ static struct snd_kcontrol_new alc889_acer_aspire_8930g_mixer[] = { | |||
2205 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | 2251 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), |
2206 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 2252 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
2207 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 2253 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
2208 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 2254 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
2209 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 2255 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
2210 | { } /* end */ | 2256 | { } /* end */ |
2211 | }; | 2257 | }; |
@@ -2796,10 +2842,10 @@ static struct snd_kcontrol_new alc880_fujitsu_mixer[] = { | |||
2796 | HDA_BIND_MUTE("Speaker Playback Switch", 0x0d, 2, HDA_INPUT), | 2842 | HDA_BIND_MUTE("Speaker Playback Switch", 0x0d, 2, HDA_INPUT), |
2797 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | 2843 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), |
2798 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | 2844 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), |
2799 | HDA_CODEC_VOLUME("Ext Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 2845 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
2800 | HDA_CODEC_MUTE("Ext Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 2846 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
2801 | HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 2847 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
2802 | HDA_CODEC_MUTE("Int Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 2848 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
2803 | { } /* end */ | 2849 | { } /* end */ |
2804 | }; | 2850 | }; |
2805 | 2851 | ||
@@ -3307,7 +3353,7 @@ static struct hda_verb alc880_beep_init_verbs[] = { | |||
3307 | }; | 3353 | }; |
3308 | 3354 | ||
3309 | /* auto-toggle front mic */ | 3355 | /* auto-toggle front mic */ |
3310 | static void alc880_uniwill_mic_automute(struct hda_codec *codec) | 3356 | static void alc88x_simple_mic_automute(struct hda_codec *codec) |
3311 | { | 3357 | { |
3312 | unsigned int present; | 3358 | unsigned int present; |
3313 | unsigned char bits; | 3359 | unsigned char bits; |
@@ -3329,7 +3375,7 @@ static void alc880_uniwill_setup(struct hda_codec *codec) | |||
3329 | static void alc880_uniwill_init_hook(struct hda_codec *codec) | 3375 | static void alc880_uniwill_init_hook(struct hda_codec *codec) |
3330 | { | 3376 | { |
3331 | alc_automute_amp(codec); | 3377 | alc_automute_amp(codec); |
3332 | alc880_uniwill_mic_automute(codec); | 3378 | alc88x_simple_mic_automute(codec); |
3333 | } | 3379 | } |
3334 | 3380 | ||
3335 | static void alc880_uniwill_unsol_event(struct hda_codec *codec, | 3381 | static void alc880_uniwill_unsol_event(struct hda_codec *codec, |
@@ -3340,7 +3386,7 @@ static void alc880_uniwill_unsol_event(struct hda_codec *codec, | |||
3340 | */ | 3386 | */ |
3341 | switch (res >> 28) { | 3387 | switch (res >> 28) { |
3342 | case ALC880_MIC_EVENT: | 3388 | case ALC880_MIC_EVENT: |
3343 | alc880_uniwill_mic_automute(codec); | 3389 | alc88x_simple_mic_automute(codec); |
3344 | break; | 3390 | break; |
3345 | default: | 3391 | default: |
3346 | alc_automute_amp_unsol_event(codec, res); | 3392 | alc_automute_amp_unsol_event(codec, res); |
@@ -5023,6 +5069,25 @@ static int alc880_auto_fill_dac_nids(struct alc_spec *spec, | |||
5023 | return 0; | 5069 | return 0; |
5024 | } | 5070 | } |
5025 | 5071 | ||
5072 | static const char *alc_get_line_out_pfx(const struct auto_pin_cfg *cfg, | ||
5073 | bool can_be_master) | ||
5074 | { | ||
5075 | if (!cfg->hp_outs && !cfg->speaker_outs && can_be_master) | ||
5076 | return "Master"; | ||
5077 | |||
5078 | switch (cfg->line_out_type) { | ||
5079 | case AUTO_PIN_SPEAKER_OUT: | ||
5080 | return "Speaker"; | ||
5081 | case AUTO_PIN_HP_OUT: | ||
5082 | return "Headphone"; | ||
5083 | default: | ||
5084 | if (cfg->line_outs == 1) | ||
5085 | return "PCM"; | ||
5086 | break; | ||
5087 | } | ||
5088 | return NULL; | ||
5089 | } | ||
5090 | |||
5026 | /* add playback controls from the parsed DAC table */ | 5091 | /* add playback controls from the parsed DAC table */ |
5027 | static int alc880_auto_create_multi_out_ctls(struct alc_spec *spec, | 5092 | static int alc880_auto_create_multi_out_ctls(struct alc_spec *spec, |
5028 | const struct auto_pin_cfg *cfg) | 5093 | const struct auto_pin_cfg *cfg) |
@@ -5030,6 +5095,7 @@ static int alc880_auto_create_multi_out_ctls(struct alc_spec *spec, | |||
5030 | static const char *chname[4] = { | 5095 | static const char *chname[4] = { |
5031 | "Front", "Surround", NULL /*CLFE*/, "Side" | 5096 | "Front", "Surround", NULL /*CLFE*/, "Side" |
5032 | }; | 5097 | }; |
5098 | const char *pfx = alc_get_line_out_pfx(cfg, false); | ||
5033 | hda_nid_t nid; | 5099 | hda_nid_t nid; |
5034 | int i, err; | 5100 | int i, err; |
5035 | 5101 | ||
@@ -5037,7 +5103,7 @@ static int alc880_auto_create_multi_out_ctls(struct alc_spec *spec, | |||
5037 | if (!spec->multiout.dac_nids[i]) | 5103 | if (!spec->multiout.dac_nids[i]) |
5038 | continue; | 5104 | continue; |
5039 | nid = alc880_idx_to_mixer(alc880_dac_to_idx(spec->multiout.dac_nids[i])); | 5105 | nid = alc880_idx_to_mixer(alc880_dac_to_idx(spec->multiout.dac_nids[i])); |
5040 | if (i == 2) { | 5106 | if (!pfx && i == 2) { |
5041 | /* Center/LFE */ | 5107 | /* Center/LFE */ |
5042 | err = add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL, | 5108 | err = add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL, |
5043 | "Center", | 5109 | "Center", |
@@ -5064,18 +5130,17 @@ static int alc880_auto_create_multi_out_ctls(struct alc_spec *spec, | |||
5064 | if (err < 0) | 5130 | if (err < 0) |
5065 | return err; | 5131 | return err; |
5066 | } else { | 5132 | } else { |
5067 | const char *pfx; | 5133 | const char *name = pfx; |
5068 | if (cfg->line_outs == 1 && | 5134 | if (!name) |
5069 | cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) | 5135 | name = chname[i]; |
5070 | pfx = "Speaker"; | 5136 | err = __add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL, |
5071 | else | 5137 | name, i, |
5072 | pfx = chname[i]; | ||
5073 | err = add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL, pfx, | ||
5074 | HDA_COMPOSE_AMP_VAL(nid, 3, 0, | 5138 | HDA_COMPOSE_AMP_VAL(nid, 3, 0, |
5075 | HDA_OUTPUT)); | 5139 | HDA_OUTPUT)); |
5076 | if (err < 0) | 5140 | if (err < 0) |
5077 | return err; | 5141 | return err; |
5078 | err = add_pb_sw_ctrl(spec, ALC_CTL_BIND_MUTE, pfx, | 5142 | err = __add_pb_sw_ctrl(spec, ALC_CTL_BIND_MUTE, |
5143 | name, i, | ||
5079 | HDA_COMPOSE_AMP_VAL(nid, 3, 2, | 5144 | HDA_COMPOSE_AMP_VAL(nid, 3, 2, |
5080 | HDA_INPUT)); | 5145 | HDA_INPUT)); |
5081 | if (err < 0) | 5146 | if (err < 0) |
@@ -5155,7 +5220,8 @@ static int alc_auto_create_input_ctls(struct hda_codec *codec, | |||
5155 | { | 5220 | { |
5156 | struct alc_spec *spec = codec->spec; | 5221 | struct alc_spec *spec = codec->spec; |
5157 | struct hda_input_mux *imux = &spec->private_imux[0]; | 5222 | struct hda_input_mux *imux = &spec->private_imux[0]; |
5158 | int i, err, idx, type, type_idx = 0; | 5223 | int i, err, idx, type_idx = 0; |
5224 | const char *prev_label = NULL; | ||
5159 | 5225 | ||
5160 | for (i = 0; i < cfg->num_inputs; i++) { | 5226 | for (i = 0; i < cfg->num_inputs; i++) { |
5161 | hda_nid_t pin; | 5227 | hda_nid_t pin; |
@@ -5165,12 +5231,13 @@ static int alc_auto_create_input_ctls(struct hda_codec *codec, | |||
5165 | if (!alc_is_input_pin(codec, pin)) | 5231 | if (!alc_is_input_pin(codec, pin)) |
5166 | continue; | 5232 | continue; |
5167 | 5233 | ||
5168 | type = cfg->inputs[i].type; | 5234 | label = hda_get_autocfg_input_label(codec, cfg, i); |
5169 | if (i > 0 && type == cfg->inputs[i - 1].type) | 5235 | if (prev_label && !strcmp(label, prev_label)) |
5170 | type_idx++; | 5236 | type_idx++; |
5171 | else | 5237 | else |
5172 | type_idx = 0; | 5238 | type_idx = 0; |
5173 | label = hda_get_autocfg_input_label(codec, cfg, i); | 5239 | prev_label = label; |
5240 | |||
5174 | if (mixer) { | 5241 | if (mixer) { |
5175 | idx = get_connection_index(codec, mixer, pin); | 5242 | idx = get_connection_index(codec, mixer, pin); |
5176 | if (idx >= 0) { | 5243 | if (idx >= 0) { |
@@ -7406,7 +7473,7 @@ static struct hda_input_mux alc883_lenovo_nb0763_capture_source = { | |||
7406 | .num_items = 4, | 7473 | .num_items = 4, |
7407 | .items = { | 7474 | .items = { |
7408 | { "Mic", 0x0 }, | 7475 | { "Mic", 0x0 }, |
7409 | { "Int Mic", 0x1 }, | 7476 | { "Internal Mic", 0x1 }, |
7410 | { "Line", 0x2 }, | 7477 | { "Line", 0x2 }, |
7411 | { "CD", 0x4 }, | 7478 | { "CD", 0x4 }, |
7412 | }, | 7479 | }, |
@@ -7416,7 +7483,7 @@ static struct hda_input_mux alc883_fujitsu_pi2515_capture_source = { | |||
7416 | .num_items = 2, | 7483 | .num_items = 2, |
7417 | .items = { | 7484 | .items = { |
7418 | { "Mic", 0x0 }, | 7485 | { "Mic", 0x0 }, |
7419 | { "Int Mic", 0x1 }, | 7486 | { "Internal Mic", 0x1 }, |
7420 | }, | 7487 | }, |
7421 | }; | 7488 | }; |
7422 | 7489 | ||
@@ -7851,10 +7918,10 @@ static struct snd_kcontrol_new alc882_base_mixer[] = { | |||
7851 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | 7918 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), |
7852 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 7919 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
7853 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 7920 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
7854 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 7921 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
7855 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 7922 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
7856 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 7923 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
7857 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 7924 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), |
7858 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 7925 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
7859 | { } /* end */ | 7926 | { } /* end */ |
7860 | }; | 7927 | }; |
@@ -7878,8 +7945,8 @@ static struct snd_kcontrol_new alc885_mbp3_mixer[] = { | |||
7878 | HDA_CODEC_MUTE ("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 7945 | HDA_CODEC_MUTE ("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
7879 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x00, HDA_INPUT), | 7946 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x00, HDA_INPUT), |
7880 | HDA_CODEC_MUTE ("Mic Playback Switch", 0x0b, 0x00, HDA_INPUT), | 7947 | HDA_CODEC_MUTE ("Mic Playback Switch", 0x0b, 0x00, HDA_INPUT), |
7881 | HDA_CODEC_VOLUME("Line Boost", 0x1a, 0x00, HDA_INPUT), | 7948 | HDA_CODEC_VOLUME("Line Boost Volume", 0x1a, 0x00, HDA_INPUT), |
7882 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0x00, HDA_INPUT), | 7949 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0x00, HDA_INPUT), |
7883 | { } /* end */ | 7950 | { } /* end */ |
7884 | }; | 7951 | }; |
7885 | 7952 | ||
@@ -7896,8 +7963,8 @@ static struct snd_kcontrol_new alc885_mb5_mixer[] = { | |||
7896 | HDA_CODEC_MUTE ("Line Playback Switch", 0x0b, 0x07, HDA_INPUT), | 7963 | HDA_CODEC_MUTE ("Line Playback Switch", 0x0b, 0x07, HDA_INPUT), |
7897 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | 7964 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), |
7898 | HDA_CODEC_MUTE ("Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | 7965 | HDA_CODEC_MUTE ("Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), |
7899 | HDA_CODEC_VOLUME("Line Boost", 0x15, 0x00, HDA_INPUT), | 7966 | HDA_CODEC_VOLUME("Line Boost Volume", 0x15, 0x00, HDA_INPUT), |
7900 | HDA_CODEC_VOLUME("Mic Boost", 0x19, 0x00, HDA_INPUT), | 7967 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x19, 0x00, HDA_INPUT), |
7901 | { } /* end */ | 7968 | { } /* end */ |
7902 | }; | 7969 | }; |
7903 | 7970 | ||
@@ -7912,7 +7979,7 @@ static struct snd_kcontrol_new alc885_macmini3_mixer[] = { | |||
7912 | HDA_BIND_MUTE ("Headphone Playback Switch", 0x0f, 0x02, HDA_INPUT), | 7979 | HDA_BIND_MUTE ("Headphone Playback Switch", 0x0f, 0x02, HDA_INPUT), |
7913 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x07, HDA_INPUT), | 7980 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x07, HDA_INPUT), |
7914 | HDA_CODEC_MUTE ("Line Playback Switch", 0x0b, 0x07, HDA_INPUT), | 7981 | HDA_CODEC_MUTE ("Line Playback Switch", 0x0b, 0x07, HDA_INPUT), |
7915 | HDA_CODEC_VOLUME("Line Boost", 0x15, 0x00, HDA_INPUT), | 7982 | HDA_CODEC_VOLUME("Line Boost Volume", 0x15, 0x00, HDA_INPUT), |
7916 | { } /* end */ | 7983 | { } /* end */ |
7917 | }; | 7984 | }; |
7918 | 7985 | ||
@@ -7931,7 +7998,7 @@ static struct snd_kcontrol_new alc882_w2jc_mixer[] = { | |||
7931 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | 7998 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), |
7932 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 7999 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
7933 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 8000 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
7934 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 8001 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
7935 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 8002 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
7936 | { } /* end */ | 8003 | { } /* end */ |
7937 | }; | 8004 | }; |
@@ -7946,10 +8013,10 @@ static struct snd_kcontrol_new alc882_targa_mixer[] = { | |||
7946 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 8013 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
7947 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 8014 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
7948 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 8015 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
7949 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 8016 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
7950 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 8017 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
7951 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 8018 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
7952 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 8019 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), |
7953 | { } /* end */ | 8020 | { } /* end */ |
7954 | }; | 8021 | }; |
7955 | 8022 | ||
@@ -7969,7 +8036,7 @@ static struct snd_kcontrol_new alc882_asus_a7j_mixer[] = { | |||
7969 | HDA_CODEC_MUTE("Mobile Line Playback Switch", 0x0b, 0x03, HDA_INPUT), | 8036 | HDA_CODEC_MUTE("Mobile Line Playback Switch", 0x0b, 0x03, HDA_INPUT), |
7970 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 8037 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
7971 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 8038 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
7972 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 8039 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
7973 | { } /* end */ | 8040 | { } /* end */ |
7974 | }; | 8041 | }; |
7975 | 8042 | ||
@@ -7982,7 +8049,7 @@ static struct snd_kcontrol_new alc882_asus_a7m_mixer[] = { | |||
7982 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | 8049 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), |
7983 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 8050 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
7984 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 8051 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
7985 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 8052 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
7986 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 8053 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
7987 | { } /* end */ | 8054 | { } /* end */ |
7988 | }; | 8055 | }; |
@@ -8763,10 +8830,10 @@ static struct snd_kcontrol_new alc883_mitac_mixer[] = { | |||
8763 | HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT), | 8830 | HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT), |
8764 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | 8831 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), |
8765 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 8832 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
8766 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 8833 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
8767 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 8834 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
8768 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 8835 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
8769 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 8836 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), |
8770 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 8837 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
8771 | { } /* end */ | 8838 | { } /* end */ |
8772 | }; | 8839 | }; |
@@ -8777,11 +8844,11 @@ static struct snd_kcontrol_new alc883_clevo_m720_mixer[] = { | |||
8777 | HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0d, 0x0, HDA_OUTPUT), | 8844 | HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0d, 0x0, HDA_OUTPUT), |
8778 | HDA_BIND_MUTE("Speaker Playback Switch", 0x0d, 2, HDA_INPUT), | 8845 | HDA_BIND_MUTE("Speaker Playback Switch", 0x0d, 2, HDA_INPUT), |
8779 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 8846 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
8780 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 8847 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
8781 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 8848 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
8782 | HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 8849 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
8783 | HDA_CODEC_VOLUME("Int Mic Boost", 0x19, 0, HDA_INPUT), | 8850 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), |
8784 | HDA_CODEC_MUTE("Int Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 8851 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
8785 | { } /* end */ | 8852 | { } /* end */ |
8786 | }; | 8853 | }; |
8787 | 8854 | ||
@@ -8791,11 +8858,11 @@ static struct snd_kcontrol_new alc883_2ch_fujitsu_pi2515_mixer[] = { | |||
8791 | HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0d, 0x0, HDA_OUTPUT), | 8858 | HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0d, 0x0, HDA_OUTPUT), |
8792 | HDA_BIND_MUTE("Speaker Playback Switch", 0x0d, 2, HDA_INPUT), | 8859 | HDA_BIND_MUTE("Speaker Playback Switch", 0x0d, 2, HDA_INPUT), |
8793 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 8860 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
8794 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 8861 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
8795 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 8862 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
8796 | HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 8863 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
8797 | HDA_CODEC_VOLUME("Int Mic Boost", 0x19, 0, HDA_INPUT), | 8864 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), |
8798 | HDA_CODEC_MUTE("Int Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 8865 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
8799 | { } /* end */ | 8866 | { } /* end */ |
8800 | }; | 8867 | }; |
8801 | 8868 | ||
@@ -8808,10 +8875,10 @@ static struct snd_kcontrol_new alc883_3ST_2ch_mixer[] = { | |||
8808 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | 8875 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), |
8809 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 8876 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
8810 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 8877 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
8811 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 8878 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
8812 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 8879 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
8813 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 8880 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
8814 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 8881 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), |
8815 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 8882 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
8816 | { } /* end */ | 8883 | { } /* end */ |
8817 | }; | 8884 | }; |
@@ -8831,10 +8898,10 @@ static struct snd_kcontrol_new alc883_3ST_6ch_mixer[] = { | |||
8831 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | 8898 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), |
8832 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 8899 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
8833 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 8900 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
8834 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 8901 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
8835 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 8902 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
8836 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 8903 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
8837 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 8904 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), |
8838 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 8905 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
8839 | { } /* end */ | 8906 | { } /* end */ |
8840 | }; | 8907 | }; |
@@ -8855,10 +8922,10 @@ static struct snd_kcontrol_new alc883_3ST_6ch_intel_mixer[] = { | |||
8855 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | 8922 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), |
8856 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 8923 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
8857 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 8924 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
8858 | HDA_CODEC_VOLUME("Mic Boost", 0x19, 0, HDA_INPUT), | 8925 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x19, 0, HDA_INPUT), |
8859 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 8926 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
8860 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 8927 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
8861 | HDA_CODEC_VOLUME("Front Mic Boost", 0x18, 0, HDA_INPUT), | 8928 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x18, 0, HDA_INPUT), |
8862 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 8929 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
8863 | { } /* end */ | 8930 | { } /* end */ |
8864 | }; | 8931 | }; |
@@ -8879,10 +8946,10 @@ static struct snd_kcontrol_new alc885_8ch_intel_mixer[] = { | |||
8879 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | 8946 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), |
8880 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 8947 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
8881 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x3, HDA_INPUT), | 8948 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x3, HDA_INPUT), |
8882 | HDA_CODEC_VOLUME("Mic Boost", 0x1b, 0, HDA_INPUT), | 8949 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x1b, 0, HDA_INPUT), |
8883 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x3, HDA_INPUT), | 8950 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x3, HDA_INPUT), |
8884 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 8951 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
8885 | HDA_CODEC_VOLUME("Front Mic Boost", 0x18, 0, HDA_INPUT), | 8952 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x18, 0, HDA_INPUT), |
8886 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 8953 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
8887 | { } /* end */ | 8954 | { } /* end */ |
8888 | }; | 8955 | }; |
@@ -8902,10 +8969,10 @@ static struct snd_kcontrol_new alc883_fivestack_mixer[] = { | |||
8902 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | 8969 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), |
8903 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 8970 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
8904 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 8971 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
8905 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 8972 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
8906 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 8973 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
8907 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 8974 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
8908 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 8975 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), |
8909 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 8976 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
8910 | { } /* end */ | 8977 | { } /* end */ |
8911 | }; | 8978 | }; |
@@ -8926,7 +8993,7 @@ static struct snd_kcontrol_new alc883_targa_mixer[] = { | |||
8926 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | 8993 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), |
8927 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 8994 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
8928 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 8995 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
8929 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 8996 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
8930 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 8997 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
8931 | { } /* end */ | 8998 | { } /* end */ |
8932 | }; | 8999 | }; |
@@ -8939,20 +9006,20 @@ static struct snd_kcontrol_new alc883_targa_2ch_mixer[] = { | |||
8939 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | 9006 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), |
8940 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | 9007 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), |
8941 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 9008 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
8942 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 9009 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
8943 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 9010 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
8944 | HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 9011 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
8945 | HDA_CODEC_VOLUME("Int Mic Boost", 0x19, 0, HDA_INPUT), | 9012 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), |
8946 | HDA_CODEC_MUTE("Int Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 9013 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
8947 | { } /* end */ | 9014 | { } /* end */ |
8948 | }; | 9015 | }; |
8949 | 9016 | ||
8950 | static struct snd_kcontrol_new alc883_targa_8ch_mixer[] = { | 9017 | static struct snd_kcontrol_new alc883_targa_8ch_mixer[] = { |
8951 | HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT), | 9018 | HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT), |
8952 | HDA_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT), | 9019 | HDA_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT), |
8953 | HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 9020 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
8954 | HDA_CODEC_VOLUME("Int Mic Boost", 0x19, 0, HDA_INPUT), | 9021 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), |
8955 | HDA_CODEC_MUTE("Int Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 9022 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
8956 | { } /* end */ | 9023 | { } /* end */ |
8957 | }; | 9024 | }; |
8958 | 9025 | ||
@@ -8963,7 +9030,7 @@ static struct snd_kcontrol_new alc883_lenovo_101e_2ch_mixer[] = { | |||
8963 | HDA_BIND_MUTE("Speaker Playback Switch", 0x0d, 2, HDA_INPUT), | 9030 | HDA_BIND_MUTE("Speaker Playback Switch", 0x0d, 2, HDA_INPUT), |
8964 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), | 9031 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), |
8965 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 9032 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
8966 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 9033 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
8967 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 9034 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
8968 | { } /* end */ | 9035 | { } /* end */ |
8969 | }; | 9036 | }; |
@@ -8976,21 +9043,8 @@ static struct snd_kcontrol_new alc883_lenovo_nb0763_mixer[] = { | |||
8976 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | 9043 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), |
8977 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 9044 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
8978 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 9045 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
8979 | HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 9046 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
8980 | HDA_CODEC_MUTE("Int Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 9047 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
8981 | { } /* end */ | ||
8982 | }; | ||
8983 | |||
8984 | static struct snd_kcontrol_new alc883_medion_md2_mixer[] = { | ||
8985 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | ||
8986 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT), | ||
8987 | HDA_CODEC_MUTE("Front Playback Switch", 0x15, 0x0, HDA_OUTPUT), | ||
8988 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | ||
8989 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | ||
8990 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
8991 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
8992 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | ||
8993 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | ||
8994 | { } /* end */ | 9048 | { } /* end */ |
8995 | }; | 9049 | }; |
8996 | 9050 | ||
@@ -9037,7 +9091,7 @@ static struct snd_kcontrol_new alc883_acer_aspire_mixer[] = { | |||
9037 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | 9091 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), |
9038 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 9092 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
9039 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 9093 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
9040 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 9094 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
9041 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 9095 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
9042 | { } /* end */ | 9096 | { } /* end */ |
9043 | }; | 9097 | }; |
@@ -9050,7 +9104,7 @@ static struct snd_kcontrol_new alc888_acer_aspire_6530_mixer[] = { | |||
9050 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | 9104 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), |
9051 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | 9105 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), |
9052 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 9106 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
9053 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 9107 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
9054 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 9108 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
9055 | { } /* end */ | 9109 | { } /* end */ |
9056 | }; | 9110 | }; |
@@ -9072,10 +9126,10 @@ static struct snd_kcontrol_new alc888_lenovo_sky_mixer[] = { | |||
9072 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | 9126 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), |
9073 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 9127 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
9074 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 9128 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
9075 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 9129 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
9076 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 9130 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
9077 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 9131 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
9078 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 9132 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), |
9079 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 9133 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
9080 | { } /* end */ | 9134 | { } /* end */ |
9081 | }; | 9135 | }; |
@@ -9096,8 +9150,8 @@ static struct snd_kcontrol_new alc889A_mb31_mixer[] = { | |||
9096 | HDA_CODEC_MUTE("Enable Headphones", 0x15, 0x00, HDA_OUTPUT), | 9150 | HDA_CODEC_MUTE("Enable Headphones", 0x15, 0x00, HDA_OUTPUT), |
9097 | HDA_CODEC_MUTE_MONO("Enable LFE", 0x16, 2, 0x00, HDA_OUTPUT), | 9151 | HDA_CODEC_MUTE_MONO("Enable LFE", 0x16, 2, 0x00, HDA_OUTPUT), |
9098 | /* Boost mixers */ | 9152 | /* Boost mixers */ |
9099 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0x00, HDA_INPUT), | 9153 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0x00, HDA_INPUT), |
9100 | HDA_CODEC_VOLUME("Line Boost", 0x1a, 0x00, HDA_INPUT), | 9154 | HDA_CODEC_VOLUME("Line Boost Volume", 0x1a, 0x00, HDA_INPUT), |
9101 | /* Input mixers */ | 9155 | /* Input mixers */ |
9102 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x00, HDA_INPUT), | 9156 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x00, HDA_INPUT), |
9103 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x00, HDA_INPUT), | 9157 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x00, HDA_INPUT), |
@@ -9111,7 +9165,7 @@ static struct snd_kcontrol_new alc883_vaiott_mixer[] = { | |||
9111 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | 9165 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), |
9112 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | 9166 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), |
9113 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 9167 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
9114 | HDA_CODEC_VOLUME("Mic Boost", 0x19, 0, HDA_INPUT), | 9168 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x19, 0, HDA_INPUT), |
9115 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 9169 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
9116 | { } /* end */ | 9170 | { } /* end */ |
9117 | }; | 9171 | }; |
@@ -9141,7 +9195,7 @@ static struct snd_kcontrol_new alc883_asus_eee1601_mixer[] = { | |||
9141 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | 9195 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), |
9142 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 9196 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
9143 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 9197 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
9144 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 9198 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
9145 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 9199 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
9146 | { } /* end */ | 9200 | { } /* end */ |
9147 | }; | 9201 | }; |
@@ -9182,16 +9236,6 @@ static void alc883_mitac_setup(struct hda_codec *codec) | |||
9182 | spec->autocfg.speaker_pins[1] = 0x17; | 9236 | spec->autocfg.speaker_pins[1] = 0x17; |
9183 | } | 9237 | } |
9184 | 9238 | ||
9185 | /* auto-toggle front mic */ | ||
9186 | /* | ||
9187 | static void alc883_mitac_mic_automute(struct hda_codec *codec) | ||
9188 | { | ||
9189 | unsigned char bits = snd_hda_jack_detect(codec, 0x18) ? HDA_AMP_MUTE : 0; | ||
9190 | |||
9191 | snd_hda_codec_amp_stereo(codec, 0x0b, HDA_INPUT, 1, HDA_AMP_MUTE, bits); | ||
9192 | } | ||
9193 | */ | ||
9194 | |||
9195 | static struct hda_verb alc883_mitac_verbs[] = { | 9239 | static struct hda_verb alc883_mitac_verbs[] = { |
9196 | /* HP */ | 9240 | /* HP */ |
9197 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, | 9241 | {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, |
@@ -9435,18 +9479,8 @@ static void alc883_lenovo_ms7195_unsol_event(struct hda_codec *codec, | |||
9435 | alc888_lenovo_ms7195_rca_automute(codec); | 9479 | alc888_lenovo_ms7195_rca_automute(codec); |
9436 | } | 9480 | } |
9437 | 9481 | ||
9438 | static struct hda_verb alc883_medion_md2_verbs[] = { | ||
9439 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, | ||
9440 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
9441 | |||
9442 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
9443 | |||
9444 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN}, | ||
9445 | { } /* end */ | ||
9446 | }; | ||
9447 | |||
9448 | /* toggle speaker-output according to the hp-jack state */ | 9482 | /* toggle speaker-output according to the hp-jack state */ |
9449 | static void alc883_medion_md2_setup(struct hda_codec *codec) | 9483 | static void alc883_lenovo_nb0763_setup(struct hda_codec *codec) |
9450 | { | 9484 | { |
9451 | struct alc_spec *spec = codec->spec; | 9485 | struct alc_spec *spec = codec->spec; |
9452 | 9486 | ||
@@ -9458,15 +9492,6 @@ static void alc883_medion_md2_setup(struct hda_codec *codec) | |||
9458 | #define alc883_targa_init_hook alc882_targa_init_hook | 9492 | #define alc883_targa_init_hook alc882_targa_init_hook |
9459 | #define alc883_targa_unsol_event alc882_targa_unsol_event | 9493 | #define alc883_targa_unsol_event alc882_targa_unsol_event |
9460 | 9494 | ||
9461 | static void alc883_clevo_m720_mic_automute(struct hda_codec *codec) | ||
9462 | { | ||
9463 | unsigned int present; | ||
9464 | |||
9465 | present = snd_hda_jack_detect(codec, 0x18); | ||
9466 | snd_hda_codec_amp_stereo(codec, 0x0b, HDA_INPUT, 1, | ||
9467 | HDA_AMP_MUTE, present ? HDA_AMP_MUTE : 0); | ||
9468 | } | ||
9469 | |||
9470 | static void alc883_clevo_m720_setup(struct hda_codec *codec) | 9495 | static void alc883_clevo_m720_setup(struct hda_codec *codec) |
9471 | { | 9496 | { |
9472 | struct alc_spec *spec = codec->spec; | 9497 | struct alc_spec *spec = codec->spec; |
@@ -9478,7 +9503,7 @@ static void alc883_clevo_m720_setup(struct hda_codec *codec) | |||
9478 | static void alc883_clevo_m720_init_hook(struct hda_codec *codec) | 9503 | static void alc883_clevo_m720_init_hook(struct hda_codec *codec) |
9479 | { | 9504 | { |
9480 | alc_automute_amp(codec); | 9505 | alc_automute_amp(codec); |
9481 | alc883_clevo_m720_mic_automute(codec); | 9506 | alc88x_simple_mic_automute(codec); |
9482 | } | 9507 | } |
9483 | 9508 | ||
9484 | static void alc883_clevo_m720_unsol_event(struct hda_codec *codec, | 9509 | static void alc883_clevo_m720_unsol_event(struct hda_codec *codec, |
@@ -9486,7 +9511,7 @@ static void alc883_clevo_m720_unsol_event(struct hda_codec *codec, | |||
9486 | { | 9511 | { |
9487 | switch (res >> 26) { | 9512 | switch (res >> 26) { |
9488 | case ALC880_MIC_EVENT: | 9513 | case ALC880_MIC_EVENT: |
9489 | alc883_clevo_m720_mic_automute(codec); | 9514 | alc88x_simple_mic_automute(codec); |
9490 | break; | 9515 | break; |
9491 | default: | 9516 | default: |
9492 | alc_automute_amp_unsol_event(codec, res); | 9517 | alc_automute_amp_unsol_event(codec, res); |
@@ -9731,7 +9756,6 @@ static const char *alc882_models[ALC882_MODEL_LAST] = { | |||
9731 | [ALC888_ACER_ASPIRE_8930G] = "acer-aspire-8930g", | 9756 | [ALC888_ACER_ASPIRE_8930G] = "acer-aspire-8930g", |
9732 | [ALC888_ACER_ASPIRE_7730G] = "acer-aspire-7730g", | 9757 | [ALC888_ACER_ASPIRE_7730G] = "acer-aspire-7730g", |
9733 | [ALC883_MEDION] = "medion", | 9758 | [ALC883_MEDION] = "medion", |
9734 | [ALC883_MEDION_MD2] = "medion-md2", | ||
9735 | [ALC883_MEDION_WIM2160] = "medion-wim2160", | 9759 | [ALC883_MEDION_WIM2160] = "medion-wim2160", |
9736 | [ALC883_LAPTOP_EAPD] = "laptop-eapd", | 9760 | [ALC883_LAPTOP_EAPD] = "laptop-eapd", |
9737 | [ALC883_LENOVO_101E_2ch] = "lenovo-101e", | 9761 | [ALC883_LENOVO_101E_2ch] = "lenovo-101e", |
@@ -10379,19 +10403,6 @@ static struct alc_config_preset alc882_presets[] = { | |||
10379 | .channel_mode = alc883_sixstack_modes, | 10403 | .channel_mode = alc883_sixstack_modes, |
10380 | .input_mux = &alc883_capture_source, | 10404 | .input_mux = &alc883_capture_source, |
10381 | }, | 10405 | }, |
10382 | [ALC883_MEDION_MD2] = { | ||
10383 | .mixers = { alc883_medion_md2_mixer}, | ||
10384 | .init_verbs = { alc883_init_verbs, alc883_medion_md2_verbs}, | ||
10385 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | ||
10386 | .dac_nids = alc883_dac_nids, | ||
10387 | .dig_out_nid = ALC883_DIGOUT_NID, | ||
10388 | .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes), | ||
10389 | .channel_mode = alc883_3ST_2ch_modes, | ||
10390 | .input_mux = &alc883_capture_source, | ||
10391 | .unsol_event = alc_automute_amp_unsol_event, | ||
10392 | .setup = alc883_medion_md2_setup, | ||
10393 | .init_hook = alc_automute_amp, | ||
10394 | }, | ||
10395 | [ALC883_MEDION_WIM2160] = { | 10406 | [ALC883_MEDION_WIM2160] = { |
10396 | .mixers = { alc883_medion_wim2160_mixer }, | 10407 | .mixers = { alc883_medion_wim2160_mixer }, |
10397 | .init_verbs = { alc883_init_verbs, alc883_medion_wim2160_verbs }, | 10408 | .init_verbs = { alc883_init_verbs, alc883_medion_wim2160_verbs }, |
@@ -10468,7 +10479,7 @@ static struct alc_config_preset alc882_presets[] = { | |||
10468 | .need_dac_fix = 1, | 10479 | .need_dac_fix = 1, |
10469 | .input_mux = &alc883_lenovo_nb0763_capture_source, | 10480 | .input_mux = &alc883_lenovo_nb0763_capture_source, |
10470 | .unsol_event = alc_automute_amp_unsol_event, | 10481 | .unsol_event = alc_automute_amp_unsol_event, |
10471 | .setup = alc883_medion_md2_setup, | 10482 | .setup = alc883_lenovo_nb0763_setup, |
10472 | .init_hook = alc_automute_amp, | 10483 | .init_hook = alc_automute_amp, |
10473 | }, | 10484 | }, |
10474 | [ALC888_LENOVO_MS7195_DIG] = { | 10485 | [ALC888_LENOVO_MS7195_DIG] = { |
@@ -10830,25 +10841,30 @@ static int alc_auto_add_mic_boost(struct hda_codec *codec) | |||
10830 | { | 10841 | { |
10831 | struct alc_spec *spec = codec->spec; | 10842 | struct alc_spec *spec = codec->spec; |
10832 | struct auto_pin_cfg *cfg = &spec->autocfg; | 10843 | struct auto_pin_cfg *cfg = &spec->autocfg; |
10833 | int i, err, type; | 10844 | int i, err; |
10834 | int type_idx = 0; | 10845 | int type_idx = 0; |
10835 | hda_nid_t nid; | 10846 | hda_nid_t nid; |
10847 | const char *prev_label = NULL; | ||
10836 | 10848 | ||
10837 | for (i = 0; i < cfg->num_inputs; i++) { | 10849 | for (i = 0; i < cfg->num_inputs; i++) { |
10838 | if (cfg->inputs[i].type > AUTO_PIN_MIC) | 10850 | if (cfg->inputs[i].type > AUTO_PIN_MIC) |
10839 | break; | 10851 | break; |
10840 | nid = cfg->inputs[i].pin; | 10852 | nid = cfg->inputs[i].pin; |
10841 | if (get_wcaps(codec, nid) & AC_WCAP_IN_AMP) { | 10853 | if (get_wcaps(codec, nid) & AC_WCAP_IN_AMP) { |
10842 | char label[32]; | 10854 | const char *label; |
10843 | type = cfg->inputs[i].type; | 10855 | char boost_label[32]; |
10844 | if (i > 0 && type == cfg->inputs[i - 1].type) | 10856 | |
10857 | label = hda_get_autocfg_input_label(codec, cfg, i); | ||
10858 | if (prev_label && !strcmp(label, prev_label)) | ||
10845 | type_idx++; | 10859 | type_idx++; |
10846 | else | 10860 | else |
10847 | type_idx = 0; | 10861 | type_idx = 0; |
10848 | snprintf(label, sizeof(label), "%s Boost", | 10862 | prev_label = label; |
10849 | hda_get_autocfg_input_label(codec, cfg, i)); | 10863 | |
10850 | err = add_control(spec, ALC_CTL_WIDGET_VOL, label, | 10864 | snprintf(boost_label, sizeof(boost_label), |
10851 | type_idx, | 10865 | "%s Boost Volume", label); |
10866 | err = add_control(spec, ALC_CTL_WIDGET_VOL, | ||
10867 | boost_label, type_idx, | ||
10852 | HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_INPUT)); | 10868 | HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_INPUT)); |
10853 | if (err < 0) | 10869 | if (err < 0) |
10854 | return err; | 10870 | return err; |
@@ -11096,10 +11112,10 @@ static struct snd_kcontrol_new alc262_base_mixer[] = { | |||
11096 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 11112 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
11097 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 11113 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
11098 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 11114 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
11099 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 11115 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
11100 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | 11116 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), |
11101 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | 11117 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), |
11102 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 11118 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), |
11103 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0D, 0x0, HDA_OUTPUT), | 11119 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0D, 0x0, HDA_OUTPUT), |
11104 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | 11120 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), |
11105 | HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), | 11121 | HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT), |
@@ -11200,10 +11216,10 @@ static struct snd_kcontrol_new alc262_HP_BPC_mixer[] = { | |||
11200 | HDA_OUTPUT), | 11216 | HDA_OUTPUT), |
11201 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 11217 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
11202 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 11218 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
11203 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 11219 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
11204 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | 11220 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), |
11205 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | 11221 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), |
11206 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 11222 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), |
11207 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | 11223 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), |
11208 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 11224 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
11209 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | 11225 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), |
@@ -11225,7 +11241,7 @@ static struct snd_kcontrol_new alc262_HP_BPC_WildWest_mixer[] = { | |||
11225 | HDA_OUTPUT), | 11241 | HDA_OUTPUT), |
11226 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x02, HDA_INPUT), | 11242 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x02, HDA_INPUT), |
11227 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x02, HDA_INPUT), | 11243 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x02, HDA_INPUT), |
11228 | HDA_CODEC_VOLUME("Front Mic Boost", 0x1a, 0, HDA_INPUT), | 11244 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x1a, 0, HDA_INPUT), |
11229 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x01, HDA_INPUT), | 11245 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x01, HDA_INPUT), |
11230 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x01, HDA_INPUT), | 11246 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x01, HDA_INPUT), |
11231 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | 11247 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), |
@@ -11236,7 +11252,7 @@ static struct snd_kcontrol_new alc262_HP_BPC_WildWest_mixer[] = { | |||
11236 | static struct snd_kcontrol_new alc262_HP_BPC_WildWest_option_mixer[] = { | 11252 | static struct snd_kcontrol_new alc262_HP_BPC_WildWest_option_mixer[] = { |
11237 | HDA_CODEC_VOLUME("Rear Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 11253 | HDA_CODEC_VOLUME("Rear Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
11238 | HDA_CODEC_MUTE("Rear Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 11254 | HDA_CODEC_MUTE("Rear Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
11239 | HDA_CODEC_VOLUME("Rear Mic Boost", 0x18, 0, HDA_INPUT), | 11255 | HDA_CODEC_VOLUME("Rear Mic Boost Volume", 0x18, 0, HDA_INPUT), |
11240 | { } /* end */ | 11256 | { } /* end */ |
11241 | }; | 11257 | }; |
11242 | 11258 | ||
@@ -11256,7 +11272,7 @@ static struct snd_kcontrol_new alc262_hp_t5735_mixer[] = { | |||
11256 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | 11272 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), |
11257 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 11273 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
11258 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 11274 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
11259 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 11275 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
11260 | { } /* end */ | 11276 | { } /* end */ |
11261 | }; | 11277 | }; |
11262 | 11278 | ||
@@ -11363,10 +11379,10 @@ static struct snd_kcontrol_new alc262_hippo_mixer[] = { | |||
11363 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 11379 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
11364 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 11380 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
11365 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 11381 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
11366 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 11382 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
11367 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | 11383 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), |
11368 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | 11384 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), |
11369 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 11385 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), |
11370 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0d, 0x0, HDA_OUTPUT), | 11386 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0d, 0x0, HDA_OUTPUT), |
11371 | { } /* end */ | 11387 | { } /* end */ |
11372 | }; | 11388 | }; |
@@ -11380,10 +11396,10 @@ static struct snd_kcontrol_new alc262_hippo1_mixer[] = { | |||
11380 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 11396 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
11381 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 11397 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
11382 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 11398 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
11383 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 11399 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
11384 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | 11400 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), |
11385 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | 11401 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), |
11386 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 11402 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), |
11387 | { } /* end */ | 11403 | { } /* end */ |
11388 | }; | 11404 | }; |
11389 | 11405 | ||
@@ -11451,10 +11467,10 @@ static struct snd_kcontrol_new alc262_tyan_mixer[] = { | |||
11451 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 11467 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
11452 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 11468 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
11453 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 11469 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
11454 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 11470 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
11455 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | 11471 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), |
11456 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | 11472 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), |
11457 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 11473 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), |
11458 | { } /* end */ | 11474 | { } /* end */ |
11459 | }; | 11475 | }; |
11460 | 11476 | ||
@@ -11638,7 +11654,7 @@ static struct snd_kcontrol_new alc262_nec_mixer[] = { | |||
11638 | 11654 | ||
11639 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 11655 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
11640 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 11656 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
11641 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 11657 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
11642 | 11658 | ||
11643 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0d, 0x0, HDA_OUTPUT), | 11659 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0d, 0x0, HDA_OUTPUT), |
11644 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | 11660 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), |
@@ -11693,7 +11709,7 @@ static struct hda_input_mux alc262_fujitsu_capture_source = { | |||
11693 | .num_items = 3, | 11709 | .num_items = 3, |
11694 | .items = { | 11710 | .items = { |
11695 | { "Mic", 0x0 }, | 11711 | { "Mic", 0x0 }, |
11696 | { "Int Mic", 0x1 }, | 11712 | { "Internal Mic", 0x1 }, |
11697 | { "CD", 0x4 }, | 11713 | { "CD", 0x4 }, |
11698 | }, | 11714 | }, |
11699 | }; | 11715 | }; |
@@ -11845,12 +11861,12 @@ static struct snd_kcontrol_new alc262_fujitsu_mixer[] = { | |||
11845 | }, | 11861 | }, |
11846 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | 11862 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), |
11847 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | 11863 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), |
11848 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 11864 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
11849 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 11865 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
11850 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 11866 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
11851 | HDA_CODEC_VOLUME("Int Mic Boost", 0x19, 0, HDA_INPUT), | 11867 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), |
11852 | HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 11868 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
11853 | HDA_CODEC_MUTE("Int Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 11869 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
11854 | { } /* end */ | 11870 | { } /* end */ |
11855 | }; | 11871 | }; |
11856 | 11872 | ||
@@ -11881,12 +11897,12 @@ static struct snd_kcontrol_new alc262_lenovo_3000_mixer[] = { | |||
11881 | }, | 11897 | }, |
11882 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | 11898 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), |
11883 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | 11899 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), |
11884 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 11900 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
11885 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 11901 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
11886 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 11902 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
11887 | HDA_CODEC_VOLUME("Int Mic Boost", 0x19, 0, HDA_INPUT), | 11903 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), |
11888 | HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 11904 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
11889 | HDA_CODEC_MUTE("Int Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 11905 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
11890 | { } /* end */ | 11906 | { } /* end */ |
11891 | }; | 11907 | }; |
11892 | 11908 | ||
@@ -11895,10 +11911,10 @@ static struct snd_kcontrol_new alc262_toshiba_rx1_mixer[] = { | |||
11895 | ALC262_HIPPO_MASTER_SWITCH, | 11911 | ALC262_HIPPO_MASTER_SWITCH, |
11896 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 11912 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
11897 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 11913 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
11898 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 11914 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
11899 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | 11915 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), |
11900 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | 11916 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), |
11901 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 11917 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), |
11902 | { } /* end */ | 11918 | { } /* end */ |
11903 | }; | 11919 | }; |
11904 | 11920 | ||
@@ -11924,8 +11940,8 @@ static struct snd_kcontrol_new alc262_ultra_mixer[] = { | |||
11924 | HDA_BIND_MUTE("Master Playback Switch", 0x0c, 2, HDA_INPUT), | 11940 | HDA_BIND_MUTE("Master Playback Switch", 0x0c, 2, HDA_INPUT), |
11925 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | 11941 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), |
11926 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | 11942 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), |
11927 | HDA_CODEC_VOLUME("Mic Boost", 0x19, 0, HDA_INPUT), | 11943 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x19, 0, HDA_INPUT), |
11928 | HDA_CODEC_VOLUME("Headphone Mic Boost", 0x15, 0, HDA_INPUT), | 11944 | HDA_CODEC_VOLUME("Headphone Mic Boost Volume", 0x15, 0, HDA_INPUT), |
11929 | { } /* end */ | 11945 | { } /* end */ |
11930 | }; | 11946 | }; |
11931 | 11947 | ||
@@ -12095,13 +12111,8 @@ static int alc262_auto_create_multi_out_ctls(struct alc_spec *spec, | |||
12095 | spec->multiout.dac_nids = spec->private_dac_nids; | 12111 | spec->multiout.dac_nids = spec->private_dac_nids; |
12096 | spec->multiout.dac_nids[0] = 2; | 12112 | spec->multiout.dac_nids[0] = 2; |
12097 | 12113 | ||
12098 | if (!cfg->speaker_pins[0] && !cfg->hp_pins[0]) | 12114 | pfx = alc_get_line_out_pfx(cfg, true); |
12099 | pfx = "Master"; | 12115 | if (!pfx) |
12100 | else if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) | ||
12101 | pfx = "Speaker"; | ||
12102 | else if (cfg->line_out_type == AUTO_PIN_HP_OUT) | ||
12103 | pfx = "Headphone"; | ||
12104 | else | ||
12105 | pfx = "Front"; | 12116 | pfx = "Front"; |
12106 | for (i = 0; i < 2; i++) { | 12117 | for (i = 0; i < 2; i++) { |
12107 | err = alc262_add_out_sw_ctl(spec, cfg->line_out_pins[i], pfx, i); | 12118 | err = alc262_add_out_sw_ctl(spec, cfg->line_out_pins[i], pfx, i); |
@@ -13002,9 +13013,9 @@ static struct snd_kcontrol_new alc268_base_mixer[] = { | |||
13002 | HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT), | 13013 | HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT), |
13003 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x3, 0x0, HDA_OUTPUT), | 13014 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x3, 0x0, HDA_OUTPUT), |
13004 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | 13015 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), |
13005 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 13016 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
13006 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 13017 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), |
13007 | HDA_CODEC_VOLUME("Line In Boost", 0x1a, 0, HDA_INPUT), | 13018 | HDA_CODEC_VOLUME("Line In Boost Volume", 0x1a, 0, HDA_INPUT), |
13008 | { } | 13019 | { } |
13009 | }; | 13020 | }; |
13010 | 13021 | ||
@@ -13013,9 +13024,9 @@ static struct snd_kcontrol_new alc268_toshiba_mixer[] = { | |||
13013 | HDA_CODEC_VOLUME("Front Playback Volume", 0x2, 0x0, HDA_OUTPUT), | 13024 | HDA_CODEC_VOLUME("Front Playback Volume", 0x2, 0x0, HDA_OUTPUT), |
13014 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x3, 0x0, HDA_OUTPUT), | 13025 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x3, 0x0, HDA_OUTPUT), |
13015 | ALC262_HIPPO_MASTER_SWITCH, | 13026 | ALC262_HIPPO_MASTER_SWITCH, |
13016 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 13027 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
13017 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 13028 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), |
13018 | HDA_CODEC_VOLUME("Line In Boost", 0x1a, 0, HDA_INPUT), | 13029 | HDA_CODEC_VOLUME("Line In Boost Volume", 0x1a, 0, HDA_INPUT), |
13019 | { } | 13030 | { } |
13020 | }; | 13031 | }; |
13021 | 13032 | ||
@@ -13119,9 +13130,9 @@ static struct snd_kcontrol_new alc268_acer_mixer[] = { | |||
13119 | .put = alc268_acer_master_sw_put, | 13130 | .put = alc268_acer_master_sw_put, |
13120 | .private_value = HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT), | 13131 | .private_value = HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT), |
13121 | }, | 13132 | }, |
13122 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 13133 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
13123 | HDA_CODEC_VOLUME("Internal Mic Boost", 0x19, 0, HDA_INPUT), | 13134 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), |
13124 | HDA_CODEC_VOLUME("Line In Boost", 0x1a, 0, HDA_INPUT), | 13135 | HDA_CODEC_VOLUME("Line In Boost Volume", 0x1a, 0, HDA_INPUT), |
13125 | { } | 13136 | { } |
13126 | }; | 13137 | }; |
13127 | 13138 | ||
@@ -13137,8 +13148,8 @@ static struct snd_kcontrol_new alc268_acer_dmic_mixer[] = { | |||
13137 | .put = alc268_acer_master_sw_put, | 13148 | .put = alc268_acer_master_sw_put, |
13138 | .private_value = HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT), | 13149 | .private_value = HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT), |
13139 | }, | 13150 | }, |
13140 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 13151 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
13141 | HDA_CODEC_VOLUME("Line In Boost", 0x1a, 0, HDA_INPUT), | 13152 | HDA_CODEC_VOLUME("Line In Boost Volume", 0x1a, 0, HDA_INPUT), |
13142 | { } | 13153 | { } |
13143 | }; | 13154 | }; |
13144 | 13155 | ||
@@ -13230,8 +13241,8 @@ static struct snd_kcontrol_new alc268_dell_mixer[] = { | |||
13230 | HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT), | 13241 | HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT), |
13231 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x03, 0x0, HDA_OUTPUT), | 13242 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x03, 0x0, HDA_OUTPUT), |
13232 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | 13243 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), |
13233 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 13244 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
13234 | HDA_CODEC_VOLUME("Internal Mic Boost", 0x19, 0, HDA_INPUT), | 13245 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), |
13235 | { } | 13246 | { } |
13236 | }; | 13247 | }; |
13237 | 13248 | ||
@@ -13264,8 +13275,8 @@ static struct snd_kcontrol_new alc267_quanta_il1_mixer[] = { | |||
13264 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | 13275 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), |
13265 | HDA_CODEC_VOLUME("Mic Capture Volume", 0x23, 0x0, HDA_OUTPUT), | 13276 | HDA_CODEC_VOLUME("Mic Capture Volume", 0x23, 0x0, HDA_OUTPUT), |
13266 | HDA_BIND_MUTE("Mic Capture Switch", 0x23, 2, HDA_OUTPUT), | 13277 | HDA_BIND_MUTE("Mic Capture Switch", 0x23, 2, HDA_OUTPUT), |
13267 | HDA_CODEC_VOLUME("Ext Mic Boost", 0x18, 0, HDA_INPUT), | 13278 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
13268 | HDA_CODEC_VOLUME("Int Mic Boost", 0x19, 0, HDA_INPUT), | 13279 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), |
13269 | { } | 13280 | { } |
13270 | }; | 13281 | }; |
13271 | 13282 | ||
@@ -14088,10 +14099,10 @@ static struct snd_kcontrol_new alc269_base_mixer[] = { | |||
14088 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 14099 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
14089 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 14100 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
14090 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 14101 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
14091 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 14102 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
14092 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | 14103 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), |
14093 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | 14104 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), |
14094 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 14105 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), |
14095 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | 14106 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), |
14096 | HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x16, 2, 0x0, HDA_OUTPUT), | 14107 | HDA_CODEC_MUTE_MONO("Mono Playback Switch", 0x16, 2, 0x0, HDA_OUTPUT), |
14097 | { } /* end */ | 14108 | { } /* end */ |
@@ -14111,10 +14122,10 @@ static struct snd_kcontrol_new alc269_quanta_fl1_mixer[] = { | |||
14111 | }, | 14122 | }, |
14112 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 14123 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
14113 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 14124 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
14114 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 14125 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
14115 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | 14126 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), |
14116 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | 14127 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), |
14117 | HDA_CODEC_VOLUME("Internal Mic Boost", 0x19, 0, HDA_INPUT), | 14128 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), |
14118 | { } | 14129 | { } |
14119 | }; | 14130 | }; |
14120 | 14131 | ||
@@ -14132,13 +14143,13 @@ static struct snd_kcontrol_new alc269_lifebook_mixer[] = { | |||
14132 | }, | 14143 | }, |
14133 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 14144 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
14134 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 14145 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
14135 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 14146 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
14136 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | 14147 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), |
14137 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | 14148 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), |
14138 | HDA_CODEC_VOLUME("Internal Mic Boost", 0x19, 0, HDA_INPUT), | 14149 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), |
14139 | HDA_CODEC_VOLUME("Dock Mic Playback Volume", 0x0b, 0x03, HDA_INPUT), | 14150 | HDA_CODEC_VOLUME("Dock Mic Playback Volume", 0x0b, 0x03, HDA_INPUT), |
14140 | HDA_CODEC_MUTE("Dock Mic Playback Switch", 0x0b, 0x03, HDA_INPUT), | 14151 | HDA_CODEC_MUTE("Dock Mic Playback Switch", 0x0b, 0x03, HDA_INPUT), |
14141 | HDA_CODEC_VOLUME("Dock Mic Boost", 0x1b, 0, HDA_INPUT), | 14152 | HDA_CODEC_VOLUME("Dock Mic Boost Volume", 0x1b, 0, HDA_INPUT), |
14142 | { } | 14153 | { } |
14143 | }; | 14154 | }; |
14144 | 14155 | ||
@@ -14168,30 +14179,30 @@ static struct snd_kcontrol_new alc269_asus_mixer[] = { | |||
14168 | static struct snd_kcontrol_new alc269_laptop_analog_capture_mixer[] = { | 14179 | static struct snd_kcontrol_new alc269_laptop_analog_capture_mixer[] = { |
14169 | HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), | 14180 | HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), |
14170 | HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), | 14181 | HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), |
14171 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 14182 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
14172 | HDA_CODEC_VOLUME("IntMic Boost", 0x19, 0, HDA_INPUT), | 14183 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), |
14173 | { } /* end */ | 14184 | { } /* end */ |
14174 | }; | 14185 | }; |
14175 | 14186 | ||
14176 | static struct snd_kcontrol_new alc269_laptop_digital_capture_mixer[] = { | 14187 | static struct snd_kcontrol_new alc269_laptop_digital_capture_mixer[] = { |
14177 | HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), | 14188 | HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), |
14178 | HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), | 14189 | HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), |
14179 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 14190 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
14180 | { } /* end */ | 14191 | { } /* end */ |
14181 | }; | 14192 | }; |
14182 | 14193 | ||
14183 | static struct snd_kcontrol_new alc269vb_laptop_analog_capture_mixer[] = { | 14194 | static struct snd_kcontrol_new alc269vb_laptop_analog_capture_mixer[] = { |
14184 | HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT), | 14195 | HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT), |
14185 | HDA_CODEC_MUTE("Capture Switch", 0x09, 0x0, HDA_INPUT), | 14196 | HDA_CODEC_MUTE("Capture Switch", 0x09, 0x0, HDA_INPUT), |
14186 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 14197 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
14187 | HDA_CODEC_VOLUME("IntMic Boost", 0x19, 0, HDA_INPUT), | 14198 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), |
14188 | { } /* end */ | 14199 | { } /* end */ |
14189 | }; | 14200 | }; |
14190 | 14201 | ||
14191 | static struct snd_kcontrol_new alc269vb_laptop_digital_capture_mixer[] = { | 14202 | static struct snd_kcontrol_new alc269vb_laptop_digital_capture_mixer[] = { |
14192 | HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT), | 14203 | HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT), |
14193 | HDA_CODEC_MUTE("Capture Switch", 0x09, 0x0, HDA_INPUT), | 14204 | HDA_CODEC_MUTE("Capture Switch", 0x09, 0x0, HDA_INPUT), |
14194 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 14205 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
14195 | { } /* end */ | 14206 | { } /* end */ |
14196 | }; | 14207 | }; |
14197 | 14208 | ||
@@ -14810,12 +14821,23 @@ static int alc269_resume(struct hda_codec *codec) | |||
14810 | } | 14821 | } |
14811 | #endif /* SND_HDA_NEEDS_RESUME */ | 14822 | #endif /* SND_HDA_NEEDS_RESUME */ |
14812 | 14823 | ||
14824 | static void alc269_fixup_hweq(struct hda_codec *codec, | ||
14825 | const struct alc_fixup *fix, int pre_init) | ||
14826 | { | ||
14827 | int coef; | ||
14828 | |||
14829 | coef = alc_read_coef_idx(codec, 0x1e); | ||
14830 | alc_write_coef_idx(codec, 0x1e, coef | 0x80); | ||
14831 | } | ||
14832 | |||
14813 | enum { | 14833 | enum { |
14814 | ALC269_FIXUP_SONY_VAIO, | 14834 | ALC269_FIXUP_SONY_VAIO, |
14815 | ALC275_FIX_SONY_VAIO_GPIO2, | 14835 | ALC275_FIX_SONY_VAIO_GPIO2, |
14816 | ALC269_FIXUP_DELL_M101Z, | 14836 | ALC269_FIXUP_DELL_M101Z, |
14817 | ALC269_FIXUP_SKU_IGNORE, | 14837 | ALC269_FIXUP_SKU_IGNORE, |
14818 | ALC269_FIXUP_ASUS_G73JW, | 14838 | ALC269_FIXUP_ASUS_G73JW, |
14839 | ALC269_FIXUP_LENOVO_EAPD, | ||
14840 | ALC275_FIXUP_SONY_HWEQ, | ||
14819 | }; | 14841 | }; |
14820 | 14842 | ||
14821 | static const struct alc_fixup alc269_fixups[] = { | 14843 | static const struct alc_fixup alc269_fixups[] = { |
@@ -14830,6 +14852,7 @@ static const struct alc_fixup alc269_fixups[] = { | |||
14830 | {0x01, AC_VERB_SET_GPIO_MASK, 0x04}, | 14852 | {0x01, AC_VERB_SET_GPIO_MASK, 0x04}, |
14831 | {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x04}, | 14853 | {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x04}, |
14832 | {0x01, AC_VERB_SET_GPIO_DATA, 0x00}, | 14854 | {0x01, AC_VERB_SET_GPIO_DATA, 0x00}, |
14855 | {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREFGRD}, | ||
14833 | { } | 14856 | { } |
14834 | } | 14857 | } |
14835 | }, | 14858 | }, |
@@ -14850,17 +14873,34 @@ static const struct alc_fixup alc269_fixups[] = { | |||
14850 | { } | 14873 | { } |
14851 | } | 14874 | } |
14852 | }, | 14875 | }, |
14876 | [ALC269_FIXUP_LENOVO_EAPD] = { | ||
14877 | .verbs = (const struct hda_verb[]) { | ||
14878 | {0x14, AC_VERB_SET_EAPD_BTLENABLE, 0}, | ||
14879 | {} | ||
14880 | } | ||
14881 | }, | ||
14882 | [ALC275_FIXUP_SONY_HWEQ] = { | ||
14883 | .func = alc269_fixup_hweq, | ||
14884 | .verbs = (const struct hda_verb[]) { | ||
14885 | {0x01, AC_VERB_SET_GPIO_MASK, 0x04}, | ||
14886 | {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x04}, | ||
14887 | {0x01, AC_VERB_SET_GPIO_DATA, 0x00}, | ||
14888 | {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREFGRD}, | ||
14889 | { } | ||
14890 | } | ||
14891 | } | ||
14853 | }; | 14892 | }; |
14854 | 14893 | ||
14855 | static struct snd_pci_quirk alc269_fixup_tbl[] = { | 14894 | static struct snd_pci_quirk alc269_fixup_tbl[] = { |
14856 | SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIX_SONY_VAIO_GPIO2), | 14895 | SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIX_SONY_VAIO_GPIO2), |
14857 | SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIX_SONY_VAIO_GPIO2), | 14896 | SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), |
14858 | SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIX_SONY_VAIO_GPIO2), | 14897 | SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), |
14859 | SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), | 14898 | SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), |
14860 | SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), | 14899 | SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), |
14861 | SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE), | 14900 | SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE), |
14862 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE), | 14901 | SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE), |
14863 | SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), | 14902 | SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), |
14903 | SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), | ||
14864 | {} | 14904 | {} |
14865 | }; | 14905 | }; |
14866 | 14906 | ||
@@ -15895,13 +15935,16 @@ static int alc861_auto_fill_dac_nids(struct hda_codec *codec, | |||
15895 | return 0; | 15935 | return 0; |
15896 | } | 15936 | } |
15897 | 15937 | ||
15898 | static int alc861_create_out_sw(struct hda_codec *codec, const char *pfx, | 15938 | static int __alc861_create_out_sw(struct hda_codec *codec, const char *pfx, |
15899 | hda_nid_t nid, unsigned int chs) | 15939 | hda_nid_t nid, int idx, unsigned int chs) |
15900 | { | 15940 | { |
15901 | return add_pb_sw_ctrl(codec->spec, ALC_CTL_WIDGET_MUTE, pfx, | 15941 | return __add_pb_sw_ctrl(codec->spec, ALC_CTL_WIDGET_MUTE, pfx, idx, |
15902 | HDA_COMPOSE_AMP_VAL(nid, chs, 0, HDA_OUTPUT)); | 15942 | HDA_COMPOSE_AMP_VAL(nid, chs, 0, HDA_OUTPUT)); |
15903 | } | 15943 | } |
15904 | 15944 | ||
15945 | #define alc861_create_out_sw(codec, pfx, nid, chs) \ | ||
15946 | __alc861_create_out_sw(codec, pfx, nid, 0, chs) | ||
15947 | |||
15905 | /* add playback controls from the parsed DAC table */ | 15948 | /* add playback controls from the parsed DAC table */ |
15906 | static int alc861_auto_create_multi_out_ctls(struct hda_codec *codec, | 15949 | static int alc861_auto_create_multi_out_ctls(struct hda_codec *codec, |
15907 | const struct auto_pin_cfg *cfg) | 15950 | const struct auto_pin_cfg *cfg) |
@@ -15910,26 +15953,15 @@ static int alc861_auto_create_multi_out_ctls(struct hda_codec *codec, | |||
15910 | static const char *chname[4] = { | 15953 | static const char *chname[4] = { |
15911 | "Front", "Surround", NULL /*CLFE*/, "Side" | 15954 | "Front", "Surround", NULL /*CLFE*/, "Side" |
15912 | }; | 15955 | }; |
15956 | const char *pfx = alc_get_line_out_pfx(cfg, true); | ||
15913 | hda_nid_t nid; | 15957 | hda_nid_t nid; |
15914 | int i, err; | 15958 | int i, err; |
15915 | 15959 | ||
15916 | if (cfg->line_outs == 1) { | ||
15917 | const char *pfx = NULL; | ||
15918 | if (!cfg->hp_outs) | ||
15919 | pfx = "Master"; | ||
15920 | else if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) | ||
15921 | pfx = "Speaker"; | ||
15922 | if (pfx) { | ||
15923 | nid = spec->multiout.dac_nids[0]; | ||
15924 | return alc861_create_out_sw(codec, pfx, nid, 3); | ||
15925 | } | ||
15926 | } | ||
15927 | |||
15928 | for (i = 0; i < cfg->line_outs; i++) { | 15960 | for (i = 0; i < cfg->line_outs; i++) { |
15929 | nid = spec->multiout.dac_nids[i]; | 15961 | nid = spec->multiout.dac_nids[i]; |
15930 | if (!nid) | 15962 | if (!nid) |
15931 | continue; | 15963 | continue; |
15932 | if (i == 2) { | 15964 | if (!pfx && i == 2) { |
15933 | /* Center/LFE */ | 15965 | /* Center/LFE */ |
15934 | err = alc861_create_out_sw(codec, "Center", nid, 1); | 15966 | err = alc861_create_out_sw(codec, "Center", nid, 1); |
15935 | if (err < 0) | 15967 | if (err < 0) |
@@ -15938,7 +15970,10 @@ static int alc861_auto_create_multi_out_ctls(struct hda_codec *codec, | |||
15938 | if (err < 0) | 15970 | if (err < 0) |
15939 | return err; | 15971 | return err; |
15940 | } else { | 15972 | } else { |
15941 | err = alc861_create_out_sw(codec, chname[i], nid, 3); | 15973 | const char *name = pfx; |
15974 | if (!name) | ||
15975 | name = chname[i]; | ||
15976 | err = __alc861_create_out_sw(codec, name, nid, i, 3); | ||
15942 | if (err < 0) | 15977 | if (err < 0) |
15943 | return err; | 15978 | return err; |
15944 | } | 15979 | } |
@@ -16410,8 +16445,8 @@ static struct hda_input_mux alc861vd_capture_source = { | |||
16410 | static struct hda_input_mux alc861vd_dallas_capture_source = { | 16445 | static struct hda_input_mux alc861vd_dallas_capture_source = { |
16411 | .num_items = 2, | 16446 | .num_items = 2, |
16412 | .items = { | 16447 | .items = { |
16413 | { "Ext Mic", 0x0 }, | 16448 | { "Mic", 0x0 }, |
16414 | { "Int Mic", 0x1 }, | 16449 | { "Internal Mic", 0x1 }, |
16415 | }, | 16450 | }, |
16416 | }; | 16451 | }; |
16417 | 16452 | ||
@@ -16490,11 +16525,11 @@ static struct snd_kcontrol_new alc861vd_6st_mixer[] = { | |||
16490 | 16525 | ||
16491 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), | 16526 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), |
16492 | 16527 | ||
16493 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 16528 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
16494 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 16529 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
16495 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 16530 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
16496 | 16531 | ||
16497 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 16532 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), |
16498 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 16533 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
16499 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 16534 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
16500 | 16535 | ||
@@ -16513,11 +16548,11 @@ static struct snd_kcontrol_new alc861vd_3st_mixer[] = { | |||
16513 | 16548 | ||
16514 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), | 16549 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), |
16515 | 16550 | ||
16516 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 16551 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
16517 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 16552 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
16518 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 16553 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
16519 | 16554 | ||
16520 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 16555 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), |
16521 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 16556 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
16522 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 16557 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
16523 | 16558 | ||
@@ -16537,11 +16572,11 @@ static struct snd_kcontrol_new alc861vd_lenovo_mixer[] = { | |||
16537 | 16572 | ||
16538 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), | 16573 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT), |
16539 | 16574 | ||
16540 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 16575 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
16541 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 16576 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
16542 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 16577 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
16543 | 16578 | ||
16544 | HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT), | 16579 | HDA_CODEC_VOLUME("Front Mic Boost Volume", 0x19, 0, HDA_INPUT), |
16545 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 16580 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
16546 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 16581 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
16547 | 16582 | ||
@@ -16552,19 +16587,19 @@ static struct snd_kcontrol_new alc861vd_lenovo_mixer[] = { | |||
16552 | }; | 16587 | }; |
16553 | 16588 | ||
16554 | /* Pin assignment: Speaker=0x14, HP = 0x15, | 16589 | /* Pin assignment: Speaker=0x14, HP = 0x15, |
16555 | * Ext Mic=0x18, Int Mic = 0x19, CD = 0x1c, PC Beep = 0x1d | 16590 | * Mic=0x18, Internal Mic = 0x19, CD = 0x1c, PC Beep = 0x1d |
16556 | */ | 16591 | */ |
16557 | static struct snd_kcontrol_new alc861vd_dallas_mixer[] = { | 16592 | static struct snd_kcontrol_new alc861vd_dallas_mixer[] = { |
16558 | HDA_CODEC_VOLUME("Speaker Playback Volume", 0x02, 0x0, HDA_OUTPUT), | 16593 | HDA_CODEC_VOLUME("Speaker Playback Volume", 0x02, 0x0, HDA_OUTPUT), |
16559 | HDA_BIND_MUTE("Speaker Playback Switch", 0x0c, 2, HDA_INPUT), | 16594 | HDA_BIND_MUTE("Speaker Playback Switch", 0x0c, 2, HDA_INPUT), |
16560 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x03, 0x0, HDA_OUTPUT), | 16595 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x03, 0x0, HDA_OUTPUT), |
16561 | HDA_BIND_MUTE("Headphone Playback Switch", 0x0d, 2, HDA_INPUT), | 16596 | HDA_BIND_MUTE("Headphone Playback Switch", 0x0d, 2, HDA_INPUT), |
16562 | HDA_CODEC_VOLUME("Ext Mic Boost", 0x18, 0, HDA_INPUT), | 16597 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
16563 | HDA_CODEC_VOLUME("Ext Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 16598 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
16564 | HDA_CODEC_MUTE("Ext Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 16599 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
16565 | HDA_CODEC_VOLUME("Int Mic Boost", 0x19, 0, HDA_INPUT), | 16600 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), |
16566 | HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 16601 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
16567 | HDA_CODEC_MUTE("Int Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 16602 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
16568 | { } /* end */ | 16603 | { } /* end */ |
16569 | }; | 16604 | }; |
16570 | 16605 | ||
@@ -16729,18 +16764,6 @@ static struct hda_verb alc861vd_lenovo_unsol_verbs[] = { | |||
16729 | {} | 16764 | {} |
16730 | }; | 16765 | }; |
16731 | 16766 | ||
16732 | static void alc861vd_lenovo_mic_automute(struct hda_codec *codec) | ||
16733 | { | ||
16734 | unsigned int present; | ||
16735 | unsigned char bits; | ||
16736 | |||
16737 | present = snd_hda_jack_detect(codec, 0x18); | ||
16738 | bits = present ? HDA_AMP_MUTE : 0; | ||
16739 | |||
16740 | snd_hda_codec_amp_stereo(codec, 0x0b, HDA_INPUT, 1, | ||
16741 | HDA_AMP_MUTE, bits); | ||
16742 | } | ||
16743 | |||
16744 | static void alc861vd_lenovo_setup(struct hda_codec *codec) | 16767 | static void alc861vd_lenovo_setup(struct hda_codec *codec) |
16745 | { | 16768 | { |
16746 | struct alc_spec *spec = codec->spec; | 16769 | struct alc_spec *spec = codec->spec; |
@@ -16751,7 +16774,7 @@ static void alc861vd_lenovo_setup(struct hda_codec *codec) | |||
16751 | static void alc861vd_lenovo_init_hook(struct hda_codec *codec) | 16774 | static void alc861vd_lenovo_init_hook(struct hda_codec *codec) |
16752 | { | 16775 | { |
16753 | alc_automute_amp(codec); | 16776 | alc_automute_amp(codec); |
16754 | alc861vd_lenovo_mic_automute(codec); | 16777 | alc88x_simple_mic_automute(codec); |
16755 | } | 16778 | } |
16756 | 16779 | ||
16757 | static void alc861vd_lenovo_unsol_event(struct hda_codec *codec, | 16780 | static void alc861vd_lenovo_unsol_event(struct hda_codec *codec, |
@@ -16759,7 +16782,7 @@ static void alc861vd_lenovo_unsol_event(struct hda_codec *codec, | |||
16759 | { | 16782 | { |
16760 | switch (res >> 26) { | 16783 | switch (res >> 26) { |
16761 | case ALC880_MIC_EVENT: | 16784 | case ALC880_MIC_EVENT: |
16762 | alc861vd_lenovo_mic_automute(codec); | 16785 | alc88x_simple_mic_automute(codec); |
16763 | break; | 16786 | break; |
16764 | default: | 16787 | default: |
16765 | alc_automute_amp_unsol_event(codec, res); | 16788 | alc_automute_amp_unsol_event(codec, res); |
@@ -17055,6 +17078,7 @@ static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec, | |||
17055 | const struct auto_pin_cfg *cfg) | 17078 | const struct auto_pin_cfg *cfg) |
17056 | { | 17079 | { |
17057 | static const char *chname[4] = {"Front", "Surround", "CLFE", "Side"}; | 17080 | static const char *chname[4] = {"Front", "Surround", "CLFE", "Side"}; |
17081 | const char *pfx = alc_get_line_out_pfx(cfg, true); | ||
17058 | hda_nid_t nid_v, nid_s; | 17082 | hda_nid_t nid_v, nid_s; |
17059 | int i, err; | 17083 | int i, err; |
17060 | 17084 | ||
@@ -17068,7 +17092,7 @@ static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec, | |||
17068 | alc880_dac_to_idx( | 17092 | alc880_dac_to_idx( |
17069 | spec->multiout.dac_nids[i])); | 17093 | spec->multiout.dac_nids[i])); |
17070 | 17094 | ||
17071 | if (i == 2) { | 17095 | if (!pfx && i == 2) { |
17072 | /* Center/LFE */ | 17096 | /* Center/LFE */ |
17073 | err = add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL, | 17097 | err = add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL, |
17074 | "Center", | 17098 | "Center", |
@@ -17095,24 +17119,17 @@ static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec, | |||
17095 | if (err < 0) | 17119 | if (err < 0) |
17096 | return err; | 17120 | return err; |
17097 | } else { | 17121 | } else { |
17098 | const char *pfx; | 17122 | const char *name = pfx; |
17099 | if (cfg->line_outs == 1 && | 17123 | if (!name) |
17100 | cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) { | 17124 | name = chname[i]; |
17101 | if (!cfg->hp_pins) | 17125 | err = __add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL, |
17102 | pfx = "Speaker"; | 17126 | name, i, |
17103 | else | ||
17104 | pfx = "PCM"; | ||
17105 | } else | ||
17106 | pfx = chname[i]; | ||
17107 | err = add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL, pfx, | ||
17108 | HDA_COMPOSE_AMP_VAL(nid_v, 3, 0, | 17127 | HDA_COMPOSE_AMP_VAL(nid_v, 3, 0, |
17109 | HDA_OUTPUT)); | 17128 | HDA_OUTPUT)); |
17110 | if (err < 0) | 17129 | if (err < 0) |
17111 | return err; | 17130 | return err; |
17112 | if (cfg->line_outs == 1 && | 17131 | err = __add_pb_sw_ctrl(spec, ALC_CTL_BIND_MUTE, |
17113 | cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) | 17132 | name, i, |
17114 | pfx = "Speaker"; | ||
17115 | err = add_pb_sw_ctrl(spec, ALC_CTL_BIND_MUTE, pfx, | ||
17116 | HDA_COMPOSE_AMP_VAL(nid_s, 3, 2, | 17133 | HDA_COMPOSE_AMP_VAL(nid_s, 3, 2, |
17117 | HDA_INPUT)); | 17134 | HDA_INPUT)); |
17118 | if (err < 0) | 17135 | if (err < 0) |
@@ -17576,13 +17593,13 @@ static struct snd_kcontrol_new alc662_eeepc_p701_mixer[] = { | |||
17576 | HDA_CODEC_VOLUME("Master Playback Volume", 0x02, 0x0, HDA_OUTPUT), | 17593 | HDA_CODEC_VOLUME("Master Playback Volume", 0x02, 0x0, HDA_OUTPUT), |
17577 | ALC262_HIPPO_MASTER_SWITCH, | 17594 | ALC262_HIPPO_MASTER_SWITCH, |
17578 | 17595 | ||
17579 | HDA_CODEC_VOLUME("e-Mic Boost", 0x18, 0, HDA_INPUT), | 17596 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
17580 | HDA_CODEC_VOLUME("e-Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 17597 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
17581 | HDA_CODEC_MUTE("e-Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 17598 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
17582 | 17599 | ||
17583 | HDA_CODEC_VOLUME("i-Mic Boost", 0x19, 0, HDA_INPUT), | 17600 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), |
17584 | HDA_CODEC_VOLUME("i-Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 17601 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
17585 | HDA_CODEC_MUTE("i-Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 17602 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
17586 | { } /* end */ | 17603 | { } /* end */ |
17587 | }; | 17604 | }; |
17588 | 17605 | ||
@@ -17726,8 +17743,8 @@ static struct snd_kcontrol_new alc663_g71v_mixer[] = { | |||
17726 | 17743 | ||
17727 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 17744 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
17728 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 17745 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
17729 | HDA_CODEC_VOLUME("i-Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 17746 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
17730 | HDA_CODEC_MUTE("i-Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 17747 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
17731 | { } /* end */ | 17748 | { } /* end */ |
17732 | }; | 17749 | }; |
17733 | 17750 | ||
@@ -17738,8 +17755,8 @@ static struct snd_kcontrol_new alc663_g50v_mixer[] = { | |||
17738 | 17755 | ||
17739 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 17756 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
17740 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 17757 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
17741 | HDA_CODEC_VOLUME("i-Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 17758 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
17742 | HDA_CODEC_MUTE("i-Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 17759 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
17743 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), | 17760 | HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT), |
17744 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 17761 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
17745 | { } /* end */ | 17762 | { } /* end */ |
@@ -18572,13 +18589,13 @@ static struct snd_kcontrol_new alc662_ecs_mixer[] = { | |||
18572 | HDA_CODEC_VOLUME("Master Playback Volume", 0x02, 0x0, HDA_OUTPUT), | 18589 | HDA_CODEC_VOLUME("Master Playback Volume", 0x02, 0x0, HDA_OUTPUT), |
18573 | ALC262_HIPPO_MASTER_SWITCH, | 18590 | ALC262_HIPPO_MASTER_SWITCH, |
18574 | 18591 | ||
18575 | HDA_CODEC_VOLUME("e-Mic/LineIn Boost", 0x18, 0, HDA_INPUT), | 18592 | HDA_CODEC_VOLUME("Mic/LineIn Boost Volume", 0x18, 0, HDA_INPUT), |
18576 | HDA_CODEC_VOLUME("e-Mic/LineIn Playback Volume", 0x0b, 0x0, HDA_INPUT), | 18593 | HDA_CODEC_VOLUME("Mic/LineIn Playback Volume", 0x0b, 0x0, HDA_INPUT), |
18577 | HDA_CODEC_MUTE("e-Mic/LineIn Playback Switch", 0x0b, 0x0, HDA_INPUT), | 18594 | HDA_CODEC_MUTE("Mic/LineIn Playback Switch", 0x0b, 0x0, HDA_INPUT), |
18578 | 18595 | ||
18579 | HDA_CODEC_VOLUME("i-Mic Boost", 0x19, 0, HDA_INPUT), | 18596 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), |
18580 | HDA_CODEC_VOLUME("i-Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 18597 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
18581 | HDA_CODEC_MUTE("i-Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 18598 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
18582 | { } /* end */ | 18599 | { } /* end */ |
18583 | }; | 18600 | }; |
18584 | 18601 | ||
@@ -18589,13 +18606,13 @@ static struct snd_kcontrol_new alc272_nc10_mixer[] = { | |||
18589 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x03, 0x0, HDA_OUTPUT), | 18606 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x03, 0x0, HDA_OUTPUT), |
18590 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x21, 0x0, HDA_OUTPUT), | 18607 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x21, 0x0, HDA_OUTPUT), |
18591 | 18608 | ||
18592 | HDA_CODEC_VOLUME("Ext Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 18609 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
18593 | HDA_CODEC_MUTE("Ext Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 18610 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
18594 | HDA_CODEC_VOLUME("Ext Mic Boost", 0x18, 0, HDA_INPUT), | 18611 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
18595 | 18612 | ||
18596 | HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | 18613 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), |
18597 | HDA_CODEC_MUTE("Int Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | 18614 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), |
18598 | HDA_CODEC_VOLUME("Int Mic Boost", 0x19, 0, HDA_INPUT), | 18615 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT), |
18599 | { } /* end */ | 18616 | { } /* end */ |
18600 | }; | 18617 | }; |
18601 | 18618 | ||
@@ -19100,20 +19117,24 @@ static int alc662_auto_fill_dac_nids(struct hda_codec *codec, | |||
19100 | return 0; | 19117 | return 0; |
19101 | } | 19118 | } |
19102 | 19119 | ||
19103 | static inline int alc662_add_vol_ctl(struct alc_spec *spec, const char *pfx, | 19120 | static inline int __alc662_add_vol_ctl(struct alc_spec *spec, const char *pfx, |
19104 | hda_nid_t nid, unsigned int chs) | 19121 | hda_nid_t nid, int idx, unsigned int chs) |
19105 | { | 19122 | { |
19106 | return add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL, pfx, | 19123 | return __add_pb_vol_ctrl(spec, ALC_CTL_WIDGET_VOL, pfx, idx, |
19107 | HDA_COMPOSE_AMP_VAL(nid, chs, 0, HDA_OUTPUT)); | 19124 | HDA_COMPOSE_AMP_VAL(nid, chs, 0, HDA_OUTPUT)); |
19108 | } | 19125 | } |
19109 | 19126 | ||
19110 | static inline int alc662_add_sw_ctl(struct alc_spec *spec, const char *pfx, | 19127 | static inline int __alc662_add_sw_ctl(struct alc_spec *spec, const char *pfx, |
19111 | hda_nid_t nid, unsigned int chs) | 19128 | hda_nid_t nid, int idx, unsigned int chs) |
19112 | { | 19129 | { |
19113 | return add_pb_sw_ctrl(spec, ALC_CTL_WIDGET_MUTE, pfx, | 19130 | return __add_pb_sw_ctrl(spec, ALC_CTL_WIDGET_MUTE, pfx, idx, |
19114 | HDA_COMPOSE_AMP_VAL(nid, chs, 0, HDA_INPUT)); | 19131 | HDA_COMPOSE_AMP_VAL(nid, chs, 0, HDA_INPUT)); |
19115 | } | 19132 | } |
19116 | 19133 | ||
19134 | #define alc662_add_vol_ctl(spec, pfx, nid, chs) \ | ||
19135 | __alc662_add_vol_ctl(spec, pfx, nid, 0, chs) | ||
19136 | #define alc662_add_sw_ctl(spec, pfx, nid, chs) \ | ||
19137 | __alc662_add_sw_ctl(spec, pfx, nid, 0, chs) | ||
19117 | #define alc662_add_stereo_vol(spec, pfx, nid) \ | 19138 | #define alc662_add_stereo_vol(spec, pfx, nid) \ |
19118 | alc662_add_vol_ctl(spec, pfx, nid, 3) | 19139 | alc662_add_vol_ctl(spec, pfx, nid, 3) |
19119 | #define alc662_add_stereo_sw(spec, pfx, nid) \ | 19140 | #define alc662_add_stereo_sw(spec, pfx, nid) \ |
@@ -19127,6 +19148,7 @@ static int alc662_auto_create_multi_out_ctls(struct hda_codec *codec, | |||
19127 | static const char *chname[4] = { | 19148 | static const char *chname[4] = { |
19128 | "Front", "Surround", NULL /*CLFE*/, "Side" | 19149 | "Front", "Surround", NULL /*CLFE*/, "Side" |
19129 | }; | 19150 | }; |
19151 | const char *pfx = alc_get_line_out_pfx(cfg, true); | ||
19130 | hda_nid_t nid, mix; | 19152 | hda_nid_t nid, mix; |
19131 | int i, err; | 19153 | int i, err; |
19132 | 19154 | ||
@@ -19137,7 +19159,7 @@ static int alc662_auto_create_multi_out_ctls(struct hda_codec *codec, | |||
19137 | mix = alc662_dac_to_mix(codec, cfg->line_out_pins[i], nid); | 19159 | mix = alc662_dac_to_mix(codec, cfg->line_out_pins[i], nid); |
19138 | if (!mix) | 19160 | if (!mix) |
19139 | continue; | 19161 | continue; |
19140 | if (i == 2) { | 19162 | if (!pfx && i == 2) { |
19141 | /* Center/LFE */ | 19163 | /* Center/LFE */ |
19142 | err = alc662_add_vol_ctl(spec, "Center", nid, 1); | 19164 | err = alc662_add_vol_ctl(spec, "Center", nid, 1); |
19143 | if (err < 0) | 19165 | if (err < 0) |
@@ -19152,22 +19174,13 @@ static int alc662_auto_create_multi_out_ctls(struct hda_codec *codec, | |||
19152 | if (err < 0) | 19174 | if (err < 0) |
19153 | return err; | 19175 | return err; |
19154 | } else { | 19176 | } else { |
19155 | const char *pfx; | 19177 | const char *name = pfx; |
19156 | if (cfg->line_outs == 1 && | 19178 | if (!name) |
19157 | cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) { | 19179 | name = chname[i]; |
19158 | if (cfg->hp_outs) | 19180 | err = __alc662_add_vol_ctl(spec, name, nid, i, 3); |
19159 | pfx = "Speaker"; | ||
19160 | else | ||
19161 | pfx = "PCM"; | ||
19162 | } else | ||
19163 | pfx = chname[i]; | ||
19164 | err = alc662_add_vol_ctl(spec, pfx, nid, 3); | ||
19165 | if (err < 0) | 19181 | if (err < 0) |
19166 | return err; | 19182 | return err; |
19167 | if (cfg->line_outs == 1 && | 19183 | err = __alc662_add_sw_ctl(spec, name, mix, i, 3); |
19168 | cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) | ||
19169 | pfx = "Speaker"; | ||
19170 | err = alc662_add_sw_ctl(spec, pfx, mix, 3); | ||
19171 | if (err < 0) | 19184 | if (err < 0) |
19172 | return err; | 19185 | return err; |
19173 | } | 19186 | } |
@@ -19364,9 +19377,21 @@ static void alc662_auto_init(struct hda_codec *codec) | |||
19364 | alc_inithook(codec); | 19377 | alc_inithook(codec); |
19365 | } | 19378 | } |
19366 | 19379 | ||
19380 | static void alc272_fixup_mario(struct hda_codec *codec, | ||
19381 | const struct alc_fixup *fix, int pre_init) { | ||
19382 | if (snd_hda_override_amp_caps(codec, 0x2, HDA_OUTPUT, | ||
19383 | (0x3b << AC_AMPCAP_OFFSET_SHIFT) | | ||
19384 | (0x3b << AC_AMPCAP_NUM_STEPS_SHIFT) | | ||
19385 | (0x03 << AC_AMPCAP_STEP_SIZE_SHIFT) | | ||
19386 | (0 << AC_AMPCAP_MUTE_SHIFT))) | ||
19387 | printk(KERN_WARNING | ||
19388 | "hda_codec: failed to override amp caps for NID 0x2\n"); | ||
19389 | } | ||
19390 | |||
19367 | enum { | 19391 | enum { |
19368 | ALC662_FIXUP_ASPIRE, | 19392 | ALC662_FIXUP_ASPIRE, |
19369 | ALC662_FIXUP_IDEAPAD, | 19393 | ALC662_FIXUP_IDEAPAD, |
19394 | ALC272_FIXUP_MARIO, | ||
19370 | }; | 19395 | }; |
19371 | 19396 | ||
19372 | static const struct alc_fixup alc662_fixups[] = { | 19397 | static const struct alc_fixup alc662_fixups[] = { |
@@ -19382,6 +19407,9 @@ static const struct alc_fixup alc662_fixups[] = { | |||
19382 | { } | 19407 | { } |
19383 | } | 19408 | } |
19384 | }, | 19409 | }, |
19410 | [ALC272_FIXUP_MARIO] = { | ||
19411 | .func = alc272_fixup_mario, | ||
19412 | } | ||
19385 | }; | 19413 | }; |
19386 | 19414 | ||
19387 | static struct snd_pci_quirk alc662_fixup_tbl[] = { | 19415 | static struct snd_pci_quirk alc662_fixup_tbl[] = { |
@@ -19392,6 +19420,10 @@ static struct snd_pci_quirk alc662_fixup_tbl[] = { | |||
19392 | {} | 19420 | {} |
19393 | }; | 19421 | }; |
19394 | 19422 | ||
19423 | static const struct alc_model_fixup alc662_fixup_models[] = { | ||
19424 | {.id = ALC272_FIXUP_MARIO, .name = "mario"}, | ||
19425 | {} | ||
19426 | }; | ||
19395 | 19427 | ||
19396 | 19428 | ||
19397 | static int patch_alc662(struct hda_codec *codec) | 19429 | static int patch_alc662(struct hda_codec *codec) |
@@ -19491,7 +19523,8 @@ static int patch_alc662(struct hda_codec *codec) | |||
19491 | codec->patch_ops = alc_patch_ops; | 19523 | codec->patch_ops = alc_patch_ops; |
19492 | if (board_config == ALC662_AUTO) { | 19524 | if (board_config == ALC662_AUTO) { |
19493 | spec->init_hook = alc662_auto_init; | 19525 | spec->init_hook = alc662_auto_init; |
19494 | alc_pick_fixup(codec, alc662_fixup_tbl, alc662_fixups, 0); | 19526 | alc_pick_fixup_model(codec, alc662_fixup_models, |
19527 | alc662_fixup_tbl, alc662_fixups, 0); | ||
19495 | } | 19528 | } |
19496 | 19529 | ||
19497 | alc_init_jacks(codec); | 19530 | alc_init_jacks(codec); |
@@ -19618,9 +19651,9 @@ static struct snd_kcontrol_new alc680_base_mixer[] = { | |||
19618 | HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT), | 19651 | HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT), |
19619 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x4, 0x0, HDA_OUTPUT), | 19652 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x4, 0x0, HDA_OUTPUT), |
19620 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x16, 0x0, HDA_OUTPUT), | 19653 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x16, 0x0, HDA_OUTPUT), |
19621 | HDA_CODEC_VOLUME("Int Mic Boost", 0x12, 0, HDA_INPUT), | 19654 | HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x12, 0, HDA_INPUT), |
19622 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 19655 | HDA_CODEC_VOLUME("Mic Boost Volume", 0x18, 0, HDA_INPUT), |
19623 | HDA_CODEC_VOLUME("Line In Boost", 0x19, 0, HDA_INPUT), | 19656 | HDA_CODEC_VOLUME("Line In Boost Volume", 0x19, 0, HDA_INPUT), |
19624 | { } | 19657 | { } |
19625 | }; | 19658 | }; |
19626 | 19659 | ||
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index f03b2ff90496..4ab019d0924e 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -389,6 +389,9 @@ static hda_nid_t stac92hd83xxx_dmic_nids[STAC92HD83XXX_NUM_DMICS + 1] = { | |||
389 | 0x11, 0x20, 0 | 389 | 0x11, 0x20, 0 |
390 | }; | 390 | }; |
391 | 391 | ||
392 | #define STAC92HD88XXX_NUM_DMICS STAC92HD83XXX_NUM_DMICS | ||
393 | #define stac92hd88xxx_dmic_nids stac92hd83xxx_dmic_nids | ||
394 | |||
392 | #define STAC92HD87B_NUM_DMICS 1 | 395 | #define STAC92HD87B_NUM_DMICS 1 |
393 | static hda_nid_t stac92hd87b_dmic_nids[STAC92HD87B_NUM_DMICS + 1] = { | 396 | static hda_nid_t stac92hd87b_dmic_nids[STAC92HD87B_NUM_DMICS + 1] = { |
394 | 0x11, 0 | 397 | 0x11, 0 |
@@ -3591,7 +3594,7 @@ static int stac_check_auto_mic(struct hda_codec *codec) | |||
3591 | if (check_mic_pin(codec, spec->dmic_nids[i], | 3594 | if (check_mic_pin(codec, spec->dmic_nids[i], |
3592 | &fixed, &ext, &dock)) | 3595 | &fixed, &ext, &dock)) |
3593 | return 0; | 3596 | return 0; |
3594 | if (!fixed && !ext && !dock) | 3597 | if (!fixed || (!ext && !dock)) |
3595 | return 0; /* no input to switch */ | 3598 | return 0; /* no input to switch */ |
3596 | if (!(get_wcaps(codec, ext) & AC_WCAP_UNSOL_CAP)) | 3599 | if (!(get_wcaps(codec, ext) & AC_WCAP_UNSOL_CAP)) |
3597 | return 0; /* no unsol support */ | 3600 | return 0; /* no unsol support */ |
@@ -5422,7 +5425,7 @@ static int patch_stac92hd83xxx(struct hda_codec *codec) | |||
5422 | snd_hda_codec_write_cache(codec, codec->afg, 0, 0x7ED, 0); | 5425 | snd_hda_codec_write_cache(codec, codec->afg, 0, 0x7ED, 0); |
5423 | codec->no_trigger_sense = 1; | 5426 | codec->no_trigger_sense = 1; |
5424 | codec->spec = spec; | 5427 | codec->spec = spec; |
5425 | spec->linear_tone_beep = 1; | 5428 | spec->linear_tone_beep = 0; |
5426 | codec->slave_dig_outs = stac92hd83xxx_slave_dig_outs; | 5429 | codec->slave_dig_outs = stac92hd83xxx_slave_dig_outs; |
5427 | spec->digbeep_nid = 0x21; | 5430 | spec->digbeep_nid = 0x21; |
5428 | spec->dmic_nids = stac92hd83xxx_dmic_nids; | 5431 | spec->dmic_nids = stac92hd83xxx_dmic_nids; |
@@ -5462,15 +5465,21 @@ again: | |||
5462 | spec->num_dmics = stac92xx_connected_ports(codec, | 5465 | spec->num_dmics = stac92xx_connected_ports(codec, |
5463 | stac92hd87b_dmic_nids, | 5466 | stac92hd87b_dmic_nids, |
5464 | STAC92HD87B_NUM_DMICS); | 5467 | STAC92HD87B_NUM_DMICS); |
5465 | /* Fall through */ | 5468 | spec->num_pins = ARRAY_SIZE(stac92hd88xxx_pin_nids); |
5469 | spec->pin_nids = stac92hd88xxx_pin_nids; | ||
5470 | spec->mono_nid = 0; | ||
5471 | spec->num_pwrs = 0; | ||
5472 | break; | ||
5466 | case 0x111d7666: | 5473 | case 0x111d7666: |
5467 | case 0x111d7667: | 5474 | case 0x111d7667: |
5468 | case 0x111d7668: | 5475 | case 0x111d7668: |
5469 | case 0x111d7669: | 5476 | case 0x111d7669: |
5477 | spec->num_dmics = stac92xx_connected_ports(codec, | ||
5478 | stac92hd88xxx_dmic_nids, | ||
5479 | STAC92HD88XXX_NUM_DMICS); | ||
5470 | spec->num_pins = ARRAY_SIZE(stac92hd88xxx_pin_nids); | 5480 | spec->num_pins = ARRAY_SIZE(stac92hd88xxx_pin_nids); |
5471 | spec->pin_nids = stac92hd88xxx_pin_nids; | 5481 | spec->pin_nids = stac92hd88xxx_pin_nids; |
5472 | spec->mono_nid = 0; | 5482 | spec->mono_nid = 0; |
5473 | spec->digbeep_nid = 0; | ||
5474 | spec->num_pwrs = 0; | 5483 | spec->num_pwrs = 0; |
5475 | break; | 5484 | break; |
5476 | case 0x111d7604: | 5485 | case 0x111d7604: |