From patchwork Thu Feb 2 10:22:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 51836 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp163471wrn; Thu, 2 Feb 2023 02:45:47 -0800 (PST) X-Google-Smtp-Source: AK7set9GxW8oHrm3W2ngTLklX/HwWlqVOzqDAkGiFFQln16o9KcZMHVFJM76rtFzwkEi6BKmxS4O X-Received: by 2002:a17:903:ca:b0:196:3f55:f813 with SMTP id x10-20020a17090300ca00b001963f55f813mr4792109plc.41.1675334746879; Thu, 02 Feb 2023 02:45:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675334746; cv=none; d=google.com; s=arc-20160816; b=Af3kGS8uC+sIcaZ4wpXjgTX6nM64AbiZ9G0TNNl8GLgZgtoLG1Hvn99UIJDCt7H4wW /cT5ZBtUenCqgfEBRp9Et7BFkAU9SnWM3IBMjEZfjH0UAsr4ifFKC7B12RAB/0F6G2NJ rXOAmE6heEPtoJYp0lXPYuPsnke6zn9ZRIA0Tz6VSDAqNHXcRCazK5l2a1bwcxbGK1OJ lU+nXLDFv6GiapR1dS7XfjByrDmQX/YXCT7nZ3qJ1H0A45uyWu566d3XVrp5oiIwFzy5 drwfnWB26PtdEWL9k4dfYiA8mJ/CHlxNBFLHoEudY6jLKRGfzPeug7jaloG1xZ4rFTXf EH4Q== 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:dkim-signature; bh=LBS9lZUYz/kYlav7Y5dzKQ4vbySmwhGJHViXIKstB/Y=; b=DIENjyk40gXSZdssv0N8B0sLHPuFwsELvGWKCx7t73skRVrFXeoogb6VCDmrITc81R sGl3VApJTUhelqWwGBTMlCty97bePuiDj+PP+rv+vks1J027hEB1759GIZvcpDTH8kCr 29zcxkpUIs30cd5I0YdjL1iE1OdH/tVCnVrXup9TQ4Sb9vbLX0KI60hfR0Gf9DAJA5i5 x7mGB04fEWZbnkgwzztlUbmSj3zvgaZxQn2b0AKA7yWMQmeHugablvcx6K+vQqI/bzkD +qy5H/U/7k+xmc1w1qpbGeDKHbj2noHcp2J8CNuoU0sEDOCD1fLRuSxYybDlhX5VwsZT m8BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IT5dN+zp; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c2-20020a170903234200b00194bf71a8e8si5774814plh.515.2023.02.02.02.45.34; Thu, 02 Feb 2023 02:45:46 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=IT5dN+zp; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231691AbjBBKW7 (ORCPT + 99 others); Thu, 2 Feb 2023 05:22:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231463AbjBBKW5 (ORCPT ); Thu, 2 Feb 2023 05:22:57 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3957719B9 for ; Thu, 2 Feb 2023 02:22:55 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 95787B8258E for ; Thu, 2 Feb 2023 10:22:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D773EC433D2; Thu, 2 Feb 2023 10:22:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675333373; bh=qquQFaEWfR08XHbhtVrLnIslga9ScfKDaL9hdZA2H4Y=; h=From:To:Cc:Subject:Date:From; b=IT5dN+zpWq7CejGt94SSoFmwzkAO1PfAE9oVNwVK4pMhXeObyrYw1idm4bCrIfuo+ dbkf60lkFjZgoAnmxLojR4i/06y4btpEvwu9aApRKMt0jKwLfoNH8EpnIa5OOplbUw 13d28dWpxt5KVGBrN1ElCCSetGxsdo9Qz0AI1byILWRoz0W+oU41W/dpAyjZLIlOvx kPsBU776MN/MoBl4Ucnm19/bVsEp1E/Lon0vrYv8kPl3A84Jj061WLaj21/vZDjFFB U4eLTmFycUWbiTtLLVLzSnaLcwhcQW3O2+hpgpnupSfj0gFykIyvxBmAXHnWFJXyvi C4UMlEL5EVmPA== From: Arnd Bergmann To: Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Daniel Baluta , Mark Brown Cc: Vinod Koul , Sanyog Kale , Arnd Bergmann , Kai Vehmanen , Jaroslav Kysela , Takashi Iwai , Richard Fitzgerald , sound-open-firmware@alsa-project.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: SOF: fix intel-soundwire link failure Date: Thu, 2 Feb 2023 11:22:30 +0100 Message-Id: <20230202102247.806749-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756715807457149491?= X-GMAIL-MSGID: =?utf-8?q?1756715807457149491?= From: Arnd Bergmann My randconfig build setup ran into a rare build failure with CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE=y CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE=m CONFIG_SOUNDWIRE=y CONFIG_SOUNDWIRE_INTEL=m CONFIG_SND_SOC_SOF_HDA=y CONFIG_SND_SOC_SOF_INTEL_TGL=y x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_init_caps': hda.c:(.text+0x691): undefined reference to `sdw_intel_cnl_hw_ops' x86_64-linux-ld: hda.c:(.text+0x6f2): undefined reference to `sdw_intel_probe' x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_sdw_startup': hda.c:(.text+0x1c40): undefined reference to `sdw_intel_startup' x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_sdw_process_wakeen': hda.c:(.text+0x1cb6): undefined reference to `sdw_intel_process_wakeen_event' x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_dsp_interrupt_thread': hda.c:(.text+0x1d67): undefined reference to `sdw_intel_thread' x86_64-linux-ld: sound/soc/sof/intel/hda.o: in function `hda_dsp_remove': hda.c:(.text+0x2655): undefined reference to `sdw_intel_exit' My best understanding is that the definition of SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE was intended to avoid this problem, but got it wrong for the SND_SOC_SOF_INTEL_SOUNDWIRE=m case, where the 'select' is meant to set SOUNDWIRE_INTEL to the value of SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE rather than the intersection of SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE and SND_SOC_SOF_INTEL_SOUNDWIRE. Change the condition to check for SND_SOC_SOF_INTEL_SOUNDWIRE to be a boolean rather than a tristate expression in order to propagate this as intended. Signed-off-by: Arnd Bergmann --- I could not figure out if this is a recent regression or if the problem has existed for a long time and is just really hard to trigger. I first saw it on linux-next-20230201. --- sound/soc/sof/intel/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/intel/Kconfig b/sound/soc/sof/intel/Kconfig index 36a0e2bf30ff..715ba8a7f2f8 100644 --- a/sound/soc/sof/intel/Kconfig +++ b/sound/soc/sof/intel/Kconfig @@ -322,8 +322,8 @@ config SND_SOC_SOF_HDA_PROBES config SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE tristate - select SOUNDWIRE_INTEL if SND_SOC_SOF_INTEL_SOUNDWIRE - select SND_INTEL_SOUNDWIRE_ACPI if SND_SOC_SOF_INTEL_SOUNDWIRE + select SOUNDWIRE_INTEL if SND_SOC_SOF_INTEL_SOUNDWIRE != n + select SND_INTEL_SOUNDWIRE_ACPI if SND_SOC_SOF_INTEL_SOUNDWIRE != n config SND_SOC_SOF_INTEL_SOUNDWIRE tristate "SOF support for SoundWire"