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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id DF9BDC001DE for ; Tue, 15 Aug 2023 09:10:05 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EBB61828; Tue, 15 Aug 2023 11:09:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EBB61828 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1692090603; bh=DAm7Rz6BHJu2dSDt8JwB6HE7695iAkp/haezV5XxKb0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=VhufizxS2zLUMnIkml4LALxTSpJLjAh3CLMFlUamn+kw27JOf2a3HRZHwuAh3x+Eu 7n2j9yRzC6OLY8BDhBVyqc/zP8euSFOotYUcOHWWMvATqOWhIl5a8sayYzP36rMJd9 aWZXw6/sS2J0vz2lvWdZmNE2uUe8YDy5K4Ghj5Zs= Received: by alsa1.perex.cz (Postfix, from userid 50401) id D881FF8016D; Tue, 15 Aug 2023 11:08:42 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 677E7F8016D; Tue, 15 Aug 2023 11:08:42 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5CB8AF8016D; Tue, 15 Aug 2023 11:08:36 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 62E2DF800EE for ; Tue, 15 Aug 2023 11:08:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 62E2DF800EE Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=2LfddeV4; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=fXcCg+4F Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 841C61FD63; Tue, 15 Aug 2023 09:08:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1692090500; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HPoS8JqXii/KwORwMKx0+xL5N/z3rN2C0U7fbw4tIlk=; b=2LfddeV4bH+EF3M8KhWlNZ7QX7arTaRa+wyboM2EFSKFGIIIh51my1B3zI4dF0Bqc8yVoM VfseohAj6LC6/pT+VHvFOMIBr/Qd+v9pNrJhmwdQRmkT6sGpB70cX2J8r9LcLDPnh1PUZt 9IYY30lChZEr0Pgobn6/lZh3G0A7hwg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1692090500; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HPoS8JqXii/KwORwMKx0+xL5N/z3rN2C0U7fbw4tIlk=; b=fXcCg+4FPeIpF2u8lAYK4ybREChy1kv6mpegUpXlggNG5wy2qx/rwpLKLhenB3hgVvcH8C 7m1pkiB1tlzvM8BQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 535601353E; Tue, 15 Aug 2023 09:08:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Y8W4EoRA22SFNQAAMHmgww (envelope-from ); Tue, 15 Aug 2023 09:08:20 +0000 Date: Tue, 15 Aug 2023 11:08:19 +0200 Message-ID: <87il9gzn98.wl-tiwai@suse.de> From: Takashi Iwai To: Kailang Cc: "Joseph C. Sible" , Bagas Sanjaya , "regressions@lists.linux.dev" , "perex@perex.cz" , "tiwai@suse.com" , "alsa-devel@alsa-project.org" Subject: Re: Fwd: [Bug 217440] New: ALC236 audio disappears from HP 15z-fc000 on warm boot In-Reply-To: <01e212a538fc407ca6edd10b81ff7b05@realtek.com> References: <87o7jshxch.wl-tiwai@suse.de> <01e212a538fc407ca6edd10b81ff7b05@realtek.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-ID-Hash: QEQRNXAGD7FJ7WPHF3LMW5M7JEKTGCGA X-Message-ID-Hash: QEQRNXAGD7FJ7WPHF3LMW5M7JEKTGCGA X-MailFrom: tiwai@suse.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Tue, 15 Aug 2023 10:08:48 +0200, Kailang wrote: > > Hi Takashi, > > I think maybe attach patch is what you want. Looks good. Let's ask the reporter to test with it. Thanks! Takashi > > > -----Original Message----- > > From: Joseph C. Sible > > Sent: Friday, August 4, 2023 10:35 PM > > To: Takashi Iwai > > Cc: Kailang ; Bagas Sanjaya ; > > regressions@lists.linux.dev; perex@perex.cz; tiwai@suse.com; > > alsa-devel@alsa-project.org > > Subject: Re: Fwd: [Bug 217440] New: ALC236 audio disappears from HP > > 15z-fc000 on warm boot > > > > > > External mail. > > > > > > > > On Mon, Jul 31, 2023 at 12:14 PM Takashi Iwai wrote: > > > > > > ... and now we receive a regression report due to this change :-< > > > https://bugzilla.kernel.org/show_bug.cgi?id=217732 > > > > > > I believe the problem is that the patch disabled the 3kpull-low > > > behavior too much while some codecs still need it. > > > > > > The patch changes like: > > > > > > @@ -3638,8 +3640,7 @@ static void alc256_shutup(struct hda_codec > > *codec) > > > /* If disable 3k pulldown control for alc257, the Mic detection will > > not work correctly > > > * when booting with headset plugged. So skip setting it for the > > codec alc257 > > > */ > > > - if (codec->core.vendor_id != 0x10ec0236 && > > > - codec->core.vendor_id != 0x10ec0257) > > > + if (spec->en_3kpull_low) > > > alc_update_coef_idx(codec, 0x46, 0, 3 << 12); > > > > > > if (!spec->no_shutup_pins) > > > > > > ... while the only place setting spec->en_3kpull_low is: > > > > > > @@ -10682,6 +10683,8 @@ static int patch_alc269(struct hda_codec > > *codec) > > > spec->shutup = alc256_shutup; > > > spec->init_hook = alc256_init; > > > spec->gen.mixer_nid = 0; /* ALC256 does not have any > > > loopback mixer path */ > > > + if (codec->bus->pci->vendor == PCI_VENDOR_ID_AMD) > > > + spec->en_3kpull_low = true; > > > break; > > > case 0x10ec0257: > > > spec->codec_variant = ALC269_TYPE_ALC257; > > > > > > Since spec->3n_3kpull_low is false as default, it means that, except > > > for ALC230/236/256 and PCI vendor AMD, the flag is never set, hence > > > it's no longer called. > > > > > > Shouldn't spec->en_3kpull_low be enabled rather as default? Or which > > > models can set it? > > > > In both my original bug and this new bug, the problem was that we're not > > calling it when we should be. Given that, wouldn't a simple fix be to call it if > > either the old condition or the new condition is true? > > E.g., something like this: > > > > if ((codec->core.vendor_id != 0x10ec0236 && codec->core.vendor_id != > > 0x10ec0257) || spec->en_3kpull_low) > > > > Joseph C. Sible > > > > ------Please consider the environment before printing this e-mail. > >