alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [RFC] hda - is_jack_detectable()
@ 2011-10-25  3:02 Raymond Yau
  2011-10-25  3:31 ` Raymond Yau
  0 siblings, 1 reply; 16+ messages in thread
From: Raymond Yau @ 2011-10-25  3:02 UTC (permalink / raw)
  To: ALSA Development Mailing List, Takashi Iwai

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 ?

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2011-12-27  1:45 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-25  3:02 [RFC] hda - is_jack_detectable() Raymond Yau
2011-10-25  3:31 ` Raymond Yau
2011-10-25 11:31   ` Takashi Iwai
2011-11-01 21:03   ` David Henningsson
2011-11-02  7:02     ` Takashi Iwai
2011-11-05  5:30       ` Raymond Yau
2011-11-06 13:12         ` Takashi Iwai
2011-11-09  4:06           ` Raymond Yau
2011-11-09  7:08             ` Takashi Iwai
2011-11-09  7:50               ` Takashi Iwai
     [not found]                 ` <CAN8ccibAoNQfDNWJ-zE_DGH6mc-ipmmdhBDQW+fjOMT8xHcD+Q@mail.gmail.com>
     [not found]                   ` <s5h4ny76naa.wl%tiwai@suse.de>
2011-11-16  7:14                     ` Raymond Yau
2011-11-17 15:17                       ` Takashi Iwai
2011-12-23  2:37                         ` Raymond Yau
2011-12-23  9:26                           ` Takashi Iwai
2011-12-27  1:45                             ` Raymond Yau
2011-11-06 11:46     ` Raymond Yau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).