summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Yau <superquad.vortex2@gmail.com>2011-06-01 15:09:48 +0800
committerTakashi Iwai <tiwai@suse.de>2011-06-03 10:08:46 +0200
commita01ef051d584c12ede5cd5275b008b2ded57f3d9 (patch)
treeb65747acc39afc815912fd500c55ed1406273a2a
parent4dffbe03d1e940aba878f9420e67feb8423cdd08 (diff)
downloadlinux-a01ef051d584c12ede5cd5275b008b2ded57f3d9.tar.gz
linux-a01ef051d584c12ede5cd5275b008b2ded57f3d9.tar.bz2
linux-a01ef051d584c12ede5cd5275b008b2ded57f3d9.zip
ALSA: hda - Check pin support EAPD in ad198x_power_eapd_write
Check whether the pin supports EAPD in ad198x_power_eapd_write. Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_analog.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 82c4b2f53598..d694e9d4921d 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -506,9 +506,11 @@ static void ad198x_power_eapd_write(struct hda_codec *codec, hda_nid_t front,
hda_nid_t hp)
{
struct ad198x_spec *spec = codec->spec;
- snd_hda_codec_write(codec, front, 0, AC_VERB_SET_EAPD_BTLENABLE,
+ if (snd_hda_query_pin_caps(codec, front) & AC_PINCAP_EAPD)
+ snd_hda_codec_write(codec, front, 0, AC_VERB_SET_EAPD_BTLENABLE,
!spec->inv_eapd ? 0x00 : 0x02);
- snd_hda_codec_write(codec, hp, 0, AC_VERB_SET_EAPD_BTLENABLE,
+ if (snd_hda_query_pin_caps(codec, hp) & AC_PINCAP_EAPD)
+ snd_hda_codec_write(codec, hp, 0, AC_VERB_SET_EAPD_BTLENABLE,
!spec->inv_eapd ? 0x00 : 0x02);
}