Message ID | 20230202102247.806749-1-arnd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> 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 <rfc822;il.mystafa@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <linux-kernel@vger.kernel.org>; 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 <linux-kernel@vger.kernel.org>; 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 <arnd@kernel.org> To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>, Liam Girdwood <lgirdwood@gmail.com>, Peter Ujfalusi <peter.ujfalusi@linux.intel.com>, Bard Liao <yung-chuan.liao@linux.intel.com>, Ranjani Sridharan <ranjani.sridharan@linux.intel.com>, Daniel Baluta <daniel.baluta@nxp.com>, Mark Brown <broonie@kernel.org> Cc: Vinod Koul <vkoul@kernel.org>, Sanyog Kale <sanyog.r.kale@intel.com>, Arnd Bergmann <arnd@arndb.de>, Kai Vehmanen <kai.vehmanen@linux.intel.com>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Richard Fitzgerald <rf@opensource.cirrus.com>, 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 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> 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?= |
Series |
ASoC: SOF: fix intel-soundwire link failure
|
|
Commit Message
Arnd Bergmann
Feb. 2, 2023, 10:22 a.m. UTC
From: Arnd Bergmann <arnd@arndb.de> 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 <arnd@arndb.de> --- 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(-)
Comments
On 2/2/23 04:22, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > 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 <arnd@arndb.de> > --- > 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 I think the problem has been around for a very long time. I can't figure out what we tried to fix and why the Kconfig is written this way. We already have this: config SND_SOC_SOF_INTEL_SOUNDWIRE tristate "SOF support for SoundWire" default SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE depends on SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE depends on ACPI && SOUNDWIRE depends on !(SOUNDWIRE=m && SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE=y) We're doing something wrong here if both of the Kconfigs make references to the value of the other. The only requirement here is that we want to be able to build if SoundWire is not enabled. We have a similar requirement for HDaudio, but for some reason it's only a boolean for HDaudio and a tristate for SoundWire. I have no idea if it was intentional or not, it's been too much time already since we looked at this....
On Thu, 02 Feb 2023 11:22:30 +0100, Arnd Bergmann wrote: > 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 > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: SOF: fix intel-soundwire link failure commit: c5a61db9bf897494fb0657eeb24dfdcb1aab1fc4 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
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"