Received: by 10.223.185.116 with SMTP id b49csp1018944wrg; Wed, 21 Feb 2018 10:39:48 -0800 (PST) X-Google-Smtp-Source: AH8x225w+a0KEUhkegMn4VB4QNYqX7lWfMxK4NRXNTvbMMV2hZDEyxoQP4kZqVGfpzr5NI5yxZUd X-Received: by 10.101.83.76 with SMTP id w12mr3308150pgr.95.1519238388592; Wed, 21 Feb 2018 10:39:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519238388; cv=none; d=google.com; s=arc-20160816; b=ci/aoidevqRvAohSHY5FRI6RGlJpTKGgcTOZSDYBphcIjlPv3PY8si1cNSa3idmPzv /rctrWRpA06z80m9cmAU4CCwU828EGVtVvicpFo2YkplZxRfsSnxQDgiqJeoyTXQ497Z OH8IZyytIFwgOkHX7+iFuPb+n2l74QC/DVHraj05og7kQxFuJ+gZDY8mte6lnkg3GwA9 v06dYfddFq2zYqAOlA8a0t62imSN9k35/h3wV6vDTDYrEWJPKIddHOHF130R3cobJeco VYOHm9p65+Mq/qKx7JX8RE0srQUS/391tl5ZgWw/dBROy5/A+mU/gYcegtMbASJecH4e 0+6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=AgfCMF2TfJinSPGNrL3BtvE38e/u7QiB+hrJj3Sp6DI=; b=hR+J6OkbBydrLWeaKdpcbNGG9MM7sYVk3MW5pd6UDmcJnOVBHvYji6/WKvwrorVGjY 2aT+5ZKXkkWH8RfgkZsknP7FNzP25UhweydY+8MKiXnyvy/VS5vuFLpl7XTbB3Rz3H6s +tCaBPBgoe7CXj9duO6GaxnrIIqwdFP8n5Acyi/jylrFF/Z9Hylgm8/iKJyNJ5RDeRdh 5cDUJeYUgmLtIMiuqnyKF3ueJnQnk8/h3FMVac9UJz8i+wYLqubigCp6kvkSBOtVBM1x MA+i60r9N/63oWbmlC2Ew1dF3YhMH2IxQKcIzXZ2UqupMGp86QYNsJ5isYnWgg9FczGV KVPg== 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 c23-v6si9250998pli.308.2018.02.21.10.39.33; Wed, 21 Feb 2018 10:39:48 -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 S1754510AbeBUNMX (ORCPT + 99 others); Wed, 21 Feb 2018 08:12:23 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:45604 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936459AbeBUNMS (ORCPT ); Wed, 21 Feb 2018 08:12:18 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 22856E7F; Wed, 21 Feb 2018 13:12:16 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jan-Marek Glogowski , Takashi Iwai Subject: [PATCH 4.15 147/163] ALSA: hda/realtek: PCI quirk for Fujitsu U7x7 Date: Wed, 21 Feb 2018 13:49:36 +0100 Message-Id: <20180221124538.190390721@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124529.931834518@linuxfoundation.org> References: <20180221124529.931834518@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jan-Marek Glogowski commit fdcc968a3b290407bcba9d4c90e2fba6d8d928f1 upstream. These laptops have a combined jack to attach headsets, the U727 on the left, the U757 on the right, but a headsets microphone doesn't work. Using hdajacksensetest I found that pin 0x19 changed the present state when plugging the headset, in addition to 0x21, but didn't have the correct configuration (shown as "Not connected"). So this sets the configuration to the same values as the headphone pin 0x21 except for the device type microphone, which makes it work correctly. With the patch the configured pins for U727 are Pin 0x12 (Internal Mic, Mobile-In): present = No Pin 0x14 (Internal Speaker): present = No Pin 0x19 (Black Mic, Left side): present = No Pin 0x1d (Internal Aux): present = No Pin 0x21 (Black Headphone, Left side): present = No Signed-off-by: Jan-Marek Glogowski Cc: Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/patch_realtek.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -3378,6 +3378,19 @@ static void alc269_fixup_pincfg_no_hp_to spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP; } +static void alc269_fixup_pincfg_U7x7_headset_mic(struct hda_codec *codec, + const struct hda_fixup *fix, + int action) +{ + unsigned int cfg_headphone = snd_hda_codec_get_pincfg(codec, 0x21); + unsigned int cfg_headset_mic = snd_hda_codec_get_pincfg(codec, 0x19); + + if (cfg_headphone && cfg_headset_mic == 0x411111f0) + snd_hda_codec_set_pincfg(codec, 0x19, + (cfg_headphone & ~AC_DEFCFG_DEVICE) | + (AC_JACK_MIC_IN << AC_DEFCFG_DEVICE_SHIFT)); +} + static void alc269_fixup_hweq(struct hda_codec *codec, const struct hda_fixup *fix, int action) { @@ -5251,6 +5264,7 @@ enum { ALC269_FIXUP_LIFEBOOK_EXTMIC, ALC269_FIXUP_LIFEBOOK_HP_PIN, ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT, + ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC, ALC269_FIXUP_AMIC, ALC269_FIXUP_DMIC, ALC269VB_FIXUP_AMIC, @@ -5457,6 +5471,10 @@ static const struct hda_fixup alc269_fix .type = HDA_FIXUP_FUNC, .v.func = alc269_fixup_pincfg_no_hp_to_lineout, }, + [ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc269_fixup_pincfg_U7x7_headset_mic, + }, [ALC269_FIXUP_AMIC] = { .type = HDA_FIXUP_PINS, .v.pins = (const struct hda_pintbl[]) { @@ -6331,6 +6349,7 @@ static const struct snd_pci_quirk alc269 SND_PCI_QUIRK(0x10cf, 0x159f, "Lifebook E780", ALC269_FIXUP_LIFEBOOK_NO_HP_TO_LINEOUT), SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN), SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN), + SND_PCI_QUIRK(0x10cf, 0x1629, "Lifebook U7x7", ALC255_FIXUP_LIFEBOOK_U7x7_HEADSET_MIC), SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC), SND_PCI_QUIRK(0x10ec, 0x10f2, "Intel Reference board", ALC700_FIXUP_INTEL_REFERENCE), SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),