All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] ALSA: hda - Keep power link on for PantherPoint HDMI
@ 2012-11-07  8:22 David Henningsson
  2012-11-07  8:36 ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: David Henningsson @ 2012-11-07  8:22 UTC (permalink / raw)
  To: tiwai, 1075882, alsa-devel, fengguang.wu; +Cc: David Henningsson

On some of the PantherPoint HDMI machines we currently enable, we're seeing
trouble with unsol events, i e detecting monitor presence, especially when
on battery and after suspend/resume.

BugLink: https://bugs.launchpad.net/bugs/1075882
Tested-by: Cyrus Lien <cyrus.lien@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---
 sound/pci/hda/patch_hdmi.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

So far this is the workaround we have found to be working. Sometimes, it also
seems that "cat /proc/asound/cardx/codec#x" can also make the HDMI unsol event
trigger, so that the problem fixes itself.

We have not run any battery life tests to see if this causes more power consumption.

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 39ca100..3155267 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1288,13 +1288,17 @@ static int hdmi_parse_codec(struct hda_codec *codec)
 		}
 	}
 
+#ifdef CONFIG_PM
+	/* We're seeing some problems with unsolicited hot plug events on
+	 * PantherPoint after S3, if this is not enabled */
+	if (codec->vendor_id == 0x80862806)
+		codec->bus->power_keep_link_on = 1;
 	/*
 	 * 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_PM
-	if (!(snd_hda_param_read(codec, codec->afg, AC_PAR_POWER_STATE) &
+	else if (!(snd_hda_param_read(codec, codec->afg, AC_PAR_POWER_STATE) &
 	      AC_PWRST_EPSS))
 		codec->bus->power_keep_link_on = 1;
 #endif
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH] ALSA: hda - Keep power link on for PantherPoint HDMI
  2012-11-07  8:22 [RFC PATCH] ALSA: hda - Keep power link on for PantherPoint HDMI David Henningsson
@ 2012-11-07  8:36 ` Takashi Iwai
  2012-11-19 14:14   ` David Henningsson
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2012-11-07  8:36 UTC (permalink / raw)
  To: David Henningsson; +Cc: alsa-devel, fengguang.wu, 1075882

At Wed,  7 Nov 2012 09:22:33 +0100,
David Henningsson wrote:
> 
> On some of the PantherPoint HDMI machines we currently enable, we're seeing
> trouble with unsol events, i e detecting monitor presence, especially when
> on battery and after suspend/resume.
> 
> BugLink: https://bugs.launchpad.net/bugs/1075882
> Tested-by: Cyrus Lien <cyrus.lien@canonical.com>
> Signed-off-by: David Henningsson <david.henningsson@canonical.com>
> ---
>  sound/pci/hda/patch_hdmi.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> So far this is the workaround we have found to be working. Sometimes, it also
> seems that "cat /proc/asound/cardx/codec#x" can also make the HDMI unsol event
> trigger, so that the problem fixes itself.
> 
> We have not run any battery life tests to see if this causes more power consumption.

Looks safe at least, so I applied to for-next branch to give more
testing.  If you find a better solution, let me know.


thanks,

Takashi

> 
> diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
> index 39ca100..3155267 100644
> --- a/sound/pci/hda/patch_hdmi.c
> +++ b/sound/pci/hda/patch_hdmi.c
> @@ -1288,13 +1288,17 @@ static int hdmi_parse_codec(struct hda_codec *codec)
>  		}
>  	}
>  
> +#ifdef CONFIG_PM
> +	/* We're seeing some problems with unsolicited hot plug events on
> +	 * PantherPoint after S3, if this is not enabled */
> +	if (codec->vendor_id == 0x80862806)
> +		codec->bus->power_keep_link_on = 1;
>  	/*
>  	 * 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_PM
> -	if (!(snd_hda_param_read(codec, codec->afg, AC_PAR_POWER_STATE) &
> +	else if (!(snd_hda_param_read(codec, codec->afg, AC_PAR_POWER_STATE) &
>  	      AC_PWRST_EPSS))
>  		codec->bus->power_keep_link_on = 1;
>  #endif
> -- 
> 1.7.9.5
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH] ALSA: hda - Keep power link on for PantherPoint HDMI
  2012-11-07  8:36 ` Takashi Iwai
@ 2012-11-19 14:14   ` David Henningsson
  2012-11-19 14:16     ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: David Henningsson @ 2012-11-19 14:14 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, fengguang.wu, jesse.sung, 1075882

On 11/07/2012 09:36 AM, Takashi Iwai wrote:
> At Wed,  7 Nov 2012 09:22:33 +0100,
> David Henningsson wrote:
>>
>> On some of the PantherPoint HDMI machines we currently enable, we're seeing
>> trouble with unsol events, i e detecting monitor presence, especially when
>> on battery and after suspend/resume.
>>
>> BugLink: https://bugs.launchpad.net/bugs/1075882
>> Tested-by: Cyrus Lien <cyrus.lien@canonical.com>
>> Signed-off-by: David Henningsson <david.henningsson@canonical.com>
>> ---
>>   sound/pci/hda/patch_hdmi.c |    8 ++++++--
>>   1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> So far this is the workaround we have found to be working. Sometimes, it also
>> seems that "cat /proc/asound/cardx/codec#x" can also make the HDMI unsol event
>> trigger, so that the problem fixes itself.
>>
>> We have not run any battery life tests to see if this causes more power consumption.
>
> Looks safe at least, so I applied to for-next branch to give more
> testing.  If you find a better solution, let me know.

Jesse has now done a battery life test, both for idle machine and S3 
machine, and both with HDMI connected and HDMI unconnected.

All differences in power consumption were within error margins. Given 
that, should we consider sending this patch to stable?


-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH] ALSA: hda - Keep power link on for PantherPoint HDMI
  2012-11-19 14:14   ` David Henningsson
@ 2012-11-19 14:16     ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2012-11-19 14:16 UTC (permalink / raw)
  To: David Henningsson; +Cc: alsa-devel, fengguang.wu, jesse.sung, 1075882

At Mon, 19 Nov 2012 15:14:45 +0100,
David Henningsson wrote:
> 
> On 11/07/2012 09:36 AM, Takashi Iwai wrote:
> > At Wed,  7 Nov 2012 09:22:33 +0100,
> > David Henningsson wrote:
> >>
> >> On some of the PantherPoint HDMI machines we currently enable, we're seeing
> >> trouble with unsol events, i e detecting monitor presence, especially when
> >> on battery and after suspend/resume.
> >>
> >> BugLink: https://bugs.launchpad.net/bugs/1075882
> >> Tested-by: Cyrus Lien <cyrus.lien@canonical.com>
> >> Signed-off-by: David Henningsson <david.henningsson@canonical.com>
> >> ---
> >>   sound/pci/hda/patch_hdmi.c |    8 ++++++--
> >>   1 file changed, 6 insertions(+), 2 deletions(-)
> >>
> >> So far this is the workaround we have found to be working. Sometimes, it also
> >> seems that "cat /proc/asound/cardx/codec#x" can also make the HDMI unsol event
> >> trigger, so that the problem fixes itself.
> >>
> >> We have not run any battery life tests to see if this causes more power consumption.
> >
> > Looks safe at least, so I applied to for-next branch to give more
> > testing.  If you find a better solution, let me know.
> 
> Jesse has now done a battery life test, both for idle machine and S3 
> machine, and both with HDMI connected and HDMI unconnected.
> 
> All differences in power consumption were within error margins. Given 
> that, should we consider sending this patch to stable?

Well, once when it hits to Linus tree.  It's in for-next branch, and I
don't want to rebase the branch.  So, wait for the next merge window,
which will happen likely in a couple of weeks.


thanks,

Takashi

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-19 14:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-07  8:22 [RFC PATCH] ALSA: hda - Keep power link on for PantherPoint HDMI David Henningsson
2012-11-07  8:36 ` Takashi Iwai
2012-11-19 14:14   ` David Henningsson
2012-11-19 14:16     ` Takashi Iwai

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.