aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorClaudio Matsuoka <cmatsuoka@gmail.com>2007-07-04 09:17:38 -0400
committerJaroslav Kysela <perex@suse.cz>2007-07-20 05:11:42 -0400
commit0a8c5da3c066a1e92a66a493e6fe04d5ce7a206d (patch)
tree8b3be1c538e144277de8bce9ba97cd7c3f860e83 /sound
parent4210861964145617cf27b2b9c45860bff3e8290c (diff)
[ALSA] hda-codec - Fix 5.1 output in LG LW20
Implemented LG LW20 5.1 support based on ALC880 threestack modes. It was previously set to use one DAC and 2 jack modes, giving 2-channel output only. Analog CD playing support is still missing. Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_realtek.c32
1 files changed, 26 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index a4876a31311e..8deca0f7d7ce 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1900,17 +1900,38 @@ static struct hda_input_mux alc880_lg_lw_capture_source = {
1900 }, 1900 },
1901}; 1901};
1902 1902
1903#define alc880_lg_lw_modes alc880_threestack_modes
1904
1903static struct snd_kcontrol_new alc880_lg_lw_mixer[] = { 1905static struct snd_kcontrol_new alc880_lg_lw_mixer[] = {
1904 HDA_CODEC_VOLUME("Master Playback Volume", 0x0c, 0x0, HDA_OUTPUT), 1906 HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
1905 HDA_BIND_MUTE("Master Playback Switch", 0x0c, 2, HDA_INPUT), 1907 HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
1908 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0f, 0x0, HDA_OUTPUT),
1909 HDA_BIND_MUTE("Surround Playback Switch", 0x0f, 2, HDA_INPUT),
1910 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT),
1911 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0e, 2, 0x0, HDA_OUTPUT),
1912 HDA_BIND_MUTE_MONO("Center Playback Switch", 0x0e, 1, 2, HDA_INPUT),
1913 HDA_BIND_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 2, HDA_INPUT),
1914 HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
1915 HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
1906 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), 1916 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
1907 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), 1917 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
1908 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), 1918 HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x01, HDA_INPUT),
1909 HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), 1919 HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x01, HDA_INPUT),
1920 {
1921 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1922 .name = "Channel Mode",
1923 .info = alc_ch_mode_info,
1924 .get = alc_ch_mode_get,
1925 .put = alc_ch_mode_put,
1926 },
1910 { } /* end */ 1927 { } /* end */
1911}; 1928};
1912 1929
1913static struct hda_verb alc880_lg_lw_init_verbs[] = { 1930static struct hda_verb alc880_lg_lw_init_verbs[] = {
1931 {0x13, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */
1932 {0x10, AC_VERB_SET_CONNECT_SEL, 0x02}, /* mic/clfe */
1933 {0x12, AC_VERB_SET_CONNECT_SEL, 0x03}, /* line/surround */
1934
1914 /* set capture source to mic-in */ 1935 /* set capture source to mic-in */
1915 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, 1936 {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
1916 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, 1937 {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
@@ -1920,7 +1941,6 @@ static struct hda_verb alc880_lg_lw_init_verbs[] = {
1920 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, 1941 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
1921 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, 1942 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1922 /* HP-out */ 1943 /* HP-out */
1923 {0x13, AC_VERB_SET_CONNECT_SEL, 0x00},
1924 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, 1944 {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
1925 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, 1945 {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1926 /* mic-in to input */ 1946 /* mic-in to input */
@@ -2864,11 +2884,11 @@ static struct alc_config_preset alc880_presets[] = {
2864 .mixers = { alc880_lg_lw_mixer }, 2884 .mixers = { alc880_lg_lw_mixer },
2865 .init_verbs = { alc880_volume_init_verbs, 2885 .init_verbs = { alc880_volume_init_verbs,
2866 alc880_lg_lw_init_verbs }, 2886 alc880_lg_lw_init_verbs },
2867 .num_dacs = 1, 2887 .num_dacs = ARRAY_SIZE(alc880_dac_nids),
2868 .dac_nids = alc880_dac_nids, 2888 .dac_nids = alc880_dac_nids,
2869 .dig_out_nid = ALC880_DIGOUT_NID, 2889 .dig_out_nid = ALC880_DIGOUT_NID,
2870 .num_channel_mode = ARRAY_SIZE(alc880_2_jack_modes), 2890 .num_channel_mode = ARRAY_SIZE(alc880_lg_lw_modes),
2871 .channel_mode = alc880_2_jack_modes, 2891 .channel_mode = alc880_lg_lw_modes,
2872 .input_mux = &alc880_lg_lw_capture_source, 2892 .input_mux = &alc880_lg_lw_capture_source,
2873 .unsol_event = alc880_lg_lw_unsol_event, 2893 .unsol_event = alc880_lg_lw_unsol_event,
2874 .init_hook = alc880_lg_lw_automute, 2894 .init_hook = alc880_lg_lw_automute,