mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-07-16 22:38:04 +00:00
189ce92b4c
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
48 lines
1.8 KiB
Diff
48 lines
1.8 KiB
Diff
From 6b9a3be3e496ccc4125e0c6daded90e823864642 Mon Sep 17 00:00:00 2001
|
|
From: Takashi Iwai <tiwai@suse.de>
|
|
Date: Mon, 13 Feb 2012 11:55:02 +0100
|
|
Subject: [PATCH 40/67] 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>
|
|
---
|
|
sound/pci/hda/hda_codec.h | 1 +
|
|
sound/pci/hda/hda_local.h | 2 ++
|
|
2 files changed, 3 insertions(+)
|
|
|
|
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
|
|
index 71f6744..78b2223 100644
|
|
--- a/sound/pci/hda/hda_codec.h
|
|
+++ b/sound/pci/hda/hda_codec.h
|
|
@@ -858,6 +858,7 @@ struct hda_codec {
|
|
unsigned int pins_shutup:1; /* pins are shut up */
|
|
unsigned int no_trigger_sense:1; /* don't trigger at pin-sensing */
|
|
unsigned int ignore_misc_bit:1; /* ignore MISC_NO_PRESENCE bit */
|
|
+ unsigned int no_jack_detect:1; /* Machine has no jack-detection */
|
|
#ifdef CONFIG_SND_HDA_POWER_SAVE
|
|
unsigned int power_on :1; /* current (global) power-state */
|
|
unsigned int power_transition :1; /* power-state in transition */
|
|
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 &&
|
|
--
|
|
1.7.9.5
|
|
|