summaryrefslogtreecommitdiff
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
authorMatt Porter <mporter@embeddedalley.com>2006-12-18 13:17:28 +0100
committerJaroslav Kysela <perex@suse.cz>2007-02-09 09:02:30 +0100
commit333824034a19baf71b2bd5fe2153630982f379b0 (patch)
tree14e56aa793bbfe9c9717bcc3490e20496dbf447e /sound/pci/hda/patch_sigmatel.c
parentcdf88efa03907a884177b226321bb41bc17c407f (diff)
[ALSA] hda: add sigmatel 9205 eapd support
Adds support for handling EAPD on 9205 codecs Signed-off-by: Matt Porter <mporter@embeddedalley.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r--sound/pci/hda/patch_sigmatel.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index cbaa00aa5b92..4e3fc95b7b4f 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -1859,6 +1859,18 @@ static int patch_stac9205(struct hda_codec *codec)
spec->multiout.dac_nids = spec->dac_nids;
+ /* Configure GPIO0 as EAPD output */
+ snd_hda_codec_write(codec, codec->afg, 0,
+ AC_VERB_SET_GPIO_DIRECTION, 0x00000001);
+ /* Configure GPIO0 as CMOS */
+ snd_hda_codec_write(codec, codec->afg, 0, 0x7e7, 0x00000000);
+ /* Assert GPIO0 high */
+ snd_hda_codec_write(codec, codec->afg, 0,
+ AC_VERB_SET_GPIO_DATA, 0x00000001);
+ /* Enable GPIO0 */
+ snd_hda_codec_write(codec, codec->afg, 0,
+ AC_VERB_SET_GPIO_MASK, 0x00000001);
+
err = stac92xx_parse_auto_config(codec, 0x1f, 0x20);
if (err < 0) {
stac92xx_free(codec);