Commit 0ba0391b authored by Takashi Iwai's avatar Takashi Iwai Committed by Tim Gardner

ALSA: hda - Don't handle ELD notify from invalid port

BugLink: http://bugs.launchpad.net/bugs/1572722

commit 4f8e4f35 upstream.

The current Intel HDMI codec driver supports only three fixed ports
from port B to port D.  However, i915 driver may assign a DP on other
ports, e.g. port A, when no eDP is used.  This incompatibility is
caught later at pin_nid_to_pin_index() and results in a warning
message like "HDMI: pin nid 4 not registered" at each time.

This patch filters out such invalid events beforehand, so that the
kernel won't be too grumbling.
Reported-by: default avatarStefan Assmann <sassmann@kpanic.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 7cd21d59
......@@ -2355,6 +2355,10 @@ static void intel_pin_eld_notify(void *audio_ptr, int port)
struct hda_codec *codec = audio_ptr;
int pin_nid = port + 0x04;
/* we assume only from port-B to port-D */
if (port < 1 || port > 3)
return;
/* skip notification during system suspend (but not in runtime PM);
* the state will be updated at resume
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment