From: Wu Fengguang <fengguang.wu@intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
Shane W <shane-alsa@csy.ca>
Subject: Re: [PATCH 5/5] intelhdmi - dont power off HDA link
Date: Fri, 11 Dec 2009 20:15:11 +0800 [thread overview]
Message-ID: <20091211121511.GA12374@localhost> (raw)
In-Reply-To: <s5hhbryoum3.wl%tiwai@suse.de>
On Fri, Dec 11, 2009 at 03:08:52PM +0800, Takashi Iwai wrote:
> At Fri, 11 Dec 2009 12:28:37 +0800,
> Wu Fengguang wrote:
> >
> > For codecs without EPSS support (G45/IbexPeak), the hotplug event will
> > be lost if the HDA is powered off during the time. After that the pin
> > presence detection verb returns inaccurate info.
> >
> > So always power-on HDA link for !EPSS codecs.
> >
> > Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
>
> I think it'd be better to add a flag to hda_bus than hda_codec like
> the patch below (the change in patch_intelhdmi.c is not included).
> It's a bit ugly to change the module parameter from the driver side.
Good suggestion, thanks! Here is the updated patch.
---
intelhdmi - don't power off HDA link
For codecs without EPSS support (G45/IbexPeak), the hotplug event will
be lost if the HDA is powered off during the time. After that the pin
presence detection verb returns inaccurate info.
So always power-on HDA link for !EPSS codecs.
KarL offers the fact and Takashi recommends to flag hda_bus. Thanks!
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
sound/pci/hda/hda_codec.h | 1 +
sound/pci/hda/hda_intel.c | 3 ++-
sound/pci/hda/patch_intelhdmi.c | 11 +++++++++++
3 files changed, 14 insertions(+), 1 deletion(-)
--- sound-2.6.orig/sound/pci/hda/hda_intel.c 2009-12-11 12:46:18.000000000 +0800
+++ sound-2.6/sound/pci/hda/hda_intel.c 2009-12-11 20:12:31.000000000 +0800
@@ -2082,7 +2082,8 @@ static void azx_power_notify(struct hda_
}
if (power_on)
azx_init_chip(chip);
- else if (chip->running && power_save_controller)
+ else if (chip->running && power_save_controller &&
+ !bus->power_keep_link_on)
azx_stop_chip(chip);
}
#endif /* CONFIG_SND_HDA_POWER_SAVE */
--- sound-2.6.orig/sound/pci/hda/patch_intelhdmi.c 2009-12-11 12:46:22.000000000 +0800
+++ sound-2.6/sound/pci/hda/patch_intelhdmi.c 2009-12-11 20:07:59.000000000 +0800
@@ -391,6 +391,17 @@ static int intel_hdmi_parse_codec(struct
}
}
+ /*
+ * G45/IbexPeak don't support EPSS: the unsolicited pin hot plug event
+ * can be lost and presence sense verb will become inaccurate if the
+ * HDA link is powered off at hot plug or hw initialization time.
+ */
+#ifdef CONFIG_SND_HDA_POWER_SAVE
+ if (!(snd_hda_param_read(codec, codec->afg, AC_PAR_POWER_STATE) &
+ AC_PWRST_EPSS))
+ codec->bus->power_keep_link_on = 1;
+#endif
+
return 0;
}
--- sound-2.6.orig/sound/pci/hda/hda_codec.h 2009-12-11 12:46:21.000000000 +0800
+++ sound-2.6/sound/pci/hda/hda_codec.h 2009-12-11 20:13:18.000000000 +0800
@@ -639,6 +639,7 @@ struct hda_bus {
unsigned int rirb_error:1; /* error in codec communication */
unsigned int response_reset:1; /* controller was reset */
unsigned int in_reset:1; /* during reset operation */
+ unsigned int power_keep_link_on:1; /* don't power off HDA link */
};
/*
next prev parent reply other threads:[~2009-12-11 12:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-11 4:28 [PATCH 0/5] Intel HDMI fixes Wu Fengguang
2009-12-11 4:28 ` [PATCH 1/5] hda - show HBR(High Bit Rate) pin cap in procfs Wu Fengguang
2009-12-11 4:28 ` [PATCH 2/5] intelhdmi - accept DisplayPort pin Wu Fengguang
2009-12-11 4:28 ` [PATCH 3/5] intelhdmi - channel mapping applies to Pin Wu Fengguang
2009-12-11 4:28 ` [PATCH 4/5] intelhdmi - add channel mapping for typical configurations Wu Fengguang
2009-12-11 7:00 ` Takashi Iwai
2009-12-11 12:05 ` Wu Fengguang
2009-12-11 4:28 ` [PATCH 5/5] intelhdmi - dont power off HDA link Wu Fengguang
2009-12-11 7:08 ` Takashi Iwai
2009-12-11 12:15 ` Wu Fengguang [this message]
2009-12-11 7:10 ` [PATCH 0/5] Intel HDMI fixes 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=20091211121511.GA12374@localhost \
--to=fengguang.wu@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=shane-alsa@csy.ca \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox