ALSA: hda - Return "Headphone Mic" from hda_get_autocfg_input_label()
authorTakashi Iwai <tiwai@suse.de>
Wed, 9 Jan 2013 07:46:34 +0000 (08:46 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sat, 12 Jan 2013 07:44:18 +0000 (08:44 +0100)
Instead of handling special cases in the caller side, give a proper
name string "Headphone Mic" from hda_get_autocfg_input_label() when
the headhpone jack pin is specified as an input.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_auto_parser.c
sound/pci/hda/hda_generic.c

index 6a01c012a0ae352792862d5a033a0393f77fbc4f..e5b20219d850791f404f3b25f2f49483373b9dd0 100644 (file)
@@ -395,6 +395,8 @@ static const char *hda_get_input_pin_label(struct hda_codec *codec,
                return "SPDIF In";
        case AC_JACK_DIG_OTHER_IN:
                return "Digital In";
+       case AC_JACK_HP_OUT:
+               return "Headphone Mic";
        default:
                return "Misc";
        }
index f07b32668f42252f55511852e91002771ded621b..aa4e6398e3b479bde04a2685625c5ecc288f4d77 100644 (file)
@@ -2085,8 +2085,6 @@ static int create_input_ctls(struct hda_codec *codec)
                        continue;
 
                label = hda_get_autocfg_input_label(codec, cfg, i);
-               if (spec->shared_mic_hp && !strcmp(label, "Misc"))
-                       label = "Headphone Mic";
                if (prev_label && !strcmp(label, prev_label))
                        type_idx++;
                else
@@ -2540,8 +2538,6 @@ static int parse_mic_boost(struct hda_codec *codec)
                        unsigned int val;
 
                        label = hda_get_autocfg_input_label(codec, cfg, i);
-                       if (spec->shared_mic_hp && !strcmp(label, "Misc"))
-                               label = "Headphone Mic";
                        if (prev_label && !strcmp(label, prev_label))
                                type_idx++;
                        else