From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C007AD38 for ; Tue, 15 Aug 2023 09:08:27 +0000 (UTC) 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 Precedence: bulk X-Mailing-List: regressions@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. > >