Skip to content

Commit

Permalink
ALSA: hda - Don't handle ELD notify from invalid port
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Mar 10, 2016
1 parent 56dc66f commit 4f8e4f3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sound/pci/hda/patch_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2432,6 +2432,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
*/
Expand Down

0 comments on commit 4f8e4f3

Please sign in to comment.