diff options
author | Takashi Iwai <tiwai@suse.de> | 2016-03-10 06:02:49 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-03-10 06:02:49 -0500 |
commit | 4f8e4f3537cafc4de128e6bfdf83baa78bc60eb1 (patch) | |
tree | 4ebdd0a442536fc6ae3b76cac5aad98437f8915b | |
parent | 56dc66ff1c6d71f9a38c4a7c000b72b921fe4c89 (diff) |
ALSA: hda - Don't handle ELD notify from invalid port
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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index bcbc4ee10130..b90e4f3967de 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -2432,6 +2432,10 @@ static void intel_pin_eld_notify(void *audio_ptr, int port) | |||
2432 | struct hda_codec *codec = audio_ptr; | 2432 | struct hda_codec *codec = audio_ptr; |
2433 | int pin_nid = port + 0x04; | 2433 | int pin_nid = port + 0x04; |
2434 | 2434 | ||
2435 | /* we assume only from port-B to port-D */ | ||
2436 | if (port < 1 || port > 3) | ||
2437 | return; | ||
2438 | |||
2435 | /* skip notification during system suspend (but not in runtime PM); | 2439 | /* skip notification during system suspend (but not in runtime PM); |
2436 | * the state will be updated at resume | 2440 | * the state will be updated at resume |
2437 | */ | 2441 | */ |