Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp4927140imc; Mon, 25 Feb 2019 13:48:47 -0800 (PST) X-Google-Smtp-Source: AHgI3IYWrMxQAm6t1sIAH/TcyycyT/voMKKgvkHV9QM8aL/lioBQTbphoB/gCWGitHbsuqmxxOAf X-Received: by 2002:a63:c042:: with SMTP id z2mr1522824pgi.307.1551131327157; Mon, 25 Feb 2019 13:48:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551131327; cv=none; d=google.com; s=arc-20160816; b=imS48kXGx8ItQ/1UGBeEb6ydfa2k29SLx9uvwakAMTIOhoMGjb5Y8tC9EIZD6EJESP 2R8qo9XYsW3fpfB7KJD2wkMzW78iP+aul5eau6V6K8rbKdA7ll3H+FgDHM1N1fB3BVit 24oxuJvF+H4a2rTZxkZgxLWka2x/zDK47rMlDKSqL+hcogYW2iYcBdaS/SoRgF0OhBqb JAT0P1xcVXIG5XHebbWLY6xHTBpPabclE33dzfBzDXCruiUh8ns5lpEJGQaPS7zlVWjW SzY1NJNxpYxB6zFHfhX03RPX2eJDqf+ilcjyrgBIUTGEmgprEo96jeTRQjrK7R2dFo6R dqpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/TSPmx4yAjxWdP87Q9GQ0mg/rtmxrxWIOX3KSOks9c8=; b=RUu9/aov3hyFhLBnWlYLzazAWzWJzPmP2WuVmXDPxOTJ5rfQ0uwynyNvQ2Rni4nQjf Ze9SwPKIJuiopOD7Vj1fmTkYokmVmhCgUWyLOoL1vZVXDw162W6K0pieD3UDnjZI2hXY DKqOBr2p6KkTDA71nB+iJt+S1OUtZfXP5T8PJNhlKR0o76IU6w7j9+i0ln7kB0Jo4GHe Fpbc4bqUOiIZTsBNprIZiE45H+nJa7rGmy+hvkZcrs2Wb3MZq/2QMIrn4XvtvQSvGFvV UrBAfr1i1O82A8wUjuxcBIla4ci4A9XI7yYME31VPGo00d7jb8sTHZBwjRFqfPrBAbs2 QVYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XHb3s71e; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f3si6591573plo.369.2019.02.25.13.48.32; Mon, 25 Feb 2019 13:48:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XHb3s71e; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731818AbfBYV2b (ORCPT + 99 others); Mon, 25 Feb 2019 16:28:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:34188 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731248AbfBYV20 (ORCPT ); Mon, 25 Feb 2019 16:28:26 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 49E282087C; Mon, 25 Feb 2019 21:28:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1551130104; bh=5rOc1ITwWjAxiA5J9zXYYarT1Re2QisBuBq9Hw2VGyM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XHb3s71eTuOCk7iX7kgLKfrRZDOqVaiyiAALct2zKTlzFcY77u5Qeukgd8PmoxJdw sFGA1dNcBGlAjK924GfWs/QSa2BziUAhTjoHYRNpAZ9cp1UOhZcYULhXuECk/NspUx M766+D7ZShmjt/B955AumRe2RtGl9XyksHZhhQR8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jeremy Soller , Takashi Iwai Subject: [PATCH 4.20 016/183] ALSA: hda/realtek - Headset microphone and internal speaker support for System76 oryp5 Date: Mon, 25 Feb 2019 22:09:49 +0100 Message-Id: <20190225195057.425082695@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190225195054.748060397@linuxfoundation.org> References: <20190225195054.748060397@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jeremy Soller commit 7f665b1c3283aae5b61843136d0a8ee808ba3199 upstream. 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 Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/patch_realtek.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1855,6 +1855,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, @@ -2056,6 +2058,17 @@ static void alc1220_fixup_clevo_p950(str 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, @@ -2300,6 +2313,19 @@ static const struct hda_fixup alc882_fix .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[] = { @@ -2376,6 +2402,8 @@ static const struct snd_pci_quirk alc882 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),