alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: David Henningsson <david.henningsson@canonical.com>
To: tiwai@suse.de, alsa-devel@alsa-project.org
Cc: David Henningsson <david.henningsson@canonical.com>
Subject: [PATCH 1/5] hda-spec: Add fixups for Haswell/Broadwell HDMI
Date: Mon, 22 Sep 2014 13:09:02 +0200	[thread overview]
Message-ID: <1411384146-23286-2-git-send-email-david.henningsson@canonical.com> (raw)
In-Reply-To: <1411384146-23286-1-git-send-email-david.henningsson@canonical.com>

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---
 hda-spec.c | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/hda-spec.c b/hda-spec.c
index 58dd87a..0ff0388 100644
--- a/hda-spec.c
+++ b/hda-spec.c
@@ -271,6 +271,12 @@ static struct xhda_verb_table nvhdmi_8ch_7x_verbs[] = {
 	{ } /* terminator */
 };
 
+static struct xhda_verb_table haswellhdmi_verbs[] = {
+	{ 0x781, set_cached_verb, "intelhdmi_set_vendor_verb" },
+	{ 0xf81, get_cached_verb, "intelhdmi_get_vendor_verb" },
+	{ } /* terminator */
+};
+
 /*
  */
 
@@ -445,6 +451,10 @@ static struct verb_ext_list extensions[] = {
 	{ .id = 0x10de0006, .verbs = nvhdmi_8ch_7x_verbs },
 	{ .id = 0x10de0007, .verbs = nvhdmi_8ch_7x_verbs },
 
+	/* Haswell/Broadwell HDMI */
+	{ .id = 0x80862807, .verbs = haswellhdmi_verbs },
+	{ .id = 0x80862808, .verbs = haswellhdmi_verbs },
+
 	{ }
 };
 
@@ -565,6 +575,35 @@ static void fixup_alc268_beep(struct xhda_codec *codec)
 	node->amp_in_caps.override = 1;
 }
 
+static void fixup_haswellhdmi(struct xhda_codec *codec)
+{
+	struct xhda_node *node;
+
+	/* Haswell can run in two modes: either with one cvt 0x2 and one pin 0x3,
+	   or three cvts 0x2, 0x3, 0x4 and three pins 0x5, 0x6, 0x7.
+	   But the connection can be broken in either case. */
+
+	if (find_node(codec, 0x05)) {
+		int nid;
+		for (nid = 0x05; nid <= 0x07; nid++) {
+			node = find_node(codec, nid);
+			if (node) {
+				node->num_nodes = 3;
+				node->node[0] = 0x2;
+				node->node[1] = 0x3;
+				node->node[2] = 0x4;
+			}
+		}
+	}
+	else {
+		node = find_node(codec, 0x03);
+		if (node) {
+			node->num_nodes = 1;
+			node->node[0] = 0x2;
+		}
+	}
+}
+
 struct fixup_list {
 	unsigned int vendor_id;
 	void (*func)(struct xhda_codec *);
@@ -603,6 +642,9 @@ static struct fixup_list fixups[] = {
 	{ 0x11064761, fixup_vt3476 },
 	{ 0x11064762, fixup_vt3476 },
 
+	{ 0x80862807, fixup_haswellhdmi },
+	{ 0x80862808, fixup_haswellhdmi },
+
 	{ }
 };
 
-- 
1.9.1

  reply	other threads:[~2014-09-22 11:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-22 11:09 [PATCH 0/5] hda-emu: Add more stuff in hda-spec David Henningsson
2014-09-22 11:09 ` David Henningsson [this message]
2014-09-22 11:09 ` [PATCH 2/5] hda-spec: Add access to secret node 0x8 for Haswell/Broadwell HDMI David Henningsson
2014-09-22 11:09 ` [PATCH 3/5] hda-spec: Add more secret nodes for Realtek codecs David Henningsson
2014-09-22 11:09 ` [PATCH 4/5] hda-spec: Add secret eq verbs for IDT David Henningsson
2014-09-22 11:09 ` [PATCH 5/5] hda-spec: Add IDT 92HD95 to IDT verb codec list David Henningsson
2014-09-22 12:51 ` [PATCH 0/5] hda-emu: Add more stuff in hda-spec Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1411384146-23286-2-git-send-email-david.henningsson@canonical.com \
    --to=david.henningsson@canonical.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).