aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-12-25 16:49:01 -0500
committerTakashi Iwai <tiwai@suse.de>2009-12-25 16:49:01 -0500
commit729d55ba972348234759f8e40abf8de020f0d505 (patch)
tree3550e86c5937ec88033932782fafda7f631ffe3c /sound/pci/hda/hda_codec.c
parentef18beded8ddbaafdf4914bab209f77e60ae3a18 (diff)
ALSA: hda - Disable tigger at pin-sensing on AD codecs
Analog Device codecs seem to have problems with the triggering of pin-sensing although their pincaps give the trigger requirements. Some reported that constant CPU load on HP laptops with AD codecs. For avoiding this regression, add a flag to codec struct to notify explicitly that the codec doesn't suppot the trigger at pin-sensing. Tested-by: Maciej Rutecki <maciej.rutecki@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 950ee5cfcacf..f98b47cd6cfb 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1327,11 +1327,13 @@ EXPORT_SYMBOL_HDA(snd_hda_query_pin_caps);
1327 */ 1327 */
1328u32 snd_hda_pin_sense(struct hda_codec *codec, hda_nid_t nid) 1328u32 snd_hda_pin_sense(struct hda_codec *codec, hda_nid_t nid)
1329{ 1329{
1330 u32 pincap = snd_hda_query_pin_caps(codec, nid); 1330 u32 pincap;
1331
1332 if (pincap & AC_PINCAP_TRIG_REQ) /* need trigger? */
1333 snd_hda_codec_read(codec, nid, 0, AC_VERB_SET_PIN_SENSE, 0);
1334 1331
1332 if (!codec->no_trigger_sense) {
1333 pincap = snd_hda_query_pin_caps(codec, nid);
1334 if (pincap & AC_PINCAP_TRIG_REQ) /* need trigger? */
1335 snd_hda_codec_read(codec, nid, 0, AC_VERB_SET_PIN_SENSE, 0);
1336 }
1335 return snd_hda_codec_read(codec, nid, 0, 1337 return snd_hda_codec_read(codec, nid, 0,
1336 AC_VERB_GET_PIN_SENSE, 0); 1338 AC_VERB_GET_PIN_SENSE, 0);
1337} 1339}