Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 62070
b: refs/heads/master
c: 92a22be
h: refs/heads/master
v: v3
  • Loading branch information
Matthew Ranostay authored and Jaroslav Kysela committed Jul 20, 2007
1 parent f175793 commit 779b90a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 76c08828709129bdce6c6a325e0342ba73f2618f
refs/heads/master: 92a22beb756c53985e8ba98d39f2c8fc834557a4
31 changes: 18 additions & 13 deletions trunk/sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,21 @@ static void stac92xx_set_config_regs(struct hda_codec *codec)
}
}

static void stac92xx_enable_eapd(struct hda_codec *codec)
{
/* Configure GPIO0 as 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);
}

/*
* Analog playback callbacks
*/
Expand Down Expand Up @@ -2205,7 +2220,8 @@ static int patch_stac927x(struct hda_codec *codec)
}

spec->multiout.dac_nids = spec->dac_nids;

stac92xx_enable_eapd(codec);

err = stac92xx_parse_auto_config(codec, 0x1e, 0x20);
if (!err) {
if (spec->board_config < 0) {
Expand Down Expand Up @@ -2273,18 +2289,7 @@ static int patch_stac9205(struct hda_codec *codec)
spec->mixer = stac9205_mixer;

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);
stac92xx_enable_eapd(codec);

err = stac92xx_parse_auto_config(codec, 0x1f, 0x20);
if (!err) {
Expand Down

0 comments on commit 779b90a

Please sign in to comment.