diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 9bedca073e9a..f5ccba0fd189 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -1087,15 +1087,19 @@ static int alc_init_jacks(struct hda_codec *codec) | |||
1087 | unsigned int hp_nid = spec->autocfg.hp_pins[0]; | 1087 | unsigned int hp_nid = spec->autocfg.hp_pins[0]; |
1088 | unsigned int mic_nid = spec->ext_mic.pin; | 1088 | unsigned int mic_nid = spec->ext_mic.pin; |
1089 | 1089 | ||
1090 | err = alc_add_jack(codec, hp_nid, SND_JACK_HEADPHONE); | 1090 | if (hp_nid) { |
1091 | if (err < 0) | 1091 | err = alc_add_jack(codec, hp_nid, SND_JACK_HEADPHONE); |
1092 | return err; | 1092 | if (err < 0) |
1093 | alc_report_jack(codec, hp_nid); | 1093 | return err; |
1094 | alc_report_jack(codec, hp_nid); | ||
1095 | } | ||
1094 | 1096 | ||
1095 | err = alc_add_jack(codec, mic_nid, SND_JACK_MICROPHONE); | 1097 | if (mic_nid) { |
1096 | if (err < 0) | 1098 | err = alc_add_jack(codec, mic_nid, SND_JACK_MICROPHONE); |
1097 | return err; | 1099 | if (err < 0) |
1098 | alc_report_jack(codec, mic_nid); | 1100 | return err; |
1101 | alc_report_jack(codec, mic_nid); | ||
1102 | } | ||
1099 | 1103 | ||
1100 | return 0; | 1104 | return 0; |
1101 | } | 1105 | } |