]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.34 patch
authorGreg Kroah-Hartman <gregkh@suse.de>
Thu, 29 Jul 2010 22:39:44 +0000 (15:39 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 29 Jul 2010 22:39:44 +0000 (15:39 -0700)
queue-2.6.34/alsa-hda-fix-pin-detection-of-nvidia-hdmi.patch [new file with mode: 0644]
queue-2.6.34/series

diff --git a/queue-2.6.34/alsa-hda-fix-pin-detection-of-nvidia-hdmi.patch b/queue-2.6.34/alsa-hda-fix-pin-detection-of-nvidia-hdmi.patch
new file mode 100644 (file)
index 0000000..8a22a0e
--- /dev/null
@@ -0,0 +1,88 @@
+From 38faddb1afdd37218c196ac3db1cb5fbe7fc9c75 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Wed, 28 Jul 2010 14:21:55 +0200
+Subject: ALSA: hda - Fix pin-detection of Nvidia HDMI
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 38faddb1afdd37218c196ac3db1cb5fbe7fc9c75 upstream.
+
+The behavior of Nvidia HDMI codec regarding the pin-detection unsol events
+is based on the old HD-audio spec, i.e. PD bit indicates only the update
+and doesn't show the current state.  Since the current code assumes the
+new behavior, the pin-detection doesn't work relialby with these h/w.
+
+This patch adds a flag for indicating the old spec, and fixes the issue
+by checking the pin-detection explicitly for such hardware.
+
+Tested-by: Wei Ni <wni@nvidia.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/pci/hda/patch_hdmi.c   |   13 +++++++++++++
+ sound/pci/hda/patch_nvhdmi.c |    3 +++
+ 2 files changed, 16 insertions(+)
+
+--- a/sound/pci/hda/patch_hdmi.c
++++ b/sound/pci/hda/patch_hdmi.c
+@@ -52,6 +52,10 @@ struct hdmi_spec {
+        */
+       struct hda_multi_out multiout;
+       unsigned int codec_type;
++
++      /* misc flags */
++      /* PD bit indicates only the update, not the current state */
++      unsigned int old_pin_detect:1;
+ };
+@@ -616,6 +620,9 @@ static void hdmi_setup_audio_infoframe(s
+  * Unsolicited events
+  */
++static void hdmi_present_sense(struct hda_codec *codec, hda_nid_t pin_nid,
++                             struct hdmi_eld *eld);
++
+ static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res)
+ {
+       struct hdmi_spec *spec = codec->spec;
+@@ -632,6 +639,12 @@ static void hdmi_intrinsic_event(struct
+       if (index < 0)
+               return;
++      if (spec->old_pin_detect) {
++              if (pind)
++                      hdmi_present_sense(codec, tag, &spec->sink_eld[index]);
++              pind = spec->sink_eld[index].monitor_present;
++      }
++
+       spec->sink_eld[index].monitor_present = pind;
+       spec->sink_eld[index].eld_valid = eldv;
+--- a/sound/pci/hda/patch_nvhdmi.c
++++ b/sound/pci/hda/patch_nvhdmi.c
+@@ -478,6 +478,7 @@ static int patch_nvhdmi_8ch_89(struct hd
+       codec->spec = spec;
+       spec->codec_type = HDA_CODEC_NVIDIA_MCP89;
++      spec->old_pin_detect = 1;
+       if (hdmi_parse_codec(codec) < 0) {
+               codec->spec = NULL;
+@@ -508,6 +509,7 @@ static int patch_nvhdmi_8ch_7x(struct hd
+       spec->multiout.max_channels = 8;
+       spec->multiout.dig_out_nid = nvhdmi_master_con_nid_7x;
+       spec->codec_type = HDA_CODEC_NVIDIA_MCP7X;
++      spec->old_pin_detect = 1;
+       codec->patch_ops = nvhdmi_patch_ops_8ch_7x;
+@@ -528,6 +530,7 @@ static int patch_nvhdmi_2ch(struct hda_c
+       spec->multiout.max_channels = 2;
+       spec->multiout.dig_out_nid = nvhdmi_master_con_nid_7x;
+       spec->codec_type = HDA_CODEC_NVIDIA_MCP7X;
++      spec->old_pin_detect = 1;
+       codec->patch_ops = nvhdmi_patch_ops_2ch;
index 6ebaa5c7363352b1279f80dacc8342b1ccc4448b..2d01f239b3ff9be7944faadaabc5b273770262d1 100644 (file)
@@ -201,3 +201,4 @@ ath5k-initialize-ah-ah_current_channel.patch
 input-rx51-keymap-fix-recent-compile-breakage.patch
 ocfs2-make-xattr-extension-work-with-new-local-alloc-reservation.patch
 acpi-processor-fix-processor_physically_present-on-up.patch
+alsa-hda-fix-pin-detection-of-nvidia-hdmi.patch