From patchwork Wed Feb 14 10:36:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan-Marek Glogowski X-Patchwork-Id: 10218381 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 27056602CB for ; Wed, 14 Feb 2018 10:36:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 28881289FD for ; Wed, 14 Feb 2018 10:36:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D38A28D1F; Wed, 14 Feb 2018 10:36:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1603A289FD for ; Wed, 14 Feb 2018 10:36:22 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id DB95E2677B9; Wed, 14 Feb 2018 11:36:20 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 59AB52677E5; Wed, 14 Feb 2018 11:36:20 +0100 (CET) Received: from ironchief.h-da.de (ironchief.h-da.de [141.100.10.235]) by alsa0.perex.cz (Postfix) with ESMTP id 1F53A26773D for ; Wed, 14 Feb 2018 11:36:17 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2EmBgAnEIRaX2soZI1cGQEBAQEBAQEBA?= =?us-ascii?q?QEBAQcBAQEBAYNSaW0og2WYJUUDBoE0gReWV4IDhUUCgnFXFQECAQEBAQEBAgM?= =?us-ascii?q?DNFmFJAEBBSMEUhAYAQMDAQIBAgImAgJDDAgGDQYCAQGKJBGvcYFtOiEChF6Df?= =?us-ascii?q?oITAQEBAQEFAQEBASSBD4NyghWBD4IwKYgQgy6CZQWIf5swCYEhoRsFF4dymVU?= =?us-ascii?q?1IoFSTSQUSgmCMIJVHIIHd41mAQEB?= X-IPAS-Result: =?us-ascii?q?A2EmBgAnEIRaX2soZI1cGQEBAQEBAQEBAQEBAQcBAQEBAYN?= =?us-ascii?q?SaW0og2WYJUUDBoE0gReWV4IDhUUCgnFXFQECAQEBAQEBAgMDNFmFJAEBBSMEU?= =?us-ascii?q?hAYAQMDAQIBAgImAgJDDAgGDQYCAQGKJBGvcYFtOiEChF6DfoITAQEBAQEFAQE?= =?us-ascii?q?BASSBD4NyghWBD4IwKYgQgy6CZQWIf5swCYEhoRsFF4dymVU1IoFSTSQUSgmCM?= =?us-ascii?q?IJVHIIHd41mAQEB?= Received: from unknown (HELO mail.fbihome.de) ([141.100.40.107]) by ironchief.h-da.de with ESMTP; 14 Feb 2018 11:36:17 +0100 Received: from [172.16.3.194] (unknown [194.113.41.246]) by mail.fbihome.de (Postfix) with ESMTPSA id 09399421D7; Wed, 14 Feb 2018 11:36:17 +0100 (CET) To: Takashi Iwai References: <6d34fc90-48fb-8d5a-f7a5-7a3e33ddec9b@fbihome.de> <791b9188-c136-dd65-61c2-cb2e93d52876@fbihome.de> <0973174b-bd33-0a3c-bc12-d37ef61dc743@fbihome.de> From: Jan-Marek Glogowski Message-ID: Date: Wed, 14 Feb 2018 11:36:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB Cc: alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH v4] ALSA: hda/realtek PCI quirk for Fujitsu U7x7 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Am 14.02.2018 um 10:41 schrieb Takashi Iwai: > On Wed, 14 Feb 2018 10:36:21 +0100, > Jan-Marek Glogowski wrote: >> >> From: Jan-Marek Glogowski > > This is different from your sign-off address. Is it intentional? > Just to be sure. No - just updated my kernel .git/config with the correct address. Thanks for catching that. I'm just wondering, why this changed, because I didn't use --reset-author for amending the patch... Jan-Marek ---- From 7900f8a4892db1bfddec8af8f662ca47ef75bd53 Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Wed, 14 Feb 2018 11:29:15 +0100 Subject: [PATCH] ALSA: hda/realtek: PCI quirk for Fujitsu U7x7 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 --- sound/pci/hda/patch_realtek.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 2347588..3086759 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -3465,6 +3465,19 @@ static void alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec *codec, 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) { @@ -5351,6 +5364,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, @@ -5556,6 +5570,10 @@ static const struct hda_fixup alc269_fixups[] = { .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[]) { @@ -6422,6 +6440,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { 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),