Refer to HDA Specification
7.3.3.31 Configuration Default
Misc[3:0] is a bit field used to indicate other information about the jack. Currently, only bit 0 is defined. If bit 0 is set, it indicates that the jack has no presence detect capability, so even if a Pin Complex indicates that the codec hardware supports the presence detect functionality on the jack, the external circuitry is not capable of supporting the functionality. The bit definitions for the Miscfield are in Table 106.
Do we need to change is_jack_detectable() when user setup BIOS to use AC97 Front Audio Panel which set AC_DEFCFG_MISC_NO_PRESENCE bit ?
+#define get_defcfg_misc(cfg) \ + ((cfg & AC_DEFCFG_MISC) >> AC_DEFCFG_MISC_SHIFT)
static inline bool is_jack_detectable(struct hda_codec *codec, hda_nid_t nid) { return (snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_PRES_DETECT) && + (!(get_defcfg_misc(codec,nid) & AC_DEFCFG_MISC_NO_PRESENCE)) && (get_wcaps(codec, nid) & AC_WCAP_UNSOL_CAP); }
or add another fuction is_defcfg_misc_no_presence() to indicate jack has no presence detect capability ?