Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp837108iob; Thu, 12 May 2022 05:50:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz45DtXbhMlQ/10zIJYMGh+obLbaYbSHfchfn9qTEGxc7Fh+4uCv5nz3uvBsmU8zlAIM/5m X-Received: by 2002:a05:6402:1148:b0:416:a4fb:3c2e with SMTP id g8-20020a056402114800b00416a4fb3c2emr35101935edw.182.1652359833024; Thu, 12 May 2022 05:50:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652359833; cv=none; d=google.com; s=arc-20160816; b=HxbhdI2Nj5PEFJKbxgXr+1ZMUzHf24mMC8zD3Hq7mXk1hmLxAEWAiT5TEYL5259nhH 606mJgurpuL0heU4IJc3MdFXhh4sW5dbKZ98LQJ3z6v75BiSqhjHjo48J0C5XqnNMZgT pM1e7ktNv9BEqYyWehwRI8POexj/ozd/q673v8kwCDrhLM+YQ5rtd74ORkiuI1i3xwOz DQ0Mjdc3gxX8mAQdJZlLiK3mN1wkKDE9lHuSu/TY+dFC5ga+UZOW5Dpxqf9aj6AgbWQX 8s0WcFxMZl2JJCparvserPyOQiEClYS/KUsgAfuTX4xbkOxbC787pslJoXExWrhqNF1T MwhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature:dkim-signature; bh=UW2GdRmJAnrhWiyCmp8j1OoOQeEqRLEmI9WIKtzeJdY=; b=UaxfJFgI/OyBpsvHBgamOaIl+gdebKnPdJs4eCWDt6/HzysPpTpNkotLZSHkHfulFp xjNMei1eZS2CEVz/cfiB1hzEvXgWro63WFM1dqXWounY74JdqPeEKo2LcjFX0JnolEK0 GZ2w0JbKlYE2dilbCAiAxtyGO/oJmd3mHvijJjEwlsN2LicII9S02DptVPTdcHSRZb8J NRBIOnmNRJdUalAkTVK7yWanJIRz/CFirnGh3nanFPMkQ6o5ibmbURPZM8R3usmGNiRH itBGWdxUisaJf7sBPU360gu1Ua1X6TE2+5JPs/mfd+gJWIaEXYvQviR/gd06Xbizw8uf +koA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=ZREBSIxB; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr15-20020a1709073f8f00b006f39944bd6fsi5584798ejc.329.2022.05.12.05.50.05; Thu, 12 May 2022 05:50:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=ZREBSIxB; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244395AbiEKOJW (ORCPT + 99 others); Wed, 11 May 2022 10:09:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244406AbiEKOJU (ORCPT ); Wed, 11 May 2022 10:09:20 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3127869B78 for ; Wed, 11 May 2022 07:09:18 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id E48EB21C33; Wed, 11 May 2022 14:09:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1652278156; 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=UW2GdRmJAnrhWiyCmp8j1OoOQeEqRLEmI9WIKtzeJdY=; b=ZREBSIxBlMvMsrhwAgm8m76z1CTpbdK2vHFXqDo0x2e/ZfI7QMuTwfqRuFo2xmNYUFmvz9 k3dq75TKBMDzw6qH/gSvN9au73SO10U6sxrhQN/9yWmaQ9PmiFKgxdYIW8FLAiIwFOOGbj e8X8alsWstOkdfD0YrvwMfHbQ2TAtA0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1652278156; 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=UW2GdRmJAnrhWiyCmp8j1OoOQeEqRLEmI9WIKtzeJdY=; b=ZUS8H9+FQ0oA+z/SdaDba7j2c18aAsh5gz/jo0CPFGnRjFZhJsgLA4s8ZmnUMKAAznNk8A c3po3peuLT0XxnBw== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 87D212C141; Wed, 11 May 2022 14:09:16 +0000 (UTC) Date: Wed, 11 May 2022 16:09:16 +0200 Message-ID: From: Takashi Iwai To: Werner Sembach Cc: alsa-devel@alsa-project.org, kai.vehmanen@linux.intel.com, linux-kernel@vger.kernel.org, imre.deak@intel.com, pierre-louis.bossart@linux.intel.com, tiwai@suse.com Subject: Re: [PATCH] ALSA: hda/intel: Add quirk for TongFang devices with pop noise In-Reply-To: <71fadca3-7750-2fc0-c04a-f05ab4e85112@tuxedocomputers.com> References: <20220511133828.13724-1-wse@tuxedocomputers.com> <71fadca3-7750-2fc0-c04a-f05ab4e85112@tuxedocomputers.com> 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") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 11 May 2022 15:58:03 +0200, Werner Sembach wrote: > > Am 11.05.22 um 15:41 schrieb Takashi Iwai: > > On Wed, 11 May 2022 15:38:28 +0200, > > Werner Sembach wrote: > >> When audio stops playing and sometimes when it starts playing, there is an > >> audible "pop" noise when using headphones on most Tongfang GMxMxxx, > >> GKxNxxx, GMxZxxx, GMxTxxx, and GMxAxxx devices. > >> > >> Disabling power saving for the Realtek codec fixes this noise. Presumably > >> it is triggered on some power event in the audio circuit. > >> > >> Signed-off-by: Werner Sembach > >> Cc: stable@vger.kernel.org > > Usually this denylist is a last resort if any other methods never > > helped. Is it the case? > > I also tried setting codec->power_save_node = 0; in a patch_realtek.c quirk. > > static void alc274_fixup_pop_noise(struct hda_codec *codec, const struct > hda_fixup *fix, int action) > { >        codec->power_save_node = 0; > } > > That initially seemed to work, but when I tested it again a day later > after a fresh install, it didn't anymore. I don't know what is > different. On the install before, I did some debugging with boot > parameters and other stuff, cant reproduce anymore what exactly. power_save_node is already 0 as default for patch_alc269(), so it must be irrelevant. > I took the line from alc274_fixup_bind_dacs which fixes the pop noise > when applied to the devices, but does a lot of random other stuff too > not meant for the device. It's only one thing, there are tons of different fixes :) alc274_fixup_bind_dacs() rather specifies the routing so that the speaker is connected to the preferred DAC. Many click noises come from the default pin shut-up behavior. You can disable it or change it in other way. Also, setting auto_mute_via_amp may influence on such behavior (that is included in alc274_fixup_bind_dacs()). Note that many quirks can be enabled even without compiling but via the codec patch loading (using hints). thanks, Takashi