From patchwork Tue Feb 28 20:17:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Drake X-Patchwork-Id: 9596699 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 958BA60429 for ; Tue, 28 Feb 2017 20:18:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 865FF2851D for ; Tue, 28 Feb 2017 20:18:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B59128541; Tue, 28 Feb 2017 20:18:21 +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 BCC0928516 for ; Tue, 28 Feb 2017 20:18:20 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id C1263266D57; Tue, 28 Feb 2017 21:17:35 +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 EA1A4266EC7; Tue, 28 Feb 2017 21:17:33 +0100 (CET) Received: from mail-ua0-f172.google.com (mail-ua0-f172.google.com [209.85.217.172]) by alsa0.perex.cz (Postfix) with ESMTP id D77A6266718 for ; Tue, 28 Feb 2017 21:17:27 +0100 (CET) Received: by mail-ua0-f172.google.com with SMTP id 40so26752407uau.2 for ; Tue, 28 Feb 2017 12:17:27 -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=fuY6nhKEEFKj/d/N1Ion7/xOAy7SWwYm9fR2/sqfmjs=; b=0GSd+Xr67nedPz4462hVPzYpCBlOOVJGDirTEqwzuizk6ncJ/SgEKJ+SQyCTGT+6iT l8shAzDcv1zxMyJR3T3fwdAQrzOXrxx8RRJjdNyeVqzw0mIcCQAvRMwCfARZqSah1ZqC bledLY23fSjRPTFNUBGhUoBH7BjCz52BZwpEb0dgkxsHseuKh0jxSLeq50JTM6wOYyEw oLeUB/vBzPpQ0U/6xH2jLeDyq3JyhlE/JATXpIGviOJ6cVpG4Q2jhCkYR9hZA8tt+6NU 0zNcFX5lVCXcHhY6Xr1uNXvRG4RUa/whDjNYfiudHBN66xkdE+gFmTtsqovKCUY/DwyQ 2XWA== 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=fuY6nhKEEFKj/d/N1Ion7/xOAy7SWwYm9fR2/sqfmjs=; b=dPv61HNNKtjZIdS2kpbQUQCA3t0dURTiweeYV4sAvIG0mM712QqzD7/lqZ2zmlzJU/ pE1JPSI26PpQv+F4TmkwBby05A+9KLLBHxTPoVniy2y9Aa8GnynnJMrKo6IlYBc/QaTK UUJv6PbZbYud+g1zc2GoCXv7aPQDzAQhEAs7zzIDYn9o/b3m7N2y4mD+DaZcNNrHvOmi HavmPdkAfjzNKt85qHVaWpFaCP98vNWJA/vqBKJuSCRA2NqKAMEe7iHwIp7LHm8I+bmi Dy//QODTSFyFUc3ZLPQAgx+JzKT15xdxVfWXJGulhquJpbFOXfCzLVA54K8n7D4dQvWW e5mw== X-Gm-Message-State: AMke39ksgWnNSakjnz08PWk4s7tyvDs6s1Fl7fkfItiXt0souzcgRmCP6dHMDODEx6gaft2f X-Received: by 10.31.120.8 with SMTP id t8mr1930123vkc.150.1488313046882; Tue, 28 Feb 2017 12:17:26 -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.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Feb 2017 12:17:26 -0800 (PST) From: Daniel Drake To: perex@perex.cz, tiwai@suse.com Date: Tue, 28 Feb 2017 14:17:14 -0600 Message-Id: <20170228201715.7862-4-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 4/5] ALSA: hda/realtek - Fix headset mic and speaker on Asus X441SA/X441UV 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 X441SA and X441UV laptops with ALC3236 (ALC223) codec require the known fixup (ALC269_FIXUP_HEADSET_MIC) and a different pin value on pin 0x19 to make the headset mic work. To make the speaker work, it requires an EAPD verb fixup. Signed-off-by: Chris Chiu Signed-off-by: Daniel Drake --- sound/pci/hda/patch_realtek.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 101b14f..1158d2a 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4874,6 +4874,8 @@ enum { ALC221_FIXUP_HP_MIC_NO_PRESENCE, ALC256_FIXUP_ASUS_HEADSET_MODE, ALC256_FIXUP_ASUS_MIC, + ALC233_FIXUP_ASUS_MIC_NO_PRESENCE, + ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE, }; static const struct hda_fixup alc269_fixups[] = { @@ -5594,6 +5596,26 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE }, + [ALC233_FIXUP_ASUS_MIC_NO_PRESENCE] = { + .type = HDA_FIXUP_PINS, + .v.pins = (const struct hda_pintbl[]) { + { 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */ + { } + }, + .chained = true, + .chain_id = ALC269_FIXUP_HEADSET_MIC + }, + [ALC233_FIXUP_EAPD_COEF_AND_MIC_NO_PRESENCE] = { + .type = HDA_FIXUP_VERBS, + .v.verbs = (const struct hda_verb[]) { + /* Enables internal speaker */ + {0x20, AC_VERB_SET_COEF_INDEX, 0x40}, + {0x20, AC_VERB_SET_PROC_COEF, 0x8800}, + {} + }, + .chained = true, + .chain_id = ALC233_FIXUP_ASUS_MIC_NO_PRESENCE + }, }; static const struct snd_pci_quirk alc269_fixup_tbl[] = { @@ -5723,6 +5745,8 @@ 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, 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, 0x831a, "ASUS P901", ALC269_FIXUP_STEREO_DMIC), SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC),