mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Valdis.Kletnieks@vt.edu
Cc: Andrew Morton <akpm@linux-foundation.org>,
	perex@perex.cz, linux-kernel@vger.kernel.org,
	alsa-devel@alsa-project.org
Subject: Re: 2.6.28-rc2-mm1 - sound semi-busted on Dell Latitude D820
Date: Tue, 11 Nov 2008 18:03:22 +0100	[thread overview]
Message-ID: <s5hprl2yz39.wl%tiwai@suse.de> (raw)
In-Reply-To: <s5hljvqzot1.wl%tiwai@suse.de>

At Tue, 11 Nov 2008 08:47:54 +0100,
I wrote:
> 
> At Mon, 10 Nov 2008 14:35:58 -0500,
> Valdis.Kletnieks@vt.edu wrote:
> > 
> > Sometime between -mmotm1017  and -rc2-mm1, something odd happened to the
> > sound subsystem.  On my Dell Latitude D820, audio works OK if it's sitting
> > there standalone, or in its docking station.
> > 
> > However, when I plug in headphones, it goes silent.
> 
> To confirm a regression, could you copy sound/pci/hda/patch_sigmatel.c
> from 2.6.27 kernel and check the driver works?  Does the same problem
> exist in 2.6.28-rc kernel?

Could you try the patch below?

There is another patch for a missing capture mux control, but in your
case, it doesn't matter because you didn't change the value.
I'll post that patch later, too.


thanks,

Takashi

===
>From 4f1e6bc3646ab50b8181555ab7e6eeab68b8632a Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Tue, 11 Nov 2008 16:47:24 +0100
Subject: [PATCH] ALSA: hda - Fix input pin initialization for STAC/IDT codecs

The input pins are sometimes not initialized properly because
of the optimization check of the current pinctl code.

Force to initialize the mic input pins so that they can be set up
properly even if they were in a weird state.  But keep other input
pins if already set up as input, since this could be an extra mic
pin.

Reference: Novell bnc#443738
	https://bugzilla.novell.com/show_bug.cgi?id=443738

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/pci/hda/patch_sigmatel.c |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 1627756..a511601 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -3653,14 +3653,18 @@ 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 = 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);
+			unsigned int pinctl;
+			if (i == AUTO_PIN_MIC || i == AUTO_PIN_FRONT_MIC) {
+				/* for mic pins, force to initialize */
+				pinctl = stac92xx_get_vref(codec, nid);
+			} else {
+				pinctl = snd_hda_codec_read(codec, nid, 0,
+					AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
+				/* if PINCTL already set then skip */
+				if (pinctl & AC_PINCTL_IN_EN)
+					continue;
+			}
+			pinctl |= AC_PINCTL_IN_EN;
 			stac92xx_auto_set_pinctl(codec, nid, pinctl);
 		}
 	}
-- 
1.6.0.4


  reply	other threads:[~2008-11-11 17:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-10 19:35 Valdis.Kletnieks
2008-11-11  7:47 ` Takashi Iwai
2008-11-11 17:03   ` Takashi Iwai [this message]
2008-11-11 17:04     ` Takashi Iwai
2008-11-11 18:25       ` Valdis.Kletnieks
2008-11-12 21:09       ` Valdis.Kletnieks
2008-11-13  6:38         ` 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=s5hprl2yz39.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=akpm@linux-foundation.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®