From: Matthew Ranostay <mranostay@embeddedalley.com>
To: alsa-devel@alsa-project.org
Cc: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] hda: STAC_HP_M4
Date: Thu, 09 Oct 2008 08:37:28 -0400 [thread overview]
Message-ID: <48EDFB08.1000504@embeddedalley.com> (raw)
Set the third microphone to a default config of a 'Line In' to be added the Input Source Mux's.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
---
diff --git a/pci/hda/patch_sigmatel.c b/pci/hda/patch_sigmatel.c
index b5c1449..5557116 100644
--- a/pci/hda/patch_sigmatel.c
+++ b/pci/hda/patch_sigmatel.c
@@ -3605,7 +3605,12 @@ static int stac92xx_init(struct hda_codec *codec)
for (i = 0; i < AUTO_PIN_LAST; i++) {
hda_nid_t nid = cfg->input_pins[i];
if (nid) {
- unsigned int pinctl = AC_PINCTL_IN_EN;
+ unsigned int pinctl = snd_hda_codec_read(codec, nid,
+ 0, AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
+ /* if PINCTL already set then skip */
+ if (pinctl & AC_PINCAP_IN)
+ continue;
+ pinctl = AC_PINCTL_IN_EN;
if (i == AUTO_PIN_MIC || i == AUTO_PIN_FRONT_MIC)
pinctl |= stac92xx_get_vref(codec, nid);
stac92xx_auto_set_pinctl(codec, nid, pinctl);
@@ -4375,12 +4380,13 @@ again:
switch (spec->board_config) {
case STAC_HP_M4:
spec->num_dmics = 0;
- spec->num_smuxes = 1;
+ spec->num_smuxes = 0;
spec->num_dmuxes = 0;
/* enable internal microphone */
- snd_hda_codec_write_cache(codec, 0x0e, 0,
- AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80);
+ stac92xx_set_config_reg(codec, 0x0e, 0x01813040);
+ stac92xx_auto_set_pinctl(codec, 0x0e,
+ AC_PINCTL_IN_EN | AC_PINCTL_VREF_80);
break;
default:
spec->num_dmics = STAC92HD71BXX_NUM_DMICS;
next reply other threads:[~2008-10-09 12:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-09 12:37 Matthew Ranostay [this message]
2008-10-09 15:38 ` [PATCH] hda: STAC_HP_M4 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=48EDFB08.1000504@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.