[alsa-devel] [PATCH 7/7] ALSA: VIA HDA: Fix VT1708 can't build up Headphone control issue

Lydia Wang lydiawang at viatech.com.cn
Tue Mar 22 09:26:36 CET 2011


From: Lydia Wang <lydiawang at viatech.com.cn>
Subject: ALSA: VIA HDA: 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 at viatech.com.cn>
---
 sound/pci/hda/patch_via.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -1266,9 +1266,12 @@
 		break;
 	}
 
-	nums = snd_hda_get_connections(codec, nid, conn, HDA_MAX_CONNECTIONS);
-	if (nums <= 1)
-		return 0;
+	if (spec->codec_type != VT1708) {
+		nums = snd_hda_get_connections(codec, nid,
+					       conn, HDA_MAX_CONNECTIONS);
+		if (nums <= 1)
+			return 0;
+	}
 
 	knew = via_clone_control(spec, &via_hp_mixer[0]);
 	if (knew == NULL)



More information about the Alsa-devel mailing list