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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 186A5C49ED7 for ; Fri, 20 Sep 2019 08:09:09 +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 0E9D321D6C for ; Fri, 20 Sep 2019 08:09:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="MFuwwhSy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E9D321D6C 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 C8C93166F; Fri, 20 Sep 2019 10:08:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C8C93166F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1568966945; bh=neg0JSNXtfmR4Xw+c3GOk95/VPmrYJJE60pTc4eBhUg=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=MFuwwhSyhnzYwjQt/yrH1FloVvinn06LCS4cLcqketz4mtKjtaqxpG//Vem8yJzR6 ZMPQGURG8ZUa4eh+vPuStCvcag4nl/350EEUkLRHYvYXePBCOOo8AaM2SmfAtZFc4X 0L8XJ0zjCmCu/rN4XpTxQcbvhz+dOUicsA8cm3AQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 469B5F800C7; Fri, 20 Sep 2019 10:08:15 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 77904F80506; Fri, 20 Sep 2019 10:08:13 +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 14AF9F800C7 for ; Fri, 20 Sep 2019 10:08:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 14AF9F800C7 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 ED725BBB4; Fri, 20 Sep 2019 08:08:09 +0000 (UTC) Date: Fri, 20 Sep 2019 10:08:09 +0200 Message-ID: From: Takashi Iwai To: Jan-Marek Glogowski In-Reply-To: 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: Hui Wang , Jian-Hong Pan , alsa-devel@alsa-project.org, Chris Chiu , 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 Tue, 17 Sep 2019 12:18:58 +0200, Jan-Marek Glogowski wrote: > > >> 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. > > I've tested this just with the 4.19 kernel used by Debian buster with the > patched realtek module build as a DKMS package. That kernel code is 4.19.67. > Then I just moved the code to the right position in the current master kernel. > It works for me. > > I tried to compile hda-emu, but already the first file in the kernel dir fails > hard with some missing functions. I used alsa-info.sh with --no-upload, but the > output starts with upload=true?! I attached the log. Thanks. S> > > Am 16.09.19 um 23:55 schrieb Takashi Iwai: > > On Mon, 16 Sep 2019 10:38:07 +0200, > > Jan-Marek Glogowski wrote: > >> > >> 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? > > $ cat /sys/class/sound/hwC0D0/init_pin_configs > 0x12 0x90a60130 > 0x13 0x40000000 > 0x14 0x90170110 > 0x18 0x411111f0 > 0x19 0x02a19040 > 0x1a 0x411111f0 > 0x1b 0x411111f0 > 0x1d 0x4067b945 > 0x1e 0x411111f0 > 0x21 0x02214020 Thanks. So the problem was that the codec driver created "Front Headphone Jack" because of the jack location, while there is no corresponding mute/volume mixer element with that prefix. Although we can fix in a different way, it'd be a higher breakage risk, so I take your patch as is. Takashi _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel