From patchwork Tue Feb 28 20:17:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Drake X-Patchwork-Id: 9596701 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 46C0960429 for ; Tue, 28 Feb 2017 20:18:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39AF028587 for ; Tue, 28 Feb 2017 20:18:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E83E28585; Tue, 28 Feb 2017 20:18:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6358B28593 for ; Tue, 28 Feb 2017 20:18:37 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 575C3266EC1; Tue, 28 Feb 2017 21:17:37 +0100 (CET) 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 928B6266ED0; Tue, 28 Feb 2017 21:17:36 +0100 (CET) Received: from mail-ua0-f174.google.com (mail-ua0-f174.google.com [209.85.217.174]) by alsa0.perex.cz (Postfix) with ESMTP id 69CAC266D1F for ; Tue, 28 Feb 2017 21:17:31 +0100 (CET) Received: by mail-ua0-f174.google.com with SMTP id 40so26753196uau.2 for ; Tue, 28 Feb 2017 12:17:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=endlessm-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=muGzUI0FlKxXoF/qk+Dszl0ApqAtvpGGsUIOCxQ0rO8=; b=0dvDrwTpkNB42sWS6+pOPHpQZtf+dBs+QpPWjlO7tuSED/ug8AXEFEoW61kelk4hIX y1+A3jLT/y11581oid5iWNatKcYTkxpTgBqC5WeXvNdLgcU/0ISFPc7ORJRHIX1Rzj35 6yFPAdG0fsJlH15iu/wAN3BPC7OUau+aIFRKT1vZbXt7RgzwIn/pib4eYgYjap1SYXmR VrjdviLle386tjLuyXP6NHFzEEXKFeOnbK/AEFA0pbHcfODkYUyE2DOGz1w5iWpn6XDb d/QXzdDKTDzmCYl16ZobZEe1dv3AgrmUcVrxrslRWojl4bEtzqqx1Fm9vyUNReGcb5o6 1zkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=muGzUI0FlKxXoF/qk+Dszl0ApqAtvpGGsUIOCxQ0rO8=; b=S5gtglU0Q6MEY5YIQ+mOOu/1mxqh7Y7Xi5b+T8d62WQEMm2HOQLmpLz2ZbfY5o/B6r IY/8y81YOt2pFT+9bLis+Q8OVxjwowZHSggT1ax0jDZGhVHBL8gMfV85O1c6VFE/TML6 dwrx7xZzYqYWuZkUH+NvIfpKNS3I52biUkNO1VGEsHp/rVrZW8HgPsvQlrDhhrhc82G9 5gVvGXloD0lLhN09+gTxIp67SmZr7Q2DYJo7pAgtW3CZb/HX8Wnc1hQhD1puu8C/gI/r yGABrUctmvPhWocV77SvvXemmErJx3dW6lDGTJkE4QhoLbwVucPcgjAozij3WnnvCfoM OI+Q== X-Gm-Message-State: AMke39m0ZaShnLfc2GSv1Z7XwzS9rpvUaaLzcyVytkEYRtDBf2SUH4fwV837M33jFrHYlwL+ X-Received: by 10.31.109.71 with SMTP id i68mr1991433vkc.89.1488313048465; Tue, 28 Feb 2017 12:17:28 -0800 (PST) Received: from nuc.gallo.pinto ([186.77.198.234]) by smtp.gmail.com with ESMTPSA id a91sm651289uaa.2.2017.02.28.12.17.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Feb 2017 12:17:27 -0800 (PST) From: Daniel Drake To: perex@perex.cz, tiwai@suse.com Date: Tue, 28 Feb 2017 14:17:15 -0600 Message-Id: <20170228201715.7862-5-drake@endlessm.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170228201715.7862-1-drake@endlessm.com> References: <20170228201715.7862-1-drake@endlessm.com> Cc: linux@endlessm.com, alsa-devel@alsa-project.org, chiu@endlessm.com Subject: [alsa-devel] [PATCH 5/5] ALSA: hda/realtek - Fix speaker support for Asus AiO ZN270IE 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 From: Chris Chiu Asus AiO ZN270IE with ALC256 has no audio ouput for internal speaker and headphone. It requires GPIO 2 as an amp. This commit enables the GPIO and pulls it high. Signed-off-by: Chris Chiu Signed-off-by: Daniel Drake --- sound/pci/hda/patch_realtek.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 1158d2a..b35dcd4 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4874,6 +4874,7 @@ enum { ALC221_FIXUP_HP_MIC_NO_PRESENCE, ALC256_FIXUP_ASUS_HEADSET_MODE, ALC256_FIXUP_ASUS_MIC, + ALC256_FIXUP_ASUS_AIO_GPIO2, ALC233_FIXUP_ASUS_MIC_NO_PRESENCE, ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE, }; @@ -5596,6 +5597,16 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE }, + [ALC256_FIXUP_ASUS_AIO_GPIO2] = { + .type = HDA_FIXUP_VERBS, + .v.verbs = (const struct hda_verb[]) { + /* Set up GPIO2 for the speaker amp */ + { 0x01, AC_VERB_SET_GPIO_MASK, 0x04 }, + { 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x04 }, + { 0x01, AC_VERB_SET_GPIO_DATA, 0x04 }, + {} + }, + }, [ALC233_FIXUP_ASUS_MIC_NO_PRESENCE] = { .type = HDA_FIXUP_PINS, .v.pins = (const struct hda_pintbl[]) { @@ -5748,6 +5759,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x1043, 0x1290, "ASUS X441SA", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1043, 0x12a0, "ASUS X441UV", ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC), + SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2), SND_PCI_QUIRK(0x1043, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC), SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC), SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC),