All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Zhang, Xiong Y" <xiong.y.zhang@intel.com>
Cc: "Yang, Libin" <libin.yang@intel.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"jani.nikula@linux.intel.com" <jani.nikula@linux.intel.com>,
	"Vetter, Daniel" <daniel.vetter@intel.com>,
	David Henningsson <david.henningsson@canonical.com>
Subject: Re: [Intel-gfx] [PATCH 4/4] ALSA: hda - Wake the codec up on pin/ELD	notify events
Date: Thu, 26 Nov 2015 09:07:17 +0100	[thread overview]
Message-ID: <s5hwpt56v62.wl-tiwai@suse.de> (raw)
In-Reply-To: <8082FF9BCB2B054996454E47167FF4EC0B0F2951@SHSMSX104.ccr.corp.intel.com>

On Thu, 26 Nov 2015 08:57:30 +0100,
Zhang, Xiong Y wrote:
> 
> > > > BTW, I have a patchset to avoid the audio h/w wakeup by a new
> > > > component ops to get ELD and connection states.  It was posted to
> > > > alsa-devel shortly ago just as a reference, but this should work well
> > > > in such a case, too.  The test patches are found in test/hdmi-jack
> > > > branch of my sound git tree.
> > 
> > Did you try this branch (merge onto intel-test-nightly)?
> > 
> [Zhang, Xiong Y] Yes, this branch could fix my issue.

OK, good to hear.  But this isn't for 4.4 or backport, as it's more
radical changes.

Could you check the patch below instead?  This suppresses the notifier
handling during suspend.  It's bad, but the hotplug should be still
handled via normal unsol event, so it should keep working, good enough
as a stop gap.


Takashi

---
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index bdb6f226d006..f7c70e2ae65c 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -33,6 +33,7 @@
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/module.h>
+#include <linux/pm_runtime.h>
 #include <sound/core.h>
 #include <sound/jack.h>
 #include <sound/asoundef.h>
@@ -2352,7 +2353,9 @@ static void intel_pin_eld_notify(void *audio_ptr, int port)
 	struct hda_codec *codec = audio_ptr;
 	int pin_nid = port + 0x04;
 
-	check_presence_and_report(codec, pin_nid);
+	if (!atomic_read(&codec->core.in_pm) &&
+	    !pm_runtime_suspended(hda_codec_dev(codec)))
+		check_presence_and_report(codec, pin_nid);
 }
 
 static int patch_generic_hdmi(struct hda_codec *codec)

  reply	other threads:[~2015-11-26  8:07 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-28 17:02 [PATCH 0/4 v5] i915 to call hda driver on HDMI plug/unplug David Henningsson
2015-08-28 17:02 ` [PATCH 1/4] drm/i915: Add audio pin sense / ELD callback David Henningsson
2015-09-02 11:44   ` Daniel Vetter
2015-08-28 17:02 ` [PATCH 2/4] drm/i915: Call audio pin/ELD notify function David Henningsson
2015-08-28 17:02 ` [PATCH 3/4] ALSA: hda - allow codecs to access the i915 pin/ELD callback David Henningsson
2015-08-28 17:02 ` [PATCH 4/4] ALSA: hda - Wake the codec up on pin/ELD notify events David Henningsson
2015-11-25  9:56   ` Zhang, Xiong Y
2015-11-25 10:07     ` Takashi Iwai
2015-11-25 10:57       ` Zhang, Xiong Y
2015-11-25 11:17         ` Takashi Iwai
2015-11-26  6:06           ` Zhang, Xiong Y
2015-11-26  6:25             ` Takashi Iwai
2015-11-26  7:57               ` Zhang, Xiong Y
2015-11-26  8:07                 ` Takashi Iwai [this message]
2015-11-26  9:16                   ` Zhang, Xiong Y
2015-11-26  9:24                     ` Takashi Iwai
2015-11-26 15:08                       ` David Henningsson
2015-11-26 15:23                         ` Takashi Iwai
2015-11-26 15:29                           ` David Henningsson
2015-11-26 15:37                             ` Imre Deak
2015-11-26 15:43                             ` Ville Syrjälä
2015-11-26 15:51                               ` Takashi Iwai
2015-11-26 15:58                                 ` Ville Syrjälä
2015-11-26 16:16                                   ` Takashi Iwai
2015-11-27  2:55                                     ` Zhang, Xiong Y
2015-11-27 13:38                                       ` Takashi Iwai
2015-11-27 13:45                                         ` David Henningsson
2015-11-27 13:50                                           ` Takashi Iwai
2015-11-26 15:47                             ` Takashi Iwai
2015-11-26 15:48                           ` Daniel Vetter
2015-08-28 17:14 ` [PATCH 0/4 v5] i915 to call hda driver on HDMI plug/unplug Jani Nikula
2015-09-02 11:45   ` Daniel Vetter
2015-09-02 11:59     ` Takashi Iwai
2015-09-02 12:14       ` Daniel Vetter
2015-09-03  7:52 ` David Henningsson
2015-09-03  8:31   ` Takashi Iwai
2015-09-03  9:53     ` David Henningsson
2015-09-03 10:29     ` Jani Nikula

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=s5hwpt56v62.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=daniel.vetter@intel.com \
    --cc=david.henningsson@canonical.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=libin.yang@intel.com \
    --cc=xiong.y.zhang@intel.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 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.