From patchwork Mon Sep 22 11:09:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Henningsson X-Patchwork-Id: 4947261 X-Patchwork-Delegate: tiwai@suse.de Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AFB899F32F for ; Mon, 22 Sep 2014 11:10:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1BB6B2021A for ; Mon, 22 Sep 2014 11:10:01 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 92EA92018E for ; Mon, 22 Sep 2014 11:09:59 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 9DD662654C1; Mon, 22 Sep 2014 13:09:58 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 8EA002652C3; Mon, 22 Sep 2014 13:09:21 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 8692A2652E3; Mon, 22 Sep 2014 13:09:18 +0200 (CEST) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by alsa0.perex.cz (Postfix) with ESMTP id 97D7D265262 for ; Mon, 22 Sep 2014 13:09:10 +0200 (CEST) Received: from hd9483857.selulk5.dyn.perspektivbredband.net ([217.72.56.87] helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1XW1UU-0001Oq-BM; Mon, 22 Sep 2014 11:09:10 +0000 From: David Henningsson To: tiwai@suse.de, alsa-devel@alsa-project.org Date: Mon, 22 Sep 2014 13:09:02 +0200 Message-Id: <1411384146-23286-2-git-send-email-david.henningsson@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1411384146-23286-1-git-send-email-david.henningsson@canonical.com> References: <1411384146-23286-1-git-send-email-david.henningsson@canonical.com> Cc: David Henningsson Subject: [alsa-devel] [PATCH 1/5] hda-spec: Add fixups for Haswell/Broadwell HDMI X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: David Henningsson --- 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 }, + { } };