]> err.no Git - linux-2.6/blobdiff - sound/pci/hda/patch_analog.c
[ALSA] hda-codec - Add internal mic item for ALC268 acer model
[linux-2.6] / sound / pci / hda / patch_analog.c
index 3f3905cc4e017642f6b9c70584fe1b42b23156d6..87db3c410a10a526d300dc2a722cc7ae0dd1f540 100644 (file)
@@ -28,6 +28,7 @@
 #include <sound/core.h>
 #include "hda_codec.h"
 #include "hda_local.h"
+#include "hda_patch.h"
 
 struct ad198x_spec {
        struct snd_kcontrol_new *mixers[5];
@@ -80,7 +81,6 @@ struct ad198x_spec {
 #endif
        /* for virtual master */
        hda_nid_t vmaster_nid;
-       u32 vmaster_tlv[4];
        const char **slave_vols;
        const char **slave_sws;
 };
@@ -185,10 +185,11 @@ static int ad198x_build_controls(struct hda_codec *codec)
 
        /* if we have no master control, let's create it */
        if (!snd_hda_find_mixer_ctl(codec, "Master Playback Volume")) {
+               unsigned int vmaster_tlv[4];
                snd_hda_set_vmaster_tlv(codec, spec->vmaster_nid,
-                                       HDA_OUTPUT, spec->vmaster_tlv);
+                                       HDA_OUTPUT, vmaster_tlv);
                err = snd_hda_add_vmaster(codec, "Master Playback Volume",
-                                         spec->vmaster_tlv,
+                                         vmaster_tlv,
                                          (spec->slave_vols ?
                                           spec->slave_vols : ad_slave_vols));
                if (err < 0)
@@ -3188,11 +3189,12 @@ static int patch_ad1884(struct hda_codec *codec)
  * Lenovo Thinkpad T61/X61
  */
 static struct hda_input_mux ad1984_thinkpad_capture_source = {
-       .num_items = 3,
+       .num_items = 4,
        .items = {
                { "Mic", 0x0 },
                { "Internal Mic", 0x1 },
                { "Mix", 0x3 },
+               { "Docking-Station", 0x4 },
        },
 };