aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_realtek.c65
1 files changed, 54 insertions, 11 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 2bbb9e445cb1..8699b7fb45b9 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1469,10 +1469,10 @@ static struct hda_verb alc888_acer_aspire_4930g_verbs[] = {
1469}; 1469};
1470 1470
1471/* 1471/*
1472 * ALC888 Acer Aspire 8930G model 1472 * ALC889 Acer Aspire 8930G model
1473 */ 1473 */
1474 1474
1475static struct hda_verb alc888_acer_aspire_8930g_verbs[] = { 1475static struct hda_verb alc889_acer_aspire_8930g_verbs[] = {
1476/* Front Mic: set to PIN_IN (empty by default) */ 1476/* Front Mic: set to PIN_IN (empty by default) */
1477 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, 1477 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
1478/* Unselect Front Mic by default in input mixer 3 */ 1478/* Unselect Front Mic by default in input mixer 3 */
@@ -1492,7 +1492,7 @@ static struct hda_verb alc888_acer_aspire_8930g_verbs[] = {
1492 {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, 1492 {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1493 {0x16, AC_VERB_SET_CONNECT_SEL, 0x02}, 1493 {0x16, AC_VERB_SET_CONNECT_SEL, 0x02},
1494/* Connect HP out to Front */ 1494/* Connect HP out to Front */
1495 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, 1495 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT | PIN_HP},
1496 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, 1496 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1497 {0x15, AC_VERB_SET_CONNECT_SEL, 0x00}, 1497 {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
1498/* Enable all DACs */ 1498/* Enable all DACs */
@@ -1507,6 +1507,17 @@ static struct hda_verb alc888_acer_aspire_8930g_verbs[] = {
1507/* Enable amplifiers */ 1507/* Enable amplifiers */
1508 {0x14, AC_VERB_SET_EAPD_BTLENABLE, 0x02}, 1508 {0x14, AC_VERB_SET_EAPD_BTLENABLE, 0x02},
1509 {0x15, AC_VERB_SET_EAPD_BTLENABLE, 0x02}, 1509 {0x15, AC_VERB_SET_EAPD_BTLENABLE, 0x02},
1510/* DMIC fix
1511 * This laptop has a stereo digital microphone. The mics are only 1cm apart
1512 * which makes the stereo useless. However, either the mic or the ALC889
1513 * makes the signal become a difference/sum signal instead of standard
1514 * stereo, which is annoying. So instead we flip this bit which makes the
1515 * codec replicate the sum signal to both channels, turning it into a
1516 * normal mono mic.
1517 */
1518/* DMIC_CONTROL? Init value = 0x0001 */
1519 {0x20, AC_VERB_SET_COEF_INDEX, 0x0b},
1520 {0x20, AC_VERB_SET_PROC_COEF, 0x0003},
1510 { } 1521 { }
1511}; 1522};
1512 1523
@@ -1531,6 +1542,38 @@ static struct hda_input_mux alc888_2_capture_sources[2] = {
1531 } 1542 }
1532}; 1543};
1533 1544
1545static struct hda_input_mux alc889_capture_sources[3] = {
1546 /* Digital mic only available on first "ADC" */
1547 {
1548 .num_items = 5,
1549 .items = {
1550 { "Mic", 0x0 },
1551 { "Line", 0x2 },
1552 { "CD", 0x4 },
1553 { "Front Mic", 0xb },
1554 { "Input Mix", 0xa },
1555 },
1556 },
1557 {
1558 .num_items = 4,
1559 .items = {
1560 { "Mic", 0x0 },
1561 { "Line", 0x2 },
1562 { "CD", 0x4 },
1563 { "Input Mix", 0xa },
1564 },
1565 },
1566 {
1567 .num_items = 4,
1568 .items = {
1569 { "Mic", 0x0 },
1570 { "Line", 0x2 },
1571 { "CD", 0x4 },
1572 { "Input Mix", 0xa },
1573 },
1574 }
1575};
1576
1534static struct snd_kcontrol_new alc888_base_mixer[] = { 1577static struct snd_kcontrol_new alc888_base_mixer[] = {
1535 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 1578 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
1536 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), 1579 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
@@ -1562,7 +1605,7 @@ static void alc888_acer_aspire_4930g_init_hook(struct hda_codec *codec)
1562 alc_automute_amp(codec); 1605 alc_automute_amp(codec);
1563} 1606}
1564 1607
1565static void alc888_acer_aspire_8930g_init_hook(struct hda_codec *codec) 1608static void alc889_acer_aspire_8930g_init_hook(struct hda_codec *codec)
1566{ 1609{
1567 struct alc_spec *spec = codec->spec; 1610 struct alc_spec *spec = codec->spec;
1568 1611
@@ -9081,22 +9124,22 @@ static struct alc_config_preset alc883_presets[] = {
9081 .mixers = { alc888_base_mixer, 9124 .mixers = { alc888_base_mixer,
9082 alc883_chmode_mixer }, 9125 alc883_chmode_mixer },
9083 .init_verbs = { alc883_init_verbs, alc880_gpio1_init_verbs, 9126 .init_verbs = { alc883_init_verbs, alc880_gpio1_init_verbs,
9084 alc888_acer_aspire_8930g_verbs }, 9127 alc889_acer_aspire_8930g_verbs },
9085 .num_dacs = ARRAY_SIZE(alc883_dac_nids), 9128 .num_dacs = ARRAY_SIZE(alc883_dac_nids),
9086 .dac_nids = alc883_dac_nids, 9129 .dac_nids = alc883_dac_nids,
9087 .num_adc_nids = ARRAY_SIZE(alc883_adc_nids_rev), 9130 .num_adc_nids = ARRAY_SIZE(alc889_adc_nids),
9088 .adc_nids = alc883_adc_nids_rev, 9131 .adc_nids = alc889_adc_nids,
9089 .capsrc_nids = alc883_capsrc_nids_rev, 9132 .capsrc_nids = alc889_capsrc_nids,
9090 .dig_out_nid = ALC883_DIGOUT_NID, 9133 .dig_out_nid = ALC883_DIGOUT_NID,
9091 .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes), 9134 .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes),
9092 .channel_mode = alc883_3ST_6ch_modes, 9135 .channel_mode = alc883_3ST_6ch_modes,
9093 .need_dac_fix = 1, 9136 .need_dac_fix = 1,
9094 .const_channel_count = 6, 9137 .const_channel_count = 6,
9095 .num_mux_defs = 9138 .num_mux_defs =
9096 ARRAY_SIZE(alc888_2_capture_sources), 9139 ARRAY_SIZE(alc889_capture_sources),
9097 .input_mux = alc888_2_capture_sources, 9140 .input_mux = alc889_capture_sources,
9098 .unsol_event = alc_automute_amp_unsol_event, 9141 .unsol_event = alc_automute_amp_unsol_event,
9099 .init_hook = alc888_acer_aspire_8930g_init_hook, 9142 .init_hook = alc889_acer_aspire_8930g_init_hook,
9100 }, 9143 },
9101 [ALC883_MEDION] = { 9144 [ALC883_MEDION] = {
9102 .mixers = { alc883_fivestack_mixer, 9145 .mixers = { alc883_fivestack_mixer,