aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-09 02:46:34 -0500
committerTakashi Iwai <tiwai@suse.de>2013-01-12 02:44:18 -0500
commit54d778b31c98b305bf47fbbabd4107a3898ebe66 (patch)
tree1420025965b8e5b1ebcde7b9ce10a71c416ea41a /sound/pci/hda
parentca29683bd63a463d48934dc5b50ec4aecbfaa7c2 (diff)
ALSA: hda - Return "Headphone Mic" from hda_get_autocfg_input_label()
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>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_auto_parser.c2
-rw-r--r--sound/pci/hda/hda_generic.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c
index 6a01c012a0ae..e5b20219d850 100644
--- a/sound/pci/hda/hda_auto_parser.c
+++ b/sound/pci/hda/hda_auto_parser.c
@@ -395,6 +395,8 @@ static const char *hda_get_input_pin_label(struct hda_codec *codec,
395 return "SPDIF In"; 395 return "SPDIF In";
396 case AC_JACK_DIG_OTHER_IN: 396 case AC_JACK_DIG_OTHER_IN:
397 return "Digital In"; 397 return "Digital In";
398 case AC_JACK_HP_OUT:
399 return "Headphone Mic";
398 default: 400 default:
399 return "Misc"; 401 return "Misc";
400 } 402 }
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index f07b32668f42..aa4e6398e3b4 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -2085,8 +2085,6 @@ static int create_input_ctls(struct hda_codec *codec)
2085 continue; 2085 continue;
2086 2086
2087 label = hda_get_autocfg_input_label(codec, cfg, i); 2087 label = hda_get_autocfg_input_label(codec, cfg, i);
2088 if (spec->shared_mic_hp && !strcmp(label, "Misc"))
2089 label = "Headphone Mic";
2090 if (prev_label && !strcmp(label, prev_label)) 2088 if (prev_label && !strcmp(label, prev_label))
2091 type_idx++; 2089 type_idx++;
2092 else 2090 else
@@ -2540,8 +2538,6 @@ static int parse_mic_boost(struct hda_codec *codec)
2540 unsigned int val; 2538 unsigned int val;
2541 2539
2542 label = hda_get_autocfg_input_label(codec, cfg, i); 2540 label = hda_get_autocfg_input_label(codec, cfg, i);
2543 if (spec->shared_mic_hp && !strcmp(label, "Misc"))
2544 label = "Headphone Mic";
2545 if (prev_label && !strcmp(label, prev_label)) 2541 if (prev_label && !strcmp(label, prev_label))
2546 type_idx++; 2542 type_idx++;
2547 else 2543 else