ALSA: hda/hdmi - Fix i915 reverse port/pin mapping
authorTakashi Iwai <tiwai@suse.de>
Mon, 15 Jul 2019 21:14:53 +0000 (23:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2019 07:10:57 +0000 (09:10 +0200)
commitbfaf0f9ad25e90208b13c92cc51f86f00a6edc0f
tree62f38bb5f5924025cf38ae2708404e1476b7c63f
parent21fcbec8929d89f1a9d5417531528cb01481165c
ALSA: hda/hdmi - Fix i915 reverse port/pin mapping

commit 3140aafb22edeab0cc41f15f53b12a118c0ac215 upstream.

The recent fix for Icelake HDMI codec introduced the mapping from pin
NID to the i915 gfx port number.  However, it forgot the reverse
mapping from the port number to the pin NID that is used in the ELD
notifier callback.  As a result, it's processed to a wrong widget and
gives a warning like
  snd_hda_codec_hdmi hdaudioC0D2: HDMI: pin nid 5 not registered

This patch corrects it with a proper reverse mapping function.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204133
Fixes: b0d8bc50b9f2 ("ALSA: hda: hdmi - add Icelake support")
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/patch_hdmi.c