[alsa-devel] [PATCH 3/3] ALSA: VIA HDA: Create a master amplifier control for VT1718S.

lydiawang lydiawang at viatech.com.cn
Mon Jun 20 08:17:56 CEST 2011


From: Lydia Wang <lydiawang at viatech.com.cn>
Subject: ALSA: VIA HDA: Create a master amplifier control for VT1718S.

Create a master volume and mute control of playback for VT1718S.

Signed-off-by: Lydia Wang <lydiawang at viatech.com.cn>
Index: sound-2.6/sound/pci/hda/patch_via.c
===================================================================
--- sound-2.6.orig/sound/pci/hda/patch_via.c	2011-06-20 13:49:00.000000000 +0800
+++ sound-2.6/sound/pci/hda/patch_via.c	2011-06-20 14:01:15.000000000 +0800
@@ -4465,6 +4465,19 @@
 			if (err < 0)
 				return err;
 		} else if (i == AUTO_SEQ_FRONT) {
+			/* add control to mixer index 0 */
+			err = via_add_control(spec, VIA_CTL_WIDGET_VOL,
+					      "Master Front Playback Volume",
+					      HDA_COMPOSE_AMP_VAL(0x21, 3, 5,
+								  HDA_INPUT));
+			if (err < 0)
+				return err;
+			err = via_add_control(spec, VIA_CTL_WIDGET_MUTE,
+					      "Master Front Playback Switch",
+					      HDA_COMPOSE_AMP_VAL(0x21, 3, 5,
+								  HDA_INPUT));
+			if (err < 0)
+				return err;
 			/* Front */
 			sprintf(name, "%s Playback Volume", chname[i]);
 			err = via_add_control(



More information about the Alsa-devel mailing list