/* Execute necessary pin sense measurement and return its Presence Detect, Impedance, ELD Valid etc. status bits.  */
u32 snd_hda_pin_sense(struct hda_codec *codec, hda_nid_t nid)
/* Execute necessary pin sense measurement and return its Presence Detect, Impedance, ELD Valid etc. status bits.  */
u32 snd_hda_pin_sense(struct hda_codec *codec, hda_nid_t nid)
{
	u32 pincap;
	if (!codec->no_trigger_sense) {
		pincap = snd_hda_query_pin_caps(codec, nid);
		if (pincap & AC_PINCAP_TRIG_REQ)
			snd_hda_codec_read(codec, nid, 0, AC_VERB_SET_PIN_SENSE, 0);
	}
	return snd_hda_codec_read(codec, nid, 0,
				  AC_VERB_GET_PIN_SENSE, 0);
}