diff options
author | Harald Welte <HaraldWelte@viatech.com> | 2008-09-09 03:53:36 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-09-09 12:52:00 -0400 |
commit | fb4cb772c0b22f7bce0b151ef5712e80d434bc97 (patch) | |
tree | 6a18a3bd4b6a631f62a26f92dd77f01792f23871 /sound/pci/hda/patch_via.c | |
parent | 76d9b0dd78197c473892e44b1fbf6be4592cc440 (diff) |
ALSA: HDA patch_via.c: Fix inversion of surround and side channels
In the current driver, there is a consistent mistake between the SURROUND and
the SIDE channels. This patch fixes it.
Signed-off-by: Harald Welte <HaraldWelte@viatech.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/hda/patch_via.c')
-rw-r--r-- | sound/pci/hda/patch_via.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index d397f528cb51..bae6273eeb1a 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -30,6 +30,7 @@ | |||
30 | /* 2007-09-12 Lydia Wang Add EAPD enable during driver initialization */ | 30 | /* 2007-09-12 Lydia Wang Add EAPD enable during driver initialization */ |
31 | /* 2007-09-17 Lydia Wang Add VT1708B codec support */ | 31 | /* 2007-09-17 Lydia Wang Add VT1708B codec support */ |
32 | /* 2007-11-14 Lydia Wang Add VT1708A codec HP and CD pin connect config */ | 32 | /* 2007-11-14 Lydia Wang Add VT1708A codec HP and CD pin connect config */ |
33 | /* 2008-02-03 Lydia Wang Fix Rear channels and Back channels inverse issue */ | ||
33 | /* */ | 34 | /* */ |
34 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | 35 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ |
35 | 36 | ||
@@ -660,10 +661,10 @@ static int vt1708_auto_fill_dac_nids(struct via_spec *spec, | |||
660 | spec->multiout.dac_nids[i] = 0x12; | 661 | spec->multiout.dac_nids[i] = 0x12; |
661 | break; | 662 | break; |
662 | case AUTO_SEQ_SURROUND: | 663 | case AUTO_SEQ_SURROUND: |
663 | spec->multiout.dac_nids[i] = 0x13; | 664 | spec->multiout.dac_nids[i] = 0x11; |
664 | break; | 665 | break; |
665 | case AUTO_SEQ_SIDE: | 666 | case AUTO_SEQ_SIDE: |
666 | spec->multiout.dac_nids[i] = 0x11; | 667 | spec->multiout.dac_nids[i] = 0x13; |
667 | break; | 668 | break; |
668 | } | 669 | } |
669 | } | 670 | } |
@@ -688,7 +689,7 @@ static int vt1708_auto_create_multi_out_ctls(struct via_spec *spec, | |||
688 | continue; | 689 | continue; |
689 | 690 | ||
690 | if (i != AUTO_SEQ_FRONT) | 691 | if (i != AUTO_SEQ_FRONT) |
691 | nid_vol = 0x1b - i + 1; | 692 | nid_vol = 0x18 + i; |
692 | 693 | ||
693 | if (i == AUTO_SEQ_CENLFE) { | 694 | if (i == AUTO_SEQ_CENLFE) { |
694 | /* Center/LFE */ | 695 | /* Center/LFE */ |
@@ -1118,11 +1119,11 @@ static int vt1709_auto_fill_dac_nids(struct via_spec *spec, | |||
1118 | break; | 1119 | break; |
1119 | case AUTO_SEQ_SURROUND: | 1120 | case AUTO_SEQ_SURROUND: |
1120 | /* AOW3 */ | 1121 | /* AOW3 */ |
1121 | spec->multiout.dac_nids[i] = 0x27; | 1122 | spec->multiout.dac_nids[i] = 0x11; |
1122 | break; | 1123 | break; |
1123 | case AUTO_SEQ_SIDE: | 1124 | case AUTO_SEQ_SIDE: |
1124 | /* AOW1 */ | 1125 | /* AOW1 */ |
1125 | spec->multiout.dac_nids[i] = 0x11; | 1126 | spec->multiout.dac_nids[i] = 0x27; |
1126 | break; | 1127 | break; |
1127 | default: | 1128 | default: |
1128 | break; | 1129 | break; |
@@ -1231,26 +1232,26 @@ static int vt1709_auto_create_multi_out_ctls(struct via_spec *spec, | |||
1231 | } else if (i == AUTO_SEQ_SURROUND) { | 1232 | } else if (i == AUTO_SEQ_SURROUND) { |
1232 | sprintf(name, "%s Playback Volume", chname[i]); | 1233 | sprintf(name, "%s Playback Volume", chname[i]); |
1233 | err = via_add_control(spec, VIA_CTL_WIDGET_VOL, name, | 1234 | err = via_add_control(spec, VIA_CTL_WIDGET_VOL, name, |
1234 | HDA_COMPOSE_AMP_VAL(0x29, 3, 0, | 1235 | HDA_COMPOSE_AMP_VAL(0x1a, 3, 0, |
1235 | HDA_OUTPUT)); | 1236 | HDA_OUTPUT)); |
1236 | if (err < 0) | 1237 | if (err < 0) |
1237 | return err; | 1238 | return err; |
1238 | sprintf(name, "%s Playback Switch", chname[i]); | 1239 | sprintf(name, "%s Playback Switch", chname[i]); |
1239 | err = via_add_control(spec, VIA_CTL_WIDGET_MUTE, name, | 1240 | err = via_add_control(spec, VIA_CTL_WIDGET_MUTE, name, |
1240 | HDA_COMPOSE_AMP_VAL(0x29, 3, 0, | 1241 | HDA_COMPOSE_AMP_VAL(0x1a, 3, 0, |
1241 | HDA_OUTPUT)); | 1242 | HDA_OUTPUT)); |
1242 | if (err < 0) | 1243 | if (err < 0) |
1243 | return err; | 1244 | return err; |
1244 | } else if (i == AUTO_SEQ_SIDE) { | 1245 | } else if (i == AUTO_SEQ_SIDE) { |
1245 | sprintf(name, "%s Playback Volume", chname[i]); | 1246 | sprintf(name, "%s Playback Volume", chname[i]); |
1246 | err = via_add_control(spec, VIA_CTL_WIDGET_VOL, name, | 1247 | err = via_add_control(spec, VIA_CTL_WIDGET_VOL, name, |
1247 | HDA_COMPOSE_AMP_VAL(0x1a, 3, 0, | 1248 | HDA_COMPOSE_AMP_VAL(0x29, 3, 0, |
1248 | HDA_OUTPUT)); | 1249 | HDA_OUTPUT)); |
1249 | if (err < 0) | 1250 | if (err < 0) |
1250 | return err; | 1251 | return err; |
1251 | sprintf(name, "%s Playback Switch", chname[i]); | 1252 | sprintf(name, "%s Playback Switch", chname[i]); |
1252 | err = via_add_control(spec, VIA_CTL_WIDGET_MUTE, name, | 1253 | err = via_add_control(spec, VIA_CTL_WIDGET_MUTE, name, |
1253 | HDA_COMPOSE_AMP_VAL(0x1a, 3, 0, | 1254 | HDA_COMPOSE_AMP_VAL(0x29, 3, 0, |
1254 | HDA_OUTPUT)); | 1255 | HDA_OUTPUT)); |
1255 | if (err < 0) | 1256 | if (err < 0) |
1256 | return err; | 1257 | return err; |
@@ -1690,10 +1691,10 @@ static int vt1708B_auto_fill_dac_nids(struct via_spec *spec, | |||
1690 | spec->multiout.dac_nids[i] = 0x24; | 1691 | spec->multiout.dac_nids[i] = 0x24; |
1691 | break; | 1692 | break; |
1692 | case AUTO_SEQ_SURROUND: | 1693 | case AUTO_SEQ_SURROUND: |
1693 | spec->multiout.dac_nids[i] = 0x25; | 1694 | spec->multiout.dac_nids[i] = 0x11; |
1694 | break; | 1695 | break; |
1695 | case AUTO_SEQ_SIDE: | 1696 | case AUTO_SEQ_SIDE: |
1696 | spec->multiout.dac_nids[i] = 0x11; | 1697 | spec->multiout.dac_nids[i] = 0x25; |
1697 | break; | 1698 | break; |
1698 | } | 1699 | } |
1699 | } | 1700 | } |
@@ -1708,7 +1709,7 @@ static int vt1708B_auto_create_multi_out_ctls(struct via_spec *spec, | |||
1708 | { | 1709 | { |
1709 | char name[32]; | 1710 | char name[32]; |
1710 | static const char *chname[4] = { "Front", "Surround", "C/LFE", "Side" }; | 1711 | static const char *chname[4] = { "Front", "Surround", "C/LFE", "Side" }; |
1711 | hda_nid_t nid_vols[] = {0x16, 0x27, 0x26, 0x18}; | 1712 | hda_nid_t nid_vols[] = {0x16, 0x18, 0x26, 0x27}; |
1712 | hda_nid_t nid, nid_vol = 0; | 1713 | hda_nid_t nid, nid_vol = 0; |
1713 | int i, err; | 1714 | int i, err; |
1714 | 1715 | ||