ALSA: VIA HDA: Create a master amplifier control for VT1718S.
authorLydia Wang <lydiawang@viatech.com.cn>
Mon, 20 Jun 2011 06:17:56 +0000 (14:17 +0800)
committerTakashi Iwai <tiwai@suse.de>
Tue, 21 Jun 2011 05:24:56 +0000 (07:24 +0200)
Create a master volume and mute control of playback for VT1718S.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_via.c

index f1a80cd6afe431d23806228c54772c41ccb7fc56..f43bb0eaed8b8e3c6f75ca08c7179267937c3be1 100644 (file)
@@ -4462,6 +4462,19 @@ static int vt1718S_auto_create_multi_out_ctls(struct via_spec *spec,
                        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(