All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Ranostay <mranostay@embeddedalley.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de
Subject: [PATCH] hda: add eapd support to additional idt codecs
Date: Tue, 19 Jun 2007 10:27:25 -0400	[thread overview]
Message-ID: <4677E7CD.40209@embeddedalley.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 237 bytes --]

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>

[-- Attachment #2: alsa_patch_sigmatel.patch --]
[-- Type: text/plain, Size: 1717 bytes --]

diff -r 96495fe7cc13 pci/hda/patch_sigmatel.c
--- a/pci/hda/patch_sigmatel.c	Thu Jun 14 12:58:23 2007 +0200
+++ b/pci/hda/patch_sigmatel.c	Mon Jun 18 17:10:38 2007 -0400
@@ -832,6 +832,18 @@ static void stac92xx_set_config_regs(str
 	}
 }
 
+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
  */
@@ -2193,7 +2205,8 @@ static int patch_stac927x(struct hda_cod
 	}
 
 	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) {
@@ -2254,18 +2267,7 @@ static int patch_stac9205(struct hda_cod
 	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) {

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

             reply	other threads:[~2007-06-19 14:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-19 14:27 Matthew Ranostay [this message]
2007-06-19 15:01 ` [PATCH] hda: add eapd support to additional idt codecs Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4677E7CD.40209@embeddedalley.com \
    --to=mranostay@embeddedalley.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.