Skip to content

Commit

Permalink
ALSA: hda - Return "Headphone Mic" from hda_get_autocfg_input_label()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai committed Jan 12, 2013
1 parent ca29683 commit 54d778b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions sound/pci/hda/hda_auto_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down
4 changes: 0 additions & 4 deletions sound/pci/hda/hda_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 54d778b

Please sign in to comment.