From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D626DC49ED7 for ; Mon, 16 Sep 2019 21:57:12 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5D2A521670 for ; Mon, 16 Sep 2019 21:57:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="hiz5OD7P" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5D2A521670 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 328B41669; Mon, 16 Sep 2019 23:56:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 328B41669 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1568671030; bh=WfTdVdGx+WuGz/73ok0sSob3XF1wPJ14syztA01F9ME=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=hiz5OD7PJF3qHtMBMOF9B2KNX/UVEFnGA2XFMJG6SLyZYqkvH2L8MkoXKtpP5a4lJ UihA+S/pfnX1g1Z+FxEhNSUH5wXqw3h1KX8fPlsDsxadPDM/cdcTSGwNnrJOaPBugR y60b3t22tXXxClqLwQ+n7uk0zqxTd5HLjUEkK590= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 22128F80539; Mon, 16 Sep 2019 23:55:56 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7DF39F8053A; Mon, 16 Sep 2019 23:55:54 +0200 (CEST) Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1F74BF801DA for ; Mon, 16 Sep 2019 23:55:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1F74BF801DA X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 51769B009; Mon, 16 Sep 2019 21:55:51 +0000 (UTC) Date: Mon, 16 Sep 2019 23:55:50 +0200 Message-ID: From: Takashi Iwai To: Jan-Marek Glogowski In-Reply-To: <8f4f9b20-0aeb-f8f1-c02f-fd53c09679f1@fbihome.de> References: <8f4f9b20-0aeb-f8f1-c02f-fd53c09679f1@fbihome.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: alsa-devel@alsa-project.org, Chris Chiu , Hui Wang , Jian-Hong Pan , Daniel Drake Subject: Re: [alsa-devel] RfC / [PATCH] Jack sense support for Medion E4254 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Mon, 16 Sep 2019 10:38:07 +0200, Jan-Marek Glogowski wrote: > > Hi everybody, > > I recently bought the laptop. It has one jack for attaching a headset. Jack > sense is announced by the HDA config but not working. Except for some > positioning, and color information, the PIN config seemed to be sensible, and > everything I tried to override, didn't result in a working jack. > > Manually unmuting the jack using hda-analyser resulted in working output, so > generally the config seemed to work. > > Reading the patch-realtek code, if found ALC256_FIXUP_ASUS_HEADSET_MODE, which > somehow changed the pin 0x19 to be associated with the 0x21 headset out pin, > resulting in this dmesg change: > > -snd_hda_codec_realtek hdaudioC0D0: Mic=0x19 > +snd_hda_codec_realtek hdaudioC0D0: Headset Mic=0x19 What are the initial pin config values for these? > And for whatever reason jack sense is now working, at least for some normal > output-only headset (currently I don't have one included a mic with me, so > actually can't test that mic volume works correctly). > > I was just wondering, if my pin values are actually correct, because they still > define different association, as I understand it, but the ASUS fix even works > with these wrong channels /associations 2 and 4. > > So the attached patch works for me, but I'm still wondering, if this is the > correct solution. FWIW, jack sense works fine in Windows. > > Anything I might be missing here? I don't think anything wrong here, as long as your quirk actually works. I can double-check if I get alsa-info.sh output (run with --no-upload option) with hda-emu, too. thanks, Takashi > > Jan-Marek > > ------- > > >From 0ccc5f07d8737690bd2df6d88a5af0f1f36d0e40 Mon Sep 17 00:00:00 2001 > From: Jan-Marek Glogowski > Date: Sun, 15 Sep 2019 16:57:28 +0200 > Subject: [PATCH] ALSA: hda/realtek: PCI quirk for Medion E4254 > > The laptop has a combined jack to attach headsets on the right. > The BIOS encodes them as two different colored jacks at the front, > but otherwise it seems to be configured ok. But any adaption of > the pins config on its own doesn't fix the jack detection to work > in Linux. Still Windows works correct. > > This is somehow fixed by chaining ALC256_FIXUP_ASUS_HEADSET_MODE, > which seems to register the microphone jack as a headset part and > also results in fixing jack sensing, visible in dmesg as: > > -snd_hda_codec_realtek hdaudioC0D0: Mic=0x19 > +snd_hda_codec_realtek hdaudioC0D0: Headset Mic=0x19 > > Signed-off-by: Jan-Marek Glogowski > --- > sound/pci/hda/patch_realtek.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c > index c1ddfd2fac52..448e0146dab2 100644 > --- a/sound/pci/hda/patch_realtek.c > +++ b/sound/pci/hda/patch_realtek.c > @@ -5800,6 +5800,7 @@ enum { > ALC256_FIXUP_ASUS_MIC_NO_PRESENCE, > ALC299_FIXUP_PREDATOR_SPK, > ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC, > + ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, > }; > > static const struct hda_fixup alc269_fixups[] = { > @@ -6850,6 +6851,16 @@ static const struct hda_fixup alc269_fixups[] = { > .chained = true, > .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC > }, > + [ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE] = { > + .type = HDA_FIXUP_PINS, > + .v.pins = (const struct hda_pintbl[]) { > + { 0x19, 0x04a11040 }, > + { 0x21, 0x04211020 }, > + { } > + }, > + .chained = true, > + .chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE > + }, > }; > > static const struct snd_pci_quirk alc269_fixup_tbl[] = { > @@ -7113,6 +7124,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { > SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), > SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS), > SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */ > + SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE), > > #if 0 > /* Below is a quirk table taken from the old code. > @@ -7280,6 +7292,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = { > {.id = ALC225_FIXUP_HEADSET_JACK, .name = "alc-headset-jack"}, > {.id = ALC295_FIXUP_CHROME_BOOK, .name = "alc-chrome-book"}, > {.id = ALC299_FIXUP_PREDATOR_SPK, .name = "predator-spk"}, > + {.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"}, > {} > }; > #define ALC225_STANDARD_PINS \ > -- > 2.20.1 > _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel