Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: David Henningsson <david.henningsson@canonical.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: HDMI Repoll after pm?
Date: Thu, 10 Dec 2015 14:18:13 +0100	[thread overview]
Message-ID: <s5hk2ommoh6.wl-tiwai@suse.de> (raw)
In-Reply-To: <5669774F.3060709@canonical.com>

On Thu, 10 Dec 2015 13:59:59 +0100,
David Henningsson wrote:
> 
> 
> 
> On 2015-12-10 10:53, Takashi Iwai wrote:
> > On Thu, 10 Dec 2015 10:47:59 +0100,
> > David Henningsson wrote:
> >>
> >> Hi Takashi,
> >>
> >> A recent change in sound.git seems to have introduced some repoll after
> >> pm. Is this an intentional change? I don't think it's wrong per se (it
> >> stops after 6 repolls), but it breaks my hda-emu tester when "list" does
> >> not return the expected input.
> >
> > Hm, there is no such an intended change.
> 
> After testing some more, I've found that reverting e90247f9 (Split ELD 
> update code from hdmi_present_sense) fixes the issue, so it seems like 
> this commit indeed contains a functional change...

Thanks for chasing it.  Does the following patch work better?


Takashi

---
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 35a78a6f87a6..2a7d29a07f31 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1605,6 +1605,7 @@ static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll)
 	 */
 	int present;
 	bool ret;
+	bool do_repoll = false;
 
 	snd_hda_power_up_pm(codec);
 	present = snd_hda_pin_sense(codec, pin_nid);
@@ -1629,9 +1630,11 @@ static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll)
 						    eld->eld_size) < 0)
 				eld->eld_valid = false;
 		}
+		if (!eld->eld_valid && repoll)
+			do_repoll = true;
 	}
 
-	if (!eld->eld_valid && repoll)
+	if (do_repoll)
 		schedule_delayed_work(&per_pin->work, msecs_to_jiffies(300));
 	else
 		update_eld(codec, per_pin, eld);

  reply	other threads:[~2015-12-10 13:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-10  9:47 HDMI Repoll after pm? David Henningsson
2015-12-10  9:53 ` Takashi Iwai
2015-12-10 12:59   ` David Henningsson
2015-12-10 13:18     ` Takashi Iwai [this message]
2015-12-10 13:28       ` David Henningsson
2015-12-10 13: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=s5hk2ommoh6.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=david.henningsson@canonical.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