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),