diff options
author | Lydia Wang <lydiawang@viatech.com.cn> | 2011-03-22 04:26:36 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-03-22 07:56:06 -0400 |
commit | ee3c35c0827de02de414d08b2ddcbb910c2263ab (patch) | |
tree | 094e968887e76ffecbce9db8580714b78db2c2f2 | |
parent | 970f630f5adcefb2841338929e209d970001d919 (diff) |
ALSA: hda - VIA: Fix VT1708 can't build up Headphone control issue
Since VT1708 didn't support the control of getting connection number,
building of headphone control will fail in via_hp_build() function.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/hda/patch_via.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 7e317f933a06..1371b57c11e8 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -1266,9 +1266,12 @@ static int via_hp_build(struct hda_codec *codec) | |||
1266 | break; | 1266 | break; |
1267 | } | 1267 | } |
1268 | 1268 | ||
1269 | nums = snd_hda_get_connections(codec, nid, conn, HDA_MAX_CONNECTIONS); | 1269 | if (spec->codec_type != VT1708) { |
1270 | if (nums <= 1) | 1270 | nums = snd_hda_get_connections(codec, nid, |
1271 | return 0; | 1271 | conn, HDA_MAX_CONNECTIONS); |
1272 | if (nums <= 1) | ||
1273 | return 0; | ||
1274 | } | ||
1272 | 1275 | ||
1273 | knew = via_clone_control(spec, &via_hp_mixer[0]); | 1276 | knew = via_clone_control(spec, &via_hp_mixer[0]); |
1274 | if (knew == NULL) | 1277 | if (knew == NULL) |