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 X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0D48C352AA for ; Tue, 1 Oct 2019 14:27:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C2A9021906 for ; Tue, 1 Oct 2019 14:27:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KjAEPOH/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C2A9021906 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GP2SKD3pGGjHD6ITMFd8uTycJ0fwouHE7b5LQOdNnpo=; b=KjAEPOH/J0cE0t Wvbjg0B8XdFc9XsVE2ZChb6lMnbmBa/v0P4Dn8tVFG0+UAQo0LyWjN9F5iJq8g++fE+bj9F1yevxK cwT22+bYX1xPfwQCFpobzg/Txl5mP0RiZOk5TCM35qW6K9u954A5GC1TNLAXhoBEII5ZmiUU2Ekw9 KkWDnfmidevV4IX69/uHmI+JEySBdiCX6hfzrVbi8Mo1+jUCXGTes70xAWwNPOWbu3KPRodjX7HOU uzqCgNUpbry44Z9gQsAQbnyCnfBWqEPx2v4mIYBEdycKEtZSguiS42e4tkr2SzCA6xZ37cqJzJBFj WNzNFXsKn14OLg4+3a8Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iFJ83-0002p9-DJ; Tue, 01 Oct 2019 14:27:51 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iFJ80-0002oU-8t for linux-arm-kernel@lists.infradead.org; Tue, 01 Oct 2019 14:27:50 +0000 X-Originating-IP: 86.207.98.53 Received: from localhost (aclermont-ferrand-651-1-259-53.w86-207.abo.wanadoo.fr [86.207.98.53]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 37DFE240008; Tue, 1 Oct 2019 14:27:35 +0000 (UTC) Date: Tue, 1 Oct 2019 16:27:34 +0200 From: Alexandre Belloni To: Arnd Bergmann Subject: Re: [PATCH] ASoC: atmel: fix atmel_ssc_set_audio link failure Message-ID: <20191001142734.GD4106@piout.net> References: <20191001142116.1172290-1-arnd@arndb.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191001142116.1172290-1-arnd@arndb.de> User-Agent: Mutt/1.12.1 (2019-06-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191001_072748_461396_457E8322 X-CRM114-Status: GOOD ( 16.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, Liam Girdwood , linux-kernel@vger.kernel.org, Takashi Iwai , Jaroslav Kysela , Ludovic Desroches , Mark Brown , Codrin Ciubotariu , =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On 01/10/2019 16:20:55+0200, Arnd Bergmann wrote: > The ssc audio driver can call into both pdc and dma backends. With the > latest rework, the logic to do this in a safe way avoiding link errors > was removed, bringing back link errors that were fixed long ago in commit > 061981ff8cc8 ("ASoC: atmel: properly select dma driver state") such as > > sound/soc/atmel/atmel_ssc_dai.o: In function `atmel_ssc_set_audio': > atmel_ssc_dai.c:(.text+0xac): undefined reference to `atmel_pcm_pdc_platform_register' > > Fix it this time using Makefile hacks and a comment to prevent this > from accidentally getting removed again rather than Kconfig hacks. > > Fixes: 18291410557f ("ASoC: atmel: enable SOC_SSC_PDC and SOC_SSC_DMA in Kconfig") > Signed-off-by: Arnd Bergmann > --- > sound/soc/atmel/Kconfig | 4 ++-- > sound/soc/atmel/Makefile | 10 ++++++++-- > 2 files changed, 10 insertions(+), 4 deletions(-) > > diff --git a/sound/soc/atmel/Kconfig b/sound/soc/atmel/Kconfig > index f118c229ed82..25c31bf64936 100644 > --- a/sound/soc/atmel/Kconfig > +++ b/sound/soc/atmel/Kconfig > @@ -10,11 +10,11 @@ config SND_ATMEL_SOC > if SND_ATMEL_SOC > > config SND_ATMEL_SOC_PDC > - tristate > + bool > depends on HAS_DMA > > config SND_ATMEL_SOC_DMA > - tristate > + bool > select SND_SOC_GENERIC_DMAENGINE_PCM > > config SND_ATMEL_SOC_SSC > diff --git a/sound/soc/atmel/Makefile b/sound/soc/atmel/Makefile > index 1f6890ed3738..c7d2989791be 100644 > --- a/sound/soc/atmel/Makefile > +++ b/sound/soc/atmel/Makefile > @@ -6,8 +6,14 @@ snd-soc-atmel_ssc_dai-objs := atmel_ssc_dai.o > snd-soc-atmel-i2s-objs := atmel-i2s.o > snd-soc-mchp-i2s-mcc-objs := mchp-i2s-mcc.o > > -obj-$(CONFIG_SND_ATMEL_SOC_PDC) += snd-soc-atmel-pcm-pdc.o > -obj-$(CONFIG_SND_ATMEL_SOC_DMA) += snd-soc-atmel-pcm-dma.o > +# pdc and dma need to both be built-in if any user of > +# ssc is built-in. > +ifdef CONFIG_SND_ATMEL_SOC_PDC > +obj-$(CONFIG_SND_ATMEL_SOC_SSC) += snd-soc-atmel-pcm-pdc.o > +endif > +ifdef CONFIG_SND_ATMEL_SOC_DMA > +obj-$(CONFIG_SND_ATMEL_SOC_SSC) += snd-soc-atmel-pcm-dma.o > +endif Doesn't that prevent them to be built as a module at all? I'm not sure there is a use case though. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel