From patchwork Thu Feb 21 16:44:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seth Forshee X-Patchwork-Id: 1046276 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4450gT2zn3z9s8m; Fri, 22 Feb 2019 03:44:37 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1gwrSa-0003ym-Vo; Thu, 21 Feb 2019 16:44:32 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1gwrSZ-0003yL-KR for kernel-team@lists.ubuntu.com; Thu, 21 Feb 2019 16:44:31 +0000 Received: from mail-wm1-f72.google.com ([209.85.128.72]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1gwrSZ-0007xQ-Cm for kernel-team@lists.ubuntu.com; Thu, 21 Feb 2019 16:44:31 +0000 Received: by mail-wm1-f72.google.com with SMTP id b12so2926915wme.5 for ; Thu, 21 Feb 2019 08:44:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ku9i0omX/ivYRFNGHF1XJ2B/AcdP6QUq5tz8wGj03JQ=; b=Y+8InueUdKUzUt0P4HiRmsHt7HWZCPn2VnQg0La2v/SmcaCI2gwhn0m8ZJHVKTRLYn 2Z6PEHIrid8XEGQ0WSnM7KPLdqqpSYI5yhh7DdzzD44vgWfoJ6SxHIpBbK3qKR5uV7Fb Tz/mv5nvnUhKX48XpBEA/4tulHXsfkgL93R8sMPvnLQNxsgGd8Uznd2J7TyIVZMwsQOA NF0UTZ7kTbZqTzL8B3RvBO5D5qY8pb3fQACEnm8FDB+O+/1WyU/OvQWkLH3X2mga8WZH m1NV8Osv0Bws7x12WnZ46qzCrAeD5gxepPY3GsptLYwHdeaUcq9tpzGXBw8JmCsFmE0A McZA== X-Gm-Message-State: AHQUAuaDW/B3pMLB28UhgJW/VGUy5oUPhDyo8uzXzd26ltZ4eVOrPbMw vnK3hHCeKt/DIoS9fhzjxJGPNMPVv119eTuaueQ/r3WNOnU0ns4vEGARhx11yMh6e0UHJqDI2A1 bwUxQJseBCsH7gZ7lxpDhQt17BOYzpb1+lipZu+FL7g== X-Received: by 2002:adf:c082:: with SMTP id d2mr21795941wrf.55.1550767470687; Thu, 21 Feb 2019 08:44:30 -0800 (PST) X-Google-Smtp-Source: AHgI3IaUPh2MIBzvPqprvs7RURrFX+NAxoi/G3+Gm/bEcCQ+J0GIsdkM4kVa5ZFnu2k/4IVgA89teQ== X-Received: by 2002:adf:c082:: with SMTP id d2mr21795919wrf.55.1550767470348; Thu, 21 Feb 2019 08:44:30 -0800 (PST) Received: from localhost ([194.204.107.10]) by smtp.gmail.com with ESMTPSA id v4sm11023818wme.6.2019.02.21.08.44.29 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Feb 2019 08:44:29 -0800 (PST) From: Seth Forshee To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/2][SRU][B] ALSA: hda/realtek - Headset microphone support for System76 darp5 Date: Thu, 21 Feb 2019 17:44:23 +0100 Message-Id: <20190221164426.17652-2-seth.forshee@canonical.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190221164426.17652-1-seth.forshee@canonical.com> References: <20190221164426.17652-1-seth.forshee@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Jeremy Soller BugLink: https://bugs.launchpad.net/bugs/1815831 On the System76 Darter Pro (darp5), there is a headset microphone input attached to 0x1a that does not have a jack detect. In order to get it working, the pin configuration needs to be set correctly, and the ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC fixup needs to be applied. This is similar to the MIC_NO_PRESENCE fixups for some Dell laptops, except we have a separate microphone jack that is already configured correctly. Signed-off-by: Jeremy Soller Cc: Signed-off-by: Takashi Iwai (backported from commit 89e3a5682edaa4e5bb334719afb180256ac7bf78) [ saf: adjust context ] Signed-off-by: Seth Forshee --- sound/pci/hda/patch_realtek.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index f6f7607c2b16..d2a34f404d6d 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -5526,6 +5526,7 @@ enum { ALC255_FIXUP_DELL_HEADSET_MIC, ALC221_FIXUP_HP_HEADSET_MIC, ALC285_FIXUP_LENOVO_HEADPHONE_NOISE, + ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE, }; static const struct hda_fixup alc269_fixups[] = { @@ -6410,6 +6411,15 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC269_FIXUP_THINKPAD_ACPI }, + [ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE] = { + .type = HDA_FIXUP_PINS, + .v.pins = (const struct hda_pintbl[]) { + { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */ + { } + }, + .chained = true, + .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC + }, }; static const struct snd_pci_quirk alc269_fixup_tbl[] = { @@ -6577,6 +6587,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8), SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC), SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC), + SND_PCI_QUIRK(0x1558, 0x1325, "System76 Darter Pro (darp5)", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS), SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE), SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE), From patchwork Thu Feb 21 16:44:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seth Forshee X-Patchwork-Id: 1046277 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4450gW6WJGz9s8m; Fri, 22 Feb 2019 03:44:39 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1gwrSd-00040R-AD; Thu, 21 Feb 2019 16:44:35 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1gwrSb-0003zf-Jx for kernel-team@lists.ubuntu.com; Thu, 21 Feb 2019 16:44:33 +0000 Received: from mail-wr1-f69.google.com ([209.85.221.69]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1gwrSb-0007xg-Bj for kernel-team@lists.ubuntu.com; Thu, 21 Feb 2019 16:44:33 +0000 Received: by mail-wr1-f69.google.com with SMTP id z13so8960874wrp.5 for ; Thu, 21 Feb 2019 08:44:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NmBznGD8GuWuSX8ya6SIlZPmzc36tvoYE/zlmtVIDtM=; b=SZd9PsmbjbJQM78SJQFLhe6SXZapJoVCX0Jit7ypwbObPUvKfYkRUPz4yLzZH5W4Gc HHw1lTYEj7auhkMWAdiB4Im88mlht2r56vGLqKjNOZp1fUv6IO8lqau3FDpUrGTf4QsF Wvs5ILakjAip0uJiiKH8jx2xWqE0oqAv8X7RsZYckVtDfoTUtqY4D6hDzSpKPWLmscEa AH37oO//v2F3DQbUA2MaTWz1/AcWuWWq7Qp2u5Gb+77moaZc9pV/HEPJICo+RxoCrt7m kpZBIrodbuU+n02e7BUh13SEZSOZ//BZ/hQrV4pm6862RGlMx6n6l9Oxx/2REsvL6zGS TZyA== X-Gm-Message-State: AHQUAublu3bXWWHS/sPDQk1O3bTgTOVQaFPud6gcXJpU91SfR09m82uT us3amnZj79qNpgqjmSBzFKtL7oI0O2PWaEKis/Qv92l2cPtRO47kZTOgMwHezcbvEiwBmfpzQEt Udtyi4nj6XkJbKU/r8doTWDGp7yqjx3RJ+pn7zXxAfw== X-Received: by 2002:a5d:6810:: with SMTP id w16mr29008576wru.62.1550767472637; Thu, 21 Feb 2019 08:44:32 -0800 (PST) X-Google-Smtp-Source: AHgI3IbnoNUMnkFiXN78rhbDijATbt5pLx7EAMuBNuVXSM8WjiCxm7m6F6m4fwAOh4N8AU3nOIPUeQ== X-Received: by 2002:a5d:6810:: with SMTP id w16mr29008546wru.62.1550767472259; Thu, 21 Feb 2019 08:44:32 -0800 (PST) Received: from localhost ([194.204.107.10]) by smtp.gmail.com with ESMTPSA id f68sm16451319wmg.5.2019.02.21.08.44.31 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Feb 2019 08:44:31 -0800 (PST) From: Seth Forshee To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/2][SRU][B] ALSA: hda/realtek - Headset microphone and internal speaker support for System76 oryp5 Date: Thu, 21 Feb 2019 17:44:24 +0100 Message-Id: <20190221164426.17652-3-seth.forshee@canonical.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190221164426.17652-1-seth.forshee@canonical.com> References: <20190221164426.17652-1-seth.forshee@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Jeremy Soller BugLink: https://bugs.launchpad.net/bugs/1815831 On the System76 Oryx Pro (oryp5), there is a headset microphone input attached to 0x19 that does not have a jack detect. In order to get it working, the pin configuration needs to be set correctly, and the ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC fixup needs to be applied. This is similar to the MIC_NO_PRESENCE fixups for some Dell laptops, except we have a separate microphone jack that is already configured correctly. Since the ALC1220 does not have a fixup similar to ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, I have exposed the fixup from the ALC269 in a way that it can be accessed from the alc1220_fixup_system76_oryp5 function. In addition, the alc1220_fixup_clevo_p950 needs to be applied to gain speaker output. Signed-off-by: Jeremy Soller Cc: Signed-off-by: Takashi Iwai (cherry picked from commit 7f665b1c3283aae5b61843136d0a8ee808ba3199 git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git) Signed-off-by: Seth Forshee --- sound/pci/hda/patch_realtek.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index d2a34f404d6d..8624bbebd97c 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1811,6 +1811,8 @@ enum { ALC887_FIXUP_BASS_CHMAP, ALC1220_FIXUP_GB_DUAL_CODECS, ALC1220_FIXUP_CLEVO_P950, + ALC1220_FIXUP_SYSTEM76_ORYP5, + ALC1220_FIXUP_SYSTEM76_ORYP5_PINS, }; static void alc889_fixup_coef(struct hda_codec *codec, @@ -2045,6 +2047,17 @@ static void alc1220_fixup_clevo_p950(struct hda_codec *codec, snd_hda_override_conn_list(codec, 0x1b, 1, conn1); } +static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec, + const struct hda_fixup *fix, int action); + +static void alc1220_fixup_system76_oryp5(struct hda_codec *codec, + const struct hda_fixup *fix, + int action) +{ + alc1220_fixup_clevo_p950(codec, fix, action); + alc_fixup_headset_mode_no_hp_mic(codec, fix, action); +} + static const struct hda_fixup alc882_fixups[] = { [ALC882_FIXUP_ABIT_AW9D_MAX] = { .type = HDA_FIXUP_PINS, @@ -2289,6 +2302,19 @@ static const struct hda_fixup alc882_fixups[] = { .type = HDA_FIXUP_FUNC, .v.func = alc1220_fixup_clevo_p950, }, + [ALC1220_FIXUP_SYSTEM76_ORYP5] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc1220_fixup_system76_oryp5, + }, + [ALC1220_FIXUP_SYSTEM76_ORYP5_PINS] = { + .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 = ALC1220_FIXUP_SYSTEM76_ORYP5, + }, }; static const struct snd_pci_quirk alc882_fixup_tbl[] = { @@ -2365,6 +2391,8 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { SND_PCI_QUIRK(0x1558, 0x9501, "Clevo P950HR", ALC1220_FIXUP_CLEVO_P950), SND_PCI_QUIRK(0x1558, 0x95e1, "Clevo P95xER", ALC1220_FIXUP_CLEVO_P950), SND_PCI_QUIRK(0x1558, 0x95e2, "Clevo P950ER", ALC1220_FIXUP_CLEVO_P950), + SND_PCI_QUIRK(0x1558, 0x96e1, "System76 Oryx Pro (oryp5)", ALC1220_FIXUP_SYSTEM76_ORYP5_PINS), + SND_PCI_QUIRK(0x1558, 0x97e1, "System76 Oryx Pro (oryp5)", ALC1220_FIXUP_SYSTEM76_ORYP5_PINS), SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD), SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD), SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530),