Home Home > GIT Browse > SLE15-SP1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-07-19 14:20:49 +0200
committerTakashi Iwai <tiwai@suse.de>2019-07-19 14:34:28 +0200
commit93c949a507a027a0550491e200d7b8b0533a0859 (patch)
tree1354b5bd48d3ea92da890835dcc7f3f4d01985a1
parent4cde8f21bb32a92b17f301407fb307dedeb3a7a9 (diff)
ALSA: hda/hdmi - Fix i915 reverse port/pin mapping
(bsc#1111666).
-rw-r--r--patches.drivers/ALSA-hda-hdmi-Fix-i915-reverse-port-pin-mapping.patch72
-rw-r--r--series.conf1
2 files changed, 73 insertions, 0 deletions
diff --git a/patches.drivers/ALSA-hda-hdmi-Fix-i915-reverse-port-pin-mapping.patch b/patches.drivers/ALSA-hda-hdmi-Fix-i915-reverse-port-pin-mapping.patch
new file mode 100644
index 0000000000..54a94cf485
--- /dev/null
+++ b/patches.drivers/ALSA-hda-hdmi-Fix-i915-reverse-port-pin-mapping.patch
@@ -0,0 +1,72 @@
+From 3140aafb22edeab0cc41f15f53b12a118c0ac215 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 15 Jul 2019 23:14:53 +0200
+Subject: [PATCH] ALSA: hda/hdmi - Fix i915 reverse port/pin mapping
+Git-commit: 3140aafb22edeab0cc41f15f53b12a118c0ac215
+Patch-mainline: v5.3-rc1
+References: bsc#1111666
+
+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>
+
+---
+ sound/pci/hda/patch_hdmi.c | 24 +++++++++++++++++++-----
+ 1 file changed, 19 insertions(+), 5 deletions(-)
+
+diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
+index 1e6c489bca15..0b2a26e2c5f1 100644
+--- a/sound/pci/hda/patch_hdmi.c
++++ b/sound/pci/hda/patch_hdmi.c
+@@ -2524,18 +2524,32 @@ static int intel_pin2port(void *audio_ptr, int pin_nid)
+ return -1;
+ }
+
++static int intel_port2pin(struct hda_codec *codec, int port)
++{
++ struct hdmi_spec *spec = codec->spec;
++
++ if (!spec->port_num) {
++ /* we assume only from port-B to port-D */
++ if (port < 1 || port > 3)
++ return 0;
++ /* intel port is 1-based */
++ return port + intel_base_nid(codec) - 1;
++ }
++
++ if (port < 1 || port > spec->port_num)
++ return 0;
++ return spec->port_map[port - 1];
++}
++
+ static void intel_pin_eld_notify(void *audio_ptr, int port, int pipe)
+ {
+ struct hda_codec *codec = audio_ptr;
+ int pin_nid;
+ int dev_id = pipe;
+
+- /* we assume only from port-B to port-D */
+- if (port < 1 || port > 3)
++ pin_nid = intel_port2pin(codec, port);
++ if (!pin_nid)
+ return;
+-
+- pin_nid = port + intel_base_nid(codec) - 1; /* intel port is 1-based */
+-
+ /* skip notification during system suspend (but not in runtime PM);
+ * the state will be updated at resume
+ */
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index e81bd88077..9ef70b45b5 100644
--- a/series.conf
+++ b/series.conf
@@ -47895,6 +47895,7 @@
patches.drivers/PCI-Always-allow-probing-with-driver_override.patch
patches.fixes/PCI-P2PDMA-Fix-missing-check-for-dma_virt_ops.patch
patches.drivers/ALSA-hda-hdmi-Remove-duplicated-define.patch
+ patches.drivers/ALSA-hda-hdmi-Fix-i915-reverse-port-pin-mapping.patch
# davem/net-next
patches.drivers/cxgb4-Enable-hash-filter-with-offload.patch