From patchwork Tue Feb 28 20:17:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Drake X-Patchwork-Id: 9596697 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 0C80660429 for ; Tue, 28 Feb 2017 20:18:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F398B2851D for ; Tue, 28 Feb 2017 20:18:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E8B462853E; Tue, 28 Feb 2017 20:18:03 +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 26BCC2851D for ; Tue, 28 Feb 2017 20:18:03 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 4F8B3266E37; Tue, 28 Feb 2017 21:17:31 +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 70EE1266E38; Tue, 28 Feb 2017 21:17:30 +0100 (CET) Received: from mail-ua0-f169.google.com (mail-ua0-f169.google.com [209.85.217.169]) by alsa0.perex.cz (Postfix) with ESMTP id 507E3266D30 for ; Tue, 28 Feb 2017 21:17:26 +0100 (CET) Received: by mail-ua0-f169.google.com with SMTP id f54so26593158uaa.1 for ; Tue, 28 Feb 2017 12:17:25 -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 :mime-version:content-transfer-encoding; bh=hJUi8vHO3w8UAuk9A66/FzZ0+zHnU89Dt+EenPrCmg4=; b=n9hzt1xEhT6vt8rJrm5FkLOd1X4LWK5AImfkbgHwFzeTy7SjTFLSwaS6Nwg0orRSKY oD7spF37I0tIcWjgEQfeOxsHsxb5ad5GNV5Bg4ZHw8/xv3RLKWFilqAudBhi8Nomt0Je F/fGxmmIbrrrA4MaN46+kaSZpDcoTNhdcnbk/fUxgAiZ8HCKHJ/ZilnVi2GRtbs792iw seRTldDtb3UZiDeQTRh59IjiAAA5Ii8Dy21vL9hmi3No/Nl3aNWkbs3bWI3h/QlbDEV5 bWKq86W2Nd+h9puvZSCUmrbsjImDxcmILpyanJmkQAmcY39gQ+FWu2v10LruSel2E+YF I9ww== 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:mime-version:content-transfer-encoding; bh=hJUi8vHO3w8UAuk9A66/FzZ0+zHnU89Dt+EenPrCmg4=; b=Jcnftvl3QBR25h4xdoeczoIsD7p78belkUGX3Q232Rtgnlm7t9AhOJPAEev1pfcqpu KpaPWM9ImgFb597hRgdV+shpPoaYB56rL0wNk0iORrW93NAy5hVzuR+Inr9Hl8hev44t e5M0p4l4VvyH8cqbgdID76veZ46qANpm3W5x9VwmyJbWrgDupiosIoabe9axIFjTpUdr vgIWRj72IA9Lkw9aIbwDz3gtuaE8KTXpBbOyogI1xBlPbu8iF5H9UPNOKS2Nn/sToa38 fNwBp4QfRyF54NzjpMXAmuegHqMr1ww5T7qUsp8z68sbOVI+T/fw/gdO6HMjciJa+yLl U5ig== X-Gm-Message-State: AMke39n7tc4tgVtLdGYS2bHuwyTGChNgeeQM2nyyLyJvoeaxe0XTm56dZozMl1zBY6yfKwz1 X-Received: by 10.176.81.228 with SMTP id h33mr2120409uaa.70.1488313045348; Tue, 28 Feb 2017 12:17:25 -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.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Feb 2017 12:17:24 -0800 (PST) From: Daniel Drake To: perex@perex.cz, tiwai@suse.com Date: Tue, 28 Feb 2017 14:17:13 -0600 Message-Id: <20170228201715.7862-3-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> MIME-Version: 1.0 Cc: linux@endlessm.com, alsa-devel@alsa-project.org, chiu@endlessm.com Subject: [alsa-devel] [PATCH 3/5] ALSA: hda/realtek - Fix headset and mic on several Asus laptops with ALC256 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Chris Chiu Enable jack sensing and fix internal mic and headset mic on Asus X555UB and X540SA. Fix internal mic and headset mic on Asus E402NA and E403NA. Fix headset mic on Asus X541UV, X541SA and Z550SA. Unfortunately jack sensing for the headset mic is still not working. We believe this is a codec limitation. Some of these quirks were authored by João Paulo Rechi Vita. Signed-off-by: Chris Chiu Signed-off-by: Daniel Drake --- sound/pci/hda/patch_realtek.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 1bbd4d8..101b14f 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4872,6 +4872,8 @@ enum { ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER, ALC269_FIXUP_ATIV_BOOK_8, ALC221_FIXUP_HP_MIC_NO_PRESENCE, + ALC256_FIXUP_ASUS_HEADSET_MODE, + ALC256_FIXUP_ASUS_MIC, }; static const struct hda_fixup alc269_fixups[] = { @@ -5578,6 +5580,20 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC269_FIXUP_HEADSET_MODE }, + [ALC256_FIXUP_ASUS_HEADSET_MODE] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc_fixup_headset_mode, + }, + [ALC256_FIXUP_ASUS_MIC] = { + .type = HDA_FIXUP_PINS, + .v.pins = (const struct hda_pintbl[]) { + { 0x13, 0x90a60160 }, /* use as internal mic */ + { 0x19, 0x04a11120 }, /* use as headset mic, without its own jack detect */ + { } + }, + .chained = true, + .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE + }, }; static const struct snd_pci_quirk alc269_fixup_tbl[] = { @@ -5690,9 +5706,14 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x103c, 0x8256, "HP", ALC221_FIXUP_HP_FRONT_MIC), SND_PCI_QUIRK(0x103c, 0x82bf, "HP", ALC221_FIXUP_HP_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x103c, 0x82c0, "HP", ALC221_FIXUP_HP_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), + SND_PCI_QUIRK(0x1043, 0x10c0, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), + SND_PCI_QUIRK(0x1043, 0x12f0, "ASUS X541UV", ALC256_FIXUP_ASUS_MIC), + SND_PCI_QUIRK(0x1043, 0x12e0, "ASUS X541SA", ALC256_FIXUP_ASUS_MIC), + SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC), SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK), SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A), SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), @@ -5702,6 +5723,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1043, 0x10d0, "ASUS X540LA/X540LJ", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1043, 0x11c0, "ASUS X556UR", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC), 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), @@ -6007,6 +6029,14 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { {0x21, 0x02211020}), SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, ALC256_STANDARD_PINS), + SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC, + {0x14, 0x90170110}, + {0x1b, 0x90a70130}, + {0x21, 0x04211020}), + SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC256_FIXUP_ASUS_MIC, + {0x14, 0x90170110}, + {0x1b, 0x90a70130}, + {0x21, 0x03211020}), SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4, {0x12, 0x90a60130}, {0x14, 0x90170110},