Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp17216053rwd; Mon, 26 Jun 2023 23:10:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6AWgV6BgMhw2P+axZU2xQFIVw4VGeU7NoNKtKL3IDTO09O7BCAelZIfmNlDQPBQnuUQzCD X-Received: by 2002:aa7:d296:0:b0:51d:96f0:9012 with SMTP id w22-20020aa7d296000000b0051d96f09012mr3954272edq.10.1687846226925; Mon, 26 Jun 2023 23:10:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687846226; cv=none; d=google.com; s=arc-20160816; b=pqwP+/Fzg8NFqfK1L3tQ/Amo7jdiFUq9aS5m1ya/vTvlP0NyfnmCO/mvy2Ph50oeOL Dg2ot8joR2UGaCobMs0i47z5vYgHEEPK9u/hBkolHK9BndRolRrEB8YsaYZ7m55wB8Oi HBOjdu17CR0prsP/p7v/R2yIcGtdyQiRORWjM0m5YSK0nP7iV8rb3B7UJNdCN5cSufgh XDUQJrEytTQrsurr/VtMXgAFcgnokczc/FcEozUi4ZmD2eTnVC9gG0P/E5/sPWT19V/F tTWavfuMwMu0O7GjMGkvZrONBvvtwGLbaH5aTs/gnchsEFsob7IqCW6gyX2HzHirEOiW SkdA== 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 :message-id:date:subject:cc:to:from; bh=vHopb/oL2q1L2LI9BihNvkMMjxnHk95ktfpimL/EwfM=; fh=oMy+aQOFn+8VRhKH968S5FwJeghTDc+HZp1WTfvGJDI=; b=HOkJv1OBrHupJt8RARb0yRULgJlw8a2qtcgGqvONzValN7RbwAQeogOAwJLtstQjZC DurmyXEFz9LenU9gygefB4uu9WCGHhlDGGQ9CQjayW4R/qYsnDp+bl1CSDgUlHtXMASp YxnJbVnQJb5J4rlFS5mv9LeTkvZzfTO/NQujpP0kiWOPPvXVzYt2zoURL7J1yf98ITBZ 7dRZxkIOGm2ZkOAOCcxNQULBgWO104vumgOEysWyWdVh4ZtEDWd8mPlKIy8GFlw1HTy/ sSkukmWdO2e65VkAa+aNiVRl4XHFS+9wgxd0ztigIFAOlJ/siz8zRWr3fzKfM8mRmSa4 Kv6w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r7-20020a170906280700b00988c69cb451si3777435ejc.687.2023.06.26.23.10.01; Mon, 26 Jun 2023 23:10:26 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229524AbjF0F7J (ORCPT + 99 others); Tue, 27 Jun 2023 01:59:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229487AbjF0F7H (ORCPT ); Tue, 27 Jun 2023 01:59:07 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 0C16B1BEB for ; Mon, 26 Jun 2023 22:59:05 -0700 (PDT) Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 36AEA6027C747; Tue, 27 Jun 2023 13:58:53 +0800 (CST) X-MD-Sfrom: dengxiang@nfschina.com X-MD-SrcIP: 180.167.10.98 From: dengxiang To: tiwai@suse.com, yangyingliang@huawei.com Cc: linux-kernel@vger.kernel.org, dengxiang@nfschina.com Subject: [PATCH] SKU: Set to turn off EAPD control for Internal SPK. Date: Tue, 27 Jun 2023 13:58:36 +0800 Message-Id: <20230627055836.23798-1-dengxiang@nfschina.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 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; + } + if (snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_EAPD) snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_EAPD_BTLENABLE, on ? 2 : 0); -- 2.30.2