aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-24 10:17:20 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:29:48 -0500
commitf8c7c7b8dd2828b42c1230c6b0235e7d1dcf57e5 (patch)
treeb6750d3a18d438f79819473b5604f03660a8a3d1 /sound/pci
parentd32410b1095cf93e8e31f8919de46f496d7b3ce0 (diff)
[ALSA] hda-codec - Fix surrounds on 3stack mode of AD1988
Modules: HDA Codec driver Fixed the swapped surround/CLFE on 3stack mode of AD1988. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_analog.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index fabcbcf77a10..fc144155f7a6 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -911,7 +911,7 @@ static int patch_ad1981(struct hda_codec *codec)
911 * 911 *
912 * DAC assignment 912 * DAC assignment
913 * 6stack - front/surr/CLFE/side/opt DACs - 04/06/05/0a/03 913 * 6stack - front/surr/CLFE/side/opt DACs - 04/06/05/0a/03
914 * 3stack - front/surr/CLFE/opt DACs - 04/0a/05/03 914 * 3stack - front/surr/CLFE/opt DACs - 04/05/0a/03
915 * 915 *
916 * Inputs of Analog Mix (0x20) 916 * Inputs of Analog Mix (0x20)
917 * 0:Port-B (front mic) 917 * 0:Port-B (front mic)
@@ -988,7 +988,7 @@ static hda_nid_t ad1988_6stack_dac_nids[4] = {
988}; 988};
989 989
990static hda_nid_t ad1988_3stack_dac_nids[3] = { 990static hda_nid_t ad1988_3stack_dac_nids[3] = {
991 0x04, 0x0a, 0x05 991 0x04, 0x05, 0x0a
992}; 992};
993 993
994/* for AD1988A revision-2, DAC2-4 are swapped */ 994/* for AD1988A revision-2, DAC2-4 are swapped */
@@ -997,7 +997,7 @@ static hda_nid_t ad1988_6stack_dac_nids_rev2[4] = {
997}; 997};
998 998
999static hda_nid_t ad1988_3stack_dac_nids_rev2[3] = { 999static hda_nid_t ad1988_3stack_dac_nids_rev2[3] = {
1000 0x04, 0x06, 0x0a 1000 0x04, 0x0a, 0x06
1001}; 1001};
1002 1002
1003static hda_nid_t ad1988_adc_nids[3] = { 1003static hda_nid_t ad1988_adc_nids[3] = {
@@ -1155,9 +1155,9 @@ static struct snd_kcontrol_new ad1988_3stack_mixers1[] = {
1155 1155
1156static struct snd_kcontrol_new ad1988_3stack_mixers1_rev2[] = { 1156static struct snd_kcontrol_new ad1988_3stack_mixers1_rev2[] = {
1157 HDA_CODEC_VOLUME("Front Playback Volume", 0x04, 0x0, HDA_OUTPUT), 1157 HDA_CODEC_VOLUME("Front Playback Volume", 0x04, 0x0, HDA_OUTPUT),
1158 HDA_CODEC_VOLUME("Surround Playback Volume", 0x06, 0x0, HDA_OUTPUT), 1158 HDA_CODEC_VOLUME("Surround Playback Volume", 0x0a, 0x0, HDA_OUTPUT),
1159 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0a, 1, 0x0, HDA_OUTPUT), 1159 HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x06, 1, 0x0, HDA_OUTPUT),
1160 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x0a, 2, 0x0, HDA_OUTPUT), 1160 HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x06, 2, 0x0, HDA_OUTPUT),
1161}; 1161};
1162 1162
1163static struct snd_kcontrol_new ad1988_3stack_mixers2[] = { 1163static struct snd_kcontrol_new ad1988_3stack_mixers2[] = {
@@ -1491,7 +1491,7 @@ static struct hda_verb ad1988_3stack_init_verbs[] = {
1491 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, 1491 {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
1492 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, 1492 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
1493 {0x3c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO}, 1493 {0x3c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
1494 {0x32, AC_VERB_SET_CONNECT_SEL, 0x1}, /* output sel: DAC 0x06 */ 1494 {0x32, AC_VERB_SET_CONNECT_SEL, 0x1}, /* output sel: DAC 0x0a */
1495 {0x34, AC_VERB_SET_CONNECT_SEL, 0x0}, 1495 {0x34, AC_VERB_SET_CONNECT_SEL, 0x0},
1496 /* mute analog mix */ 1496 /* mute analog mix */
1497 {0x20, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, 1497 {0x20, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
@@ -1657,11 +1657,11 @@ static inline hda_nid_t ad1988_idx_to_dac(struct hda_codec *codec, int idx)
1657{ 1657{
1658 static hda_nid_t idx_to_dac[8] = { 1658 static hda_nid_t idx_to_dac[8] = {
1659 /* A B C D E F G H */ 1659 /* A B C D E F G H */
1660 0x04, 0x06, 0x0a, 0x04, 0x05, 0x06, 0x05, 0x0a 1660 0x04, 0x06, 0x05, 0x04, 0x0a, 0x06, 0x05, 0x0a
1661 }; 1661 };
1662 static hda_nid_t idx_to_dac_rev2[8] = { 1662 static hda_nid_t idx_to_dac_rev2[8] = {
1663 /* A B C D E F G H */ 1663 /* A B C D E F G H */
1664 0x04, 0x05, 0x06, 0x04, 0x0a, 0x05, 0x0a, 0x06 1664 0x04, 0x05, 0x0a, 0x04, 0x06, 0x05, 0x0a, 0x06
1665 }; 1665 };
1666 if (codec->revision_id == AD1988A_REV2) 1666 if (codec->revision_id == AD1988A_REV2)
1667 return idx_to_dac_rev2[idx]; 1667 return idx_to_dac_rev2[idx];
@@ -1898,7 +1898,7 @@ static void ad1988_auto_set_output_and_unmute(struct hda_codec *codec,
1898 case 0x15: /* port-C - DAC 05 */ 1898 case 0x15: /* port-C - DAC 05 */
1899 snd_hda_codec_write(codec, 0x31, 0, AC_VERB_SET_CONNECT_SEL, 0x00); 1899 snd_hda_codec_write(codec, 0x31, 0, AC_VERB_SET_CONNECT_SEL, 0x00);
1900 break; 1900 break;
1901 case 0x17: /* port-E - DAC 06 */ 1901 case 0x17: /* port-E - DAC 0a */
1902 snd_hda_codec_write(codec, 0x32, 0, AC_VERB_SET_CONNECT_SEL, 0x01); 1902 snd_hda_codec_write(codec, 0x32, 0, AC_VERB_SET_CONNECT_SEL, 0x01);
1903 break; 1903 break;
1904 case 0x13: /* mono - DAC 04 */ 1904 case 0x13: /* mono - DAC 04 */
@@ -2037,6 +2037,9 @@ static int patch_ad1988(struct hda_codec *codec)
2037 init_MUTEX(&spec->amp_mutex); 2037 init_MUTEX(&spec->amp_mutex);
2038 codec->spec = spec; 2038 codec->spec = spec;
2039 2039
2040 if (codec->revision_id == AD1988A_REV2)
2041 snd_printk(KERN_INFO "patch_analog: AD1988A rev.2 is detected, enable workarounds\n");
2042
2040 board_config = snd_hda_check_board_config(codec, ad1988_cfg_tbl); 2043 board_config = snd_hda_check_board_config(codec, ad1988_cfg_tbl);
2041 if (board_config < 0 || board_config >= AD1988_MODEL_LAST) { 2044 if (board_config < 0 || board_config >= AD1988_MODEL_LAST) {
2042 printk(KERN_INFO "hda_codec: Unknown model for AD1988, trying auto-probe from BIOS...\n"); 2045 printk(KERN_INFO "hda_codec: Unknown model for AD1988, trying auto-probe from BIOS...\n");