ALSA: hda - Enable "Headset Mic" name for some Dell Latitude devices
authorDavid Henningsson <david.henningsson@canonical.com>
Thu, 21 Mar 2013 11:16:30 +0000 (12:16 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 21 Mar 2013 16:17:30 +0000 (17:17 +0100)
Now that we have a "Headset Mic" name, let's use it for some devices
we know for sure has a headset mic jack.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_sigmatel.c

index 3be877bd8a9291e30245d02b427c12daa86505a2..1d9d6427e0bf7cd3f09bc3a83fb1e0b08ad64848 100644 (file)
@@ -3528,8 +3528,12 @@ static int stac_parse_auto_config(struct hda_codec *codec)
 {
        struct sigmatel_spec *spec = codec->spec;
        int err;
+       int flags = 0;
 
-       err = snd_hda_parse_pin_defcfg(codec, &spec->gen.autocfg, NULL, 0);
+       if (spec->headset_jack)
+               flags |= HDA_PINCFG_HEADSET_MIC;
+
+       err = snd_hda_parse_pin_defcfg(codec, &spec->gen.autocfg, NULL, flags);
        if (err < 0)
                return err;