Received: by 10.223.185.116 with SMTP id b49csp6354273wrg; Wed, 28 Feb 2018 08:04:18 -0800 (PST) X-Google-Smtp-Source: AH8x226I9dxVlRMPxfMlCMIPRVQu1bOlZGvaJ4558dJMfDDCHaEKj2jn7+FhusDAW72z+h7oVXtj X-Received: by 10.99.167.2 with SMTP id d2mr14516841pgf.408.1519833858607; Wed, 28 Feb 2018 08:04:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519833858; cv=none; d=google.com; s=arc-20160816; b=d2NI/i7WoM/EucNQl7EfC2V0cF2c6v7KwxL5kd2Gi4t0n23t1HylMbq9DAm6ESwvjL KBxgfy0MPKqi0vSIJqRqQqHuqLBa92VEw+8xkdo/gKBNhHyuguI1Pnwsh2KXHgJtMpFa l2Kivts6ur2Z2+BY1tJR99EEBX3XdS08daCOv2+WONeBfYpKtRCQDagkYutjsotQayj5 Xp/ShAq1VuYQ6vRZdsWbBwzYzwsqwJVTdzRGxb2lzC8XRcterj+6G5XErYsj5Ln9+ylB niJS9tzvN6lPbJSyARVyTg7ERMJ8P8qt0VrW1z0zW5rH9Wm2xEn9yItqmTxqbeEOga9e NADg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=T8fcu6Wwpp8dEsqfp3+ERyun0eyMHyIu/Dm7UcjaQI4=; b=ch9jn16ntirq3XcV6SUTQT6SvdonFm2kgD/H/uw5aQJ72cuClhyOIpbGodgQzlQASP w0SvQdIiGZCm6i6igoBS8CXMoeGse2hHA2SH5APNoqnKf/hIdO9U9taac0OBFc6ufWvp /MZewy2ahjhxpIev5gwS7L/rflemQ9eBDtOgm+k0tnsL5T2EddojeFZtF6aGp3AZkdd2 JTJc3SFjHJlXeTMtDgFJJmRVHJWeeagYip2k+WDaEG50A1z7sR8FI1D2z1uDahgmNceo OnO/zhmHWOPpht6OamkU+CXDEzcgvNXvgMi02eeKRZiLQrSpt0XGNSKyyhZm29XSKkXc eNJA== ARC-Authentication-Results: i=1; mx.google.com; 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 o3-v6si39970pls.781.2018.02.28.08.04.02; Wed, 28 Feb 2018 08:04:18 -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; 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 S1753120AbeB1QCC (ORCPT + 99 others); Wed, 28 Feb 2018 11:02:02 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:34700 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753100AbeB1QCA (ORCPT ); Wed, 28 Feb 2018 11:02:00 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Ys-0006Xm-AE; Wed, 28 Feb 2018 15:22:30 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yh-00009Z-KJ; Wed, 28 Feb 2018 15:22:19 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Takashi Iwai" , "Hui Wang" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 140/254] ALSA: hda - Add MIC_NO_PRESENCE fixup for 2 HP machines In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Hui Wang commit 322f74ede933b3e2cb78768b6a6fdbfbf478a0c1 upstream. There is a headset jack on the front panel, when we plug a headset into it, the headset mic can't trigger unsol events, and read_pin_sense() can't detect its presence too. So add this fixup to fix this issue. Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai [bwh: Backported to 3.16: adjust context] Signed-off-by: Ben Hutchings --- sound/pci/hda/patch_conexant.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -2845,6 +2845,8 @@ enum { CXT_FIXUP_MUTE_LED_EAPD, CXT_FIXUP_HP_SPECTRE, CXT_FIXUP_HP_GATE_MIC, + CXT_FIXUP_HEADSET_MIC, + CXT_FIXUP_HP_MIC_NO_PRESENCE, }; /* for hda_fixup_thinkpad_acpi() */ @@ -2923,6 +2925,18 @@ static void cxt_fixup_headphone_mic(stru } } +static void cxt_fixup_headset_mic(struct hda_codec *codec, + const struct hda_fixup *fix, int action) +{ + struct conexant_spec *spec = codec->spec; + + switch (action) { + case HDA_FIXUP_ACT_PRE_PROBE: + spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; + break; + } +} + /* OPLC XO 1.5 fixup */ /* OLPC XO-1.5 supports DC input mode (e.g. for use with analog sensors) @@ -3374,6 +3388,19 @@ static const struct hda_fixup cxt_fixups .type = HDA_FIXUP_FUNC, .v.func = cxt_fixup_hp_gate_mic_jack, }, + [CXT_FIXUP_HEADSET_MIC] = { + .type = HDA_FIXUP_FUNC, + .v.func = cxt_fixup_headset_mic, + }, + [CXT_FIXUP_HP_MIC_NO_PRESENCE] = { + .type = HDA_FIXUP_PINS, + .v.pins = (const struct hda_pintbl[]) { + { 0x1a, 0x02a1113c }, + { } + }, + .chained = true, + .chain_id = CXT_FIXUP_HEADSET_MIC, + }, }; static const struct snd_pci_quirk cxt5045_fixups[] = { @@ -3425,6 +3452,8 @@ static const struct snd_pci_quirk cxt506 SND_PCI_QUIRK(0x1025, 0x054f, "Acer Aspire 4830T", CXT_FIXUP_ASPIRE_DMIC), SND_PCI_QUIRK(0x103c, 0x8174, "HP Spectre x360", CXT_FIXUP_HP_SPECTRE), SND_PCI_QUIRK(0x103c, 0x8115, "HP Z1 Gen3", CXT_FIXUP_HP_GATE_MIC), + SND_PCI_QUIRK(0x103c, 0x8299, "HP 800 G3 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x103c, 0x829a, "HP 800 G3 DM", CXT_FIXUP_HP_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1043, 0x138d, "Asus", CXT_FIXUP_HEADPHONE_MIC_PIN), SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT_FIXUP_OLPC_XO), SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410),