diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-12-10 14:35:09 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-12-10 14:35:09 +0100 |
commit | 9a5e5234bafeaa2e9d15881d443c38d3d82d0b38 (patch) | |
tree | ec6d562e058b19b075a033aa685e6af7b51ab83c /sound/pci/hda/patch_hdmi.c | |
parent | 55913110dde2d9c1cf751481525848644f9041da (diff) | |
download | op-kernel-dev-9a5e5234bafeaa2e9d15881d443c38d3d82d0b38.zip op-kernel-dev-9a5e5234bafeaa2e9d15881d443c38d3d82d0b38.tar.gz |
ALSA: hda - Fix superfluous HDMI jack repoll
The recent commit [e90247f9fcee: ALSA: hda - Split ELD update code
from hdmi_present_sense()] rewrote the HDMI jack handling code, but a
slight behavior change sneaked in unexpectedly. When the jack isn't
connected, it tries repoll unnecessarily.
This patch addresses the flaw, to the right behavior as before.
Fixes: e90247f9fcee ('ALSA: hda - Split ELD update code from hdmi_present_sense()')
Reported-and-tested-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_hdmi.c')
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 35a78a6..2a7d29a 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); |