aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r--sound/pci/hda/patch_sigmatel.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 36423ca693e7..270539a2bbc9 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -844,6 +844,21 @@ static void stac92xx_set_config_regs(struct hda_codec *codec)
844 } 844 }
845} 845}
846 846
847static void stac92xx_enable_eapd(struct hda_codec *codec)
848{
849 /* Configure GPIO0 as output */
850 snd_hda_codec_write(codec, codec->afg, 0,
851 AC_VERB_SET_GPIO_DIRECTION, 0x00000001);
852 /* Configure GPIO0 as CMOS */
853 snd_hda_codec_write(codec, codec->afg, 0, 0x7e7, 0x00000000);
854 /* Assert GPIO0 high */
855 snd_hda_codec_write(codec, codec->afg, 0,
856 AC_VERB_SET_GPIO_DATA, 0x00000001);
857 /* Enable GPIO0 */
858 snd_hda_codec_write(codec, codec->afg, 0,
859 AC_VERB_SET_GPIO_MASK, 0x00000001);
860}
861
847/* 862/*
848 * Analog playback callbacks 863 * Analog playback callbacks
849 */ 864 */
@@ -2205,7 +2220,8 @@ static int patch_stac927x(struct hda_codec *codec)
2205 } 2220 }
2206 2221
2207 spec->multiout.dac_nids = spec->dac_nids; 2222 spec->multiout.dac_nids = spec->dac_nids;
2208 2223 stac92xx_enable_eapd(codec);
2224
2209 err = stac92xx_parse_auto_config(codec, 0x1e, 0x20); 2225 err = stac92xx_parse_auto_config(codec, 0x1e, 0x20);
2210 if (!err) { 2226 if (!err) {
2211 if (spec->board_config < 0) { 2227 if (spec->board_config < 0) {
@@ -2273,18 +2289,7 @@ static int patch_stac9205(struct hda_codec *codec)
2273 spec->mixer = stac9205_mixer; 2289 spec->mixer = stac9205_mixer;
2274 2290
2275 spec->multiout.dac_nids = spec->dac_nids; 2291 spec->multiout.dac_nids = spec->dac_nids;
2276 2292 stac92xx_enable_eapd(codec);
2277 /* Configure GPIO0 as EAPD output */
2278 snd_hda_codec_write(codec, codec->afg, 0,
2279 AC_VERB_SET_GPIO_DIRECTION, 0x00000001);
2280 /* Configure GPIO0 as CMOS */
2281 snd_hda_codec_write(codec, codec->afg, 0, 0x7e7, 0x00000000);
2282 /* Assert GPIO0 high */
2283 snd_hda_codec_write(codec, codec->afg, 0,
2284 AC_VERB_SET_GPIO_DATA, 0x00000001);
2285 /* Enable GPIO0 */
2286 snd_hda_codec_write(codec, codec->afg, 0,
2287 AC_VERB_SET_GPIO_MASK, 0x00000001);
2288 2293
2289 err = stac92xx_parse_auto_config(codec, 0x1f, 0x20); 2294 err = stac92xx_parse_auto_config(codec, 0x1f, 0x20);
2290 if (!err) { 2295 if (!err) {