diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-02-13 11:55:02 +0100 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2012-06-19 23:18:17 +0100 |
commit | 76c8103ac650773cc31f3de8713ea68919b357b8 (patch) | |
tree | 66c84d2a1eb0f89012c46af7bf86b831506399ff /sound/pci/hda/hda_local.h | |
parent | cbb05493366d341a1b66b2bf7488b4957ffc7e75 (diff) | |
download | kernel_samsung_smdk4412-76c8103ac650773cc31f3de8713ea68919b357b8.zip kernel_samsung_smdk4412-76c8103ac650773cc31f3de8713ea68919b357b8.tar.gz kernel_samsung_smdk4412-76c8103ac650773cc31f3de8713ea68919b357b8.tar.bz2 |
ALSA: hda - Add codec->no_jack_detect flag
commit 71b1e9e43d5199f57c109e20c0f4dffc5c048130 upstream.
Add a new flag to indicate that the codec has no jack-detection cap.
This flag should be set for hardwares that have no jack-detect
implementation although the codec chip itself supports it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
[bwh: Backported to 3.2: adjust filename and context for is_jack_detectable()]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'sound/pci/hda/hda_local.h')
-rw-r--r-- | sound/pci/hda/hda_local.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 368f0c5..c78b753 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h @@ -515,6 +515,8 @@ int snd_hda_jack_detect(struct hda_codec *codec, hda_nid_t nid); static inline bool is_jack_detectable(struct hda_codec *codec, hda_nid_t nid) { + if (codec->no_jack_detect) + return false; if (!(snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_PRES_DETECT)) return false; if (!codec->ignore_misc_bit && |