aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index d02ea8926e7e..26ceace88c96 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1351,11 +1351,13 @@ EXPORT_SYMBOL_HDA(snd_hda_query_pin_caps);
1351 */ 1351 */
1352u32 snd_hda_pin_sense(struct hda_codec *codec, hda_nid_t nid) 1352u32 snd_hda_pin_sense(struct hda_codec *codec, hda_nid_t nid)
1353{ 1353{
1354 u32 pincap = snd_hda_query_pin_caps(codec, nid); 1354 u32 pincap;
1355
1356 if (pincap & AC_PINCAP_TRIG_REQ) /* need trigger? */
1357 snd_hda_codec_read(codec, nid, 0, AC_VERB_SET_PIN_SENSE, 0);
1358 1355
1356 if (!codec->no_trigger_sense) {
1357 pincap = snd_hda_query_pin_caps(codec, nid);
1358 if (pincap & AC_PINCAP_TRIG_REQ) /* need trigger? */
1359 snd_hda_codec_read(codec, nid, 0, AC_VERB_SET_PIN_SENSE, 0);
1360 }
1359 return snd_hda_codec_read(codec, nid, 0, 1361 return snd_hda_codec_read(codec, nid, 0,
1360 AC_VERB_GET_PIN_SENSE, 0); 1362 AC_VERB_GET_PIN_SENSE, 0);
1361} 1363}