mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Roland Dreier <rdreier@cisco.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: snd_hda_intel 2.6.24-rc2 bug: interrupts don't always work on Lenovo X60s
Date: Tue, 13 Nov 2007 04:43:05 +0100	[thread overview]
Message-ID: <s5hhcjqhkty.wl%tiwai@suse.de> (raw)
In-Reply-To: <adafxzb2tf3.fsf@cisco.com>

At Mon, 12 Nov 2007 10:46:40 -0800,
Roland Dreier wrote:
> 
>  > >     [ 2311.759856] ACPI: PCI Interrupt 0000:00:1b.0[B] -> GSI 17 (level, low) -> IRQ 21
>  > >     [ 2311.759866] hda_intel: probe_mask set to 0x1 for device 17aa:2010
>  > >     [ 2311.759886] PCI: Setting latency timer of device 0000:00:1b.0 to 64
>  > >     [ 2312.911309] hda_intel: azx_get_response timeout, switching to polling mode: last cmd=0x003f000c
>  > 
>  > Hm, strange, NID 0x03 shouldn't be accessed via AD1981 codec, at
>  > least, thinkpad model.  Did you enable CONFIG_SND_HDA_CODEC_ANALOG?
>  > Otherwise it won't work.
> 
> Yes, I have
> 
>     CONFIG_SND_HDA_CODEC_ANALOG=y
> 
> in my .config.
> 
> By the way, the "polling mode" seems to work OK: I still get normal
> playback of music etc.

Yes, the polling mode should work in most cases, too.

Anyway, could you try the patch below?  As far as I see, it's the only
part that may access PINCAP verb for that NID.


thanks,

Takashi

---

diff -r cd6cede1eca4 sound/pci/hda/hda_codec.c
--- a/sound/pci/hda/hda_codec.c	Mon Nov 12 14:55:19 2007 +0000
+++ b/sound/pci/hda/hda_codec.c	Tue Nov 13 08:28:48 2007 +0100
@@ -1626,19 +1626,26 @@ static void hda_set_power_state(struct h
 
 	nid = codec->start_nid;
 	for (i = 0; i < codec->num_nodes; i++, nid++) {
-		if (get_wcaps(codec, nid) & AC_WCAP_POWER) {
-			unsigned int pincap;
-			/*
-			 * don't power down the widget if it controls eapd
-			 * and EAPD_BTLENABLE is set.
-			 */
-			pincap = snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP);
-			if (pincap & AC_PINCAP_EAPD) {
-				int eapd = snd_hda_codec_read(codec, nid,
-					0, AC_VERB_GET_EAPD_BTLENABLE, 0);
-				eapd &= 0x02;
-				if (power_state == AC_PWRST_D3 && eapd)
-					continue;
+		unsigned int wcaps = get_wcaps(codec, nid);
+		if (wcaps & AC_WCAP_POWER) {
+			unsigned int wid_type = (wcaps & AC_WCAP_TYPE) >>
+				AC_WCAP_TYPE_SHIFT;
+			if (wid_type == AC_WID_PIN) {
+				unsigned int pincap;
+				/*
+				 * don't power down the widget if it controls
+				 * eapd and EAPD_BTLENABLE is set.
+				 */
+				pincap = snd_hda_param_read(codec, nid,
+							    AC_PAR_PIN_CAP);
+				if (pincap & AC_PINCAP_EAPD) {
+					int eapd = snd_hda_codec_read(codec,
+						nid, 0,
+						AC_VERB_GET_EAPD_BTLENABLE, 0);
+					eapd &= 0x02;
+					if (power_state == AC_PWRST_D3 && eapd)
+						continue;
+				}
 			}
 			snd_hda_codec_write(codec, nid, 0,
 					    AC_VERB_SET_POWER_STATE,

  reply	other threads:[~2007-11-13  7:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-08 22:48 Roland Dreier
2007-11-12  7:39 ` Takashi Iwai
2007-11-12 16:59   ` Roland Dreier
2007-11-12 13:41     ` Takashi Iwai
2007-11-12 18:46       ` Roland Dreier
2007-11-13  3:43         ` Takashi Iwai [this message]
2007-11-14 16:39           ` Roland Dreier
2007-11-14 13:19             ` Takashi Iwai
2007-11-14 17:22               ` Roland Dreier
2007-11-14 13:33                 ` Takashi Iwai
2007-11-22 17:42           ` Theodore Tso
2007-11-23  7:06             ` 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=s5hhcjqhkty.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdreier@cisco.com \
    /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®