Skip to contentSkip to conversation

ALSA: VIA HDA: Fix VT1708 can't build up Headphone control issue

PATCH In review Lydia Wang 3 participants 3 messages Mar 22, 2011 Sound

lore
Share & tools
lore

Lydia Wang

author
#0 lore raw

PATCH 7/7 ALSA: VIA HDA: Fix VT1708 can't build up Headphone control issue

From: Lydia Wang <[email protected]>
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.

---
 sound/pci/hda/patch_via.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
sound/pci/hda/patch_via.c +6 -3
@@ -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)
maintainer
#1 lore raw
Quoted 5 lines · Lydia Wang

From: Lydia Wang <[email protected]>
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.

I would move the declaration of 'nums' variable to the if {} section here.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.

#2 lore raw

At Tue, 22 Mar 2011 09:33:08 +0100 (CET),

Quoted 10 lines · Jaroslav Kysela
Quoted 5 lines · Lydia Wang

From: Lydia Wang <[email protected]>
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.

I would move the declaration of 'nums' variable to the if {} section here.

But it would double the patch size ;)

Takashi