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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 066A3EB64D9 for ; Tue, 27 Jun 2023 10:07:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232067AbjF0KHE (ORCPT ); Tue, 27 Jun 2023 06:07:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231925AbjF0KG1 (ORCPT ); Tue, 27 Jun 2023 06:06:27 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06AF9469E for ; Tue, 27 Jun 2023 03:02:48 -0700 (PDT) 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 B4AE21F8BD; Tue, 27 Jun 2023 10:02:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1687860166; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hP20W1aJRMG/CkLQ6EbxLZKVcTb46pBaae045QQFSpU=; b=QXDXJTsEbf+LhkJU374ssHmXGBltyj/IPxuz88f8sibP6mG9wAb/ux14D7a7R8LTxi+4wL ixdzfxmFjPU0AF1o9QGdhF+XbnM7TwR18l68YLuaOGri1lE+K1GSD6zz/HN0DLBDxUU4CZ 4tTMqf3gsD/rPM6gO0MFHGWjUqGxh1w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1687860166; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hP20W1aJRMG/CkLQ6EbxLZKVcTb46pBaae045QQFSpU=; b=77kx53T2qHmV+H9O8k5Sxe6Cnp7aO5zDMrjLQPmn/rejVreO3TQw5L18OYl6HQxF4gykEg I4RxcnORGGqNtaDw== 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 8FAB813462; Tue, 27 Jun 2023 10:02:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id wyYiIsazmmTCcAAAMHmgww (envelope-from ); Tue, 27 Jun 2023 10:02:46 +0000 Date: Tue, 27 Jun 2023 12:02:46 +0200 Message-ID: <87ilb9fcjd.wl-tiwai@suse.de> From: Takashi Iwai To: dengxiang Cc: tiwai@suse.com, yangyingliang@huawei.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] SKU: Set to turn off EAPD control for Internal SPK. In-Reply-To: <20230627055836.23798-1-dengxiang@nfschina.com> References: <20230627055836.23798-1-dengxiang@nfschina.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=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 27 Jun 2023 07:58:36 +0200, dengxiang wrote: > > Due to unknown reason that could not support DSP function on Raptor Lake > platform using v2.5 sof-bin firmware and snd_hda_intel would disable codec > wakeup twice during snd_hda_intel initialization, Internal SPK is forbidden > to put sound outside with snd_hda_intel driver on Unis B760 sku machine. > Now find out that PIN47 EAPD status is always low for ALC897 chip on > Unis B760 sku. > Solution: set to turn off EAPD control again in avoid to mute internal SPK. > > Signed-off-by: dengxiang > --- > sound/pci/hda/patch_realtek.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c > index 36c4adfb11e7..bb0ee265eb7f 100644 > --- a/sound/pci/hda/patch_realtek.c > +++ b/sound/pci/hda/patch_realtek.c > @@ -534,6 +534,16 @@ static void set_eapd(struct hda_codec *codec, hda_nid_t nid, int on) > { > if (get_wcaps_type(get_wcaps(codec, nid)) != AC_WID_PIN) > return; > + > + switch (codec->core.vendor_id) { > + case 0x10ec0897: > + case 0x80867a50: > + on = 0; > + break; > + default: > + break; > + } Sorry, this is definitely no-go. It matches generically to all devices that have this codec chip, so you'll break all those devices. Takashi