summaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-03-10 12:02:49 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-04-12 09:08:52 -0700
commitee2a37ab39b013589647ced2e6526c7358cb2111 (patch)
tree15f81a62b7fa9ae507fe438a23cc08a052e9cdc6 /sound/pci
parent5fae159b7d25987747919ccb73a8813da81abd97 (diff)
downloadlinux-stable-ee2a37ab39b013589647ced2e6526c7358cb2111.tar.gz
linux-stable-ee2a37ab39b013589647ced2e6526c7358cb2111.tar.bz2
linux-stable-ee2a37ab39b013589647ced2e6526c7358cb2111.zip
ALSA: hda - Don't handle ELD notify from invalid port
commit 4f8e4f3537cafc4de128e6bfdf83baa78bc60eb1 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: Stefan Assmann <sassmann@kpanic.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_hdmi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 70c945603379..f7bcd8dbac14 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -2353,6 +2353,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
*/