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>
*/
int present;
bool ret;
+ bool do_repoll = false;
snd_hda_power_up_pm(codec);
present = snd_hda_pin_sense(codec, pin_nid);
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);