Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=92a22beb756c53985e8ba98d39f2c8fc834557a4
Commit:     92a22beb756c53985e8ba98d39f2c8fc834557a4
Parent:     76c08828709129bdce6c6a325e0342ba73f2618f
Author:     Matthew Ranostay <[EMAIL PROTECTED]>
AuthorDate: Tue Jun 19 16:48:28 2007 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Fri Jul 20 11:11:30 2007 +0200

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 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 36423ca..270539a 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)
        }
 }
 
+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
  */
@@ -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) {
@@ -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) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to