Sharkbay HDMI audio bug fix

Bug #1095242 reported by David Henningsson on 2013-01-02
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
High
David Henningsson
Quantal
High
David Henningsson

Bug Description

We're being advised by Intel to include the following patch for the Quantal kernel, to fix a Haswell/Sharkbay HDMI/DP audio issue. As there are no sharkbay machines out there yet, and the patch contains a "if codec->vendor_id == 80862807" I assume this will cause no regressions.

The commit is already in the 3.8 kernel, so this is just for the 3.5 SRU.

commit 6ffe168f822cf7f777987cddc00ade542fd73bf0
Author: Mengdong Lin <email address hidden>
Date: Tue Dec 18 16:59:15 2012 -0500

    ALSA: hda - bug fix for invalid connection list of Haswell HDMI codec pins

From: Mengdong Lin <email address hidden>

Haswell HDMI codec pins may report invalid connection list entries, which
will cause failure to play audio via HDMI or Display Port.

So this patch adds fixup for Haswell to workaround this hardware issue:
enable DP1.2 mode and override the pins' connection list entries with proper
value.

Signed-off-by: Mengdong Lin <email address hidden>
Signed-off-by: Xingchao Wang <email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>
(cherry picked from commit 6ffe168f822cf7f777987cddc00ade542fd73bf0)

BugLink: https://bugs.launchpad.net/bugs/1095242
Signed-off-by: David Henningsson <email address hidden>
---

We're being advised by Intel to include the following patch for the Quantal kernel, to fix a Haswell/Sharkbay HDMI/DP audio issue. As there are no sharkbay machines out there yet, and the patch contains a "if codec->vendor_id == 80862807" I assume this will cause no regressions.

The commit is already in the 3.8 kernel, so this is just for the 3.5 SRU.

 sound/pci/hda/patch_hdmi.c | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index dc249b2..a7e4da4 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1323,6 +1323,30 @@ static const struct hda_codec_ops generic_hdmi_patch_ops = {
  .unsol_event = hdmi_unsol_event,
 };

+static void intel_haswell_fixup_connect_list(struct hda_codec *codec)
+{
+ unsigned int vendor_param;
+ hda_nid_t list[3] = {0x2, 0x3, 0x4};
+
+ vendor_param = snd_hda_codec_read(codec, 0x08, 0, 0xf81, 0);
+ if (vendor_param == -1 || vendor_param & 0x02)
+ return;
+
+ /* enable DP1.2 mode */
+ vendor_param |= 0x02;
+ snd_hda_codec_read(codec, 0x08, 0, 0x781, vendor_param);
+
+ vendor_param = snd_hda_codec_read(codec, 0x08, 0, 0xf81, 0);
+ if (vendor_param == -1 || !(vendor_param & 0x02))
+ return;
+
+ /* override 3 pins connection list */
+ snd_hda_override_conn_list(codec, 0x05, 3, list);
+ snd_hda_override_conn_list(codec, 0x06, 3, list);
+ snd_hda_override_conn_list(codec, 0x07, 3, list);
+}
+
+
 static int patch_generic_hdmi(struct hda_codec *codec)
 {
  struct hdmi_spec *spec;
@@ -1332,6 +1356,10 @@ static int patch_generic_hdmi(struct hda_codec *codec)
   return -ENOMEM;

  codec->spec = spec;
+
+ if (codec->vendor_id == 0x80862807)
+ intel_haswell_fixup_connect_list(codec);
+
  if (hdmi_parse_codec(codec) < 0) {
   codec->spec = NULL;
   kfree(spec);
--
1.7.9.5

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1095242

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
David Henningsson (diwic) wrote :

I don't have the hardware, so can't give logs.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed

On Wed, Jan 02, 2013 at 10:17:35AM +0100, David Henningsson wrote:
> From: Mengdong Lin <email address hidden>
>
> Haswell HDMI codec pins may report invalid connection list entries, which
> will cause failure to play audio via HDMI or Display Port.
>
> So this patch adds fixup for Haswell to workaround this hardware issue:
> enable DP1.2 mode and override the pins' connection list entries with proper
> value.
>
> Signed-off-by: Mengdong Lin <email address hidden>
> Signed-off-by: Xingchao Wang <email address hidden>
> Signed-off-by: Takashi Iwai <email address hidden>
> (cherry picked from commit 6ffe168f822cf7f777987cddc00ade542fd73bf0)
>
> BugLink: https://bugs.launchpad.net/bugs/1095242
> Signed-off-by: David Henningsson <email address hidden>
> ---
>
> We're being advised by Intel to include the following patch for the Quantal kernel, to fix a Haswell/Sharkbay HDMI/DP audio issue. As there are no sharkbay machines out there yet, and the patch contains a "if codec->vendor_id == 80862807" I assume this will cause no regressions.
>
> The commit is already in the 3.8 kernel, so this is just for the 3.5 SRU.
>
> sound/pci/hda/patch_hdmi.c | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
> index dc249b2..a7e4da4 100644
> --- a/sound/pci/hda/patch_hdmi.c
> +++ b/sound/pci/hda/patch_hdmi.c
> @@ -1323,6 +1323,30 @@ static const struct hda_codec_ops generic_hdmi_patch_ops = {
> .unsol_event = hdmi_unsol_event,
> };
>
> +static void intel_haswell_fixup_connect_list(struct hda_codec *codec)
> +{
> + unsigned int vendor_param;
> + hda_nid_t list[3] = {0x2, 0x3, 0x4};
> +
> + vendor_param = snd_hda_codec_read(codec, 0x08, 0, 0xf81, 0);
> + if (vendor_param == -1 || vendor_param & 0x02)
> + return;
> +
> + /* enable DP1.2 mode */
> + vendor_param |= 0x02;
> + snd_hda_codec_read(codec, 0x08, 0, 0x781, vendor_param);
> +
> + vendor_param = snd_hda_codec_read(codec, 0x08, 0, 0xf81, 0);
> + if (vendor_param == -1 || !(vendor_param & 0x02))
> + return;
> +
> + /* override 3 pins connection list */
> + snd_hda_override_conn_list(codec, 0x05, 3, list);
> + snd_hda_override_conn_list(codec, 0x06, 3, list);
> + snd_hda_override_conn_list(codec, 0x07, 3, list);
> +}
> +
> +
> static int patch_generic_hdmi(struct hda_codec *codec)
> {
> struct hdmi_spec *spec;
> @@ -1332,6 +1356,10 @@ static int patch_generic_hdmi(struct hda_codec *codec)
> return -ENOMEM;
>
> codec->spec = spec;
> +
> + if (codec->vendor_id == 0x80862807)
> + intel_haswell_fixup_connect_list(codec);
> +
> if (hdmi_parse_codec(codec) < 0) {
> codec->spec = NULL;
> kfree(spec);

Seems to be already upstream, highly machine specific, and recommended by the manufacturer,
therefore:

Acked-by: Andy Whitcroft <email address hidden>

-apw

Changed in linux (Ubuntu Quantal):
status: New → Fix Committed

Applied to Quantal.

-apw

Changed in linux (Ubuntu):
status: Confirmed → Fix Committed
Luis Henriques (henrix) wrote :

This bug is awaiting verification that the kernel for Quantal in -proposed solves the problem (3.5.0-22.33). Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-quantal' to 'verification-done-quantal'.

If verification is not done by one week from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-quantal
XiongZhang (xiong-y-zhang) wrote :

we have tested proposed kernel (3.5.0-22.34) on haswell machine. HDMI audio works fine.

tags: added: verification-done-quantal
removed: verification-needed-quantal

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :
Download full text (21.3 KiB)

This bug was fixed in the package linux - 3.5.0-22.34

---------------
linux (3.5.0-22.34) quantal-proposed; urgency=low

  [Luis Henriques]

  * Release Tracking Bug
    - LP: #1097343

  [ Chris J Arges ]

  * Revert "SAUCE: fsnotify: dont put marks on temporary list when clearing
    marks by group"
    - LP: #1096137
  * Revert "SAUCE: fsnotify: introduce locked versions of
    fsnotify_add_mark() and fsnotify_remove_mark()"
    - LP: #1096137
  * Revert "SAUCE: fsnotify: pass group to fsnotify_destroy_mark()"
    - LP: #1096137
  * Revert "SAUCE: fsnotify: use a mutex instead of a spinlock to protect a
    groups mark list"
    - LP: #1096137
  * Revert "SAUCE: fanotify: add an extra flag to mark_remove_from_mask
    that indicates wheather a mark should be destroyed"
    - LP: #1096137
  * Revert "SAUCE: fsnotify: take groups mark_lock before mark lock"
    - LP: #1096137
  * Revert "SAUCE: fsnotify: use reference counting for groups"
    - LP: #1096137
  * Revert "SAUCE: fsnotify: introduce fsnotify_get_group()"
    - LP: #1096137

  [ Upstream Kernel Changes ]

  * fsnotify: introduce fsnotify_get_group()
    - LP: #1096137
  * fsnotify: use reference counting for groups
    - LP: #1096137
  * fsnotify: take groups mark_lock before mark lock
    - LP: #1096137
  * fanotify: add an extra flag to mark_remove_from_mask that indicates
    wheather a mark should be destroyed
    - LP: #1096137
  * fsnotify: use a mutex instead of a spinlock to protect a groups mark
    list
    - LP: #1096137
  * fsnotify: pass group to fsnotify_destroy_mark()
    - LP: #1096137
  * fsnotify: introduce locked versions of fsnotify_add_mark() and
    fsnotify_remove_mark()
    - LP: #1096137
  * fsnotify: dont put marks on temporary list when clearing marks by group
    - LP: #1096137
  * fsnotify: change locking order
    - LP: #1096137

linux (3.5.0-22.33) quantal-proposed; urgency=low

  [Brad Figg]

  * Release Tracking Bug
    - LP: #1095349

  [ Chris J Arges ]

  * SAUCE: add eeprom_bad_csum_allow module parameter
    - LP: #1070182

  [ Colin Ian King ]

  * SAUCE: samsung-laptop: disable in UEFI mode
    - LP: #1040557

  [ Kees Cook ]

  * SAUCE: exec: do not leave bprm->interp on stack
    - LP: #1068888
    - CVE-2012-4530

  [ Leann Ogasawara ]

  * Add ceph to linux-image for virtual instances
    - LP: #1063784

  [ Lino Sanfilippo ]

  * SAUCE: fsnotify: introduce fsnotify_get_group()
    - LP: #922906
  * SAUCE: fsnotify: use reference counting for groups
    - LP: #922906
  * SAUCE: fsnotify: take groups mark_lock before mark lock
    - LP: #922906
  * SAUCE: fanotify: add an extra flag to mark_remove_from_mask that
    indicates wheather a mark should be destroyed
    - LP: #922906
  * SAUCE: fsnotify: use a mutex instead of a spinlock to protect a groups
    mark list
    - LP: #922906
  * SAUCE: fsnotify: pass group to fsnotify_destroy_mark()
    - LP: #922906
  * SAUCE: fsnotify: introduce locked versions of fsnotify_add_mark() and
    fsnotify_remove_mark()
    - LP: #922906
  * SAUCE: fsnotify: dont put marks on temporary list when clearing marks
    by group
    - LP: #922906

  [ Tomas Hozza ]

  * SAUCE: tools: hv: Netlink source a...

Changed in linux (Ubuntu Quantal):
status: Fix Committed → Fix Released
Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
Chris Van Hoof (vanhoof) on 2013-01-24
tags: added: blocks-hwcert-enablement
Changed in linux (Ubuntu Quantal):
importance: Undecided → High
Changed in linux (Ubuntu):
importance: Undecided → High
assignee: nobody → David Henningsson (diwic)
Changed in linux (Ubuntu Quantal):
assignee: nobody → David Henningsson (diwic)
milestone: none → quantal-updates
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers