diff options
author | Matthew Ranostay <mranostay@embeddedalley.com> | 2007-06-19 10:48:28 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-07-20 05:11:30 -0400 |
commit | 92a22beb756c53985e8ba98d39f2c8fc834557a4 (patch) | |
tree | c64ea7e47eb0c691e2ea25616f13dcdd3967ef44 | |
parent | 76c08828709129bdce6c6a325e0342ba73f2618f (diff) |
[ALSA] hda: add eapd support to additional idt codecs
Added support for EAPD on the 927x, and 9227-8 IDT HDA codecs.
Enabling EAPD powers the internal speaker amp otherwise there is no
sound on systems with an internal amp.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 31 |
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 | ||
847 | static 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) { |