From patchwork Tue Dec 5 13:10:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10092899 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2C78D60327 for ; Tue, 5 Dec 2017 13:12:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0374728B11 for ; Tue, 5 Dec 2017 13:12:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA16829409; Tue, 5 Dec 2017 13:12:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7796E28B11 for ; Tue, 5 Dec 2017 13:12:48 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=GjhaT8yaMe6TTJRhEhd3z4j5MOrZ8GuAGTl5+A1Fkz4=; b=daU OC3aj4TCSaTe55Vd35dFLU+qywsU63T2p16w4PHcYKuGbY9HV3BXZEohdhDUA/CgFKc0iKyIFRAOz 9vdiDwhHCxMmdpMbw4jU0R6cD0qPccSMSGAm1eHJ77Xd2ejKyPfF4U9HnxK2b9N3L+kK3e7QUwJR+ p+YX1z8fXnRrvzYtzKaYMajBf2naNYcQKDAHzPEAb7tGGyZhGPgutO8rTPVVX4mSBLR9NIEV2WJNX PT6nwCwMNBwtzWmDJBuZ165CMu7iI9hIjLeCxrl7FeylQsaaQtvE8cGqffhsUl/eDcagYRWDlqui5 mX7mpyxGOWDeZpWgCa976YzqNB635mQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eMD1j-0000i1-Rr; Tue, 05 Dec 2017 13:12:47 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eMD1f-0000eK-NN for linux-arm-kernel@lists.infradead.org; Tue, 05 Dec 2017 13:12:45 +0000 Received: from wuerfel.lan ([149.172.96.106]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.129]) with ESMTPA (Nemesis) id 0MPbvB-1eQrpX0elF-004mEj; Tue, 05 Dec 2017 14:10:38 +0100 From: Arnd Bergmann To: Nicolas Ferre , Mark Brown , Alexandre Belloni Subject: [PATCH] [v2] ASoC: atmel-classd: improve Kconfig dependencies Date: Tue, 5 Dec 2017 14:10:11 +0100 Message-Id: <20171205131022.2082003-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:bNCgij3i59ZXyibT5Al+7Xf4xUP94aVcm8wRqkouIG4oCB7hvo0 Bbe0abFjtHtmfNTMfDdoH9zpzjoLDZAOxSvA6SjIZ63tc0QN/LRIvB346HGLLotivwQnYcy wREsk1cA4cHfuRgmooFltSsHlr8MLHUB5uh0nWxnKhSpQS4FT7mGpwu+HMX4oxEHCdQXRK8 Jy0DhRsNMzMT9ypQcD6rw== X-UI-Out-Filterresults: notjunk:1; V01:K0:5kxXkxkhjpQ=:rgdS7mx7RqOeGZLJic4yoZ HpBfA3zgxcg7eYZlT8DlSYFM3mYBup+/+FbnpCT+UGvyXRzo0YYdBdXkm+C7R0+L/LKOLbrFU mO6I4vh6lRz4nM9j3NnmRaQg6m5uPE8pJEDhlD/PcxgBay38pQdeTdYs+qfy8F/1wOGp1UIEk +3YVeZB7ht3yuvMwLWuZzTByo5zQfTyrZBSwwEtIijP12jt7Q7JT/gnB0DuNTJOr5DW+q04W3 8WChWK+GmZjsorpppOiJcmGQlcKaa6USlCEwgVC7U61DyiUtnhIjM3bUPCzFbaugQnncdgdpW DfdBXWa22YH1u53ASxr/O7NL7+Bd1fLBfoaXOiPosBxzENq/DRhZ3EqnK0bO9Mf90WqkBGd0o 7JW7R3ktNLnvX3VTPxgIH3z14BtO01uMkQDLB9cHugSLMtpO13UGEEzfMB3zLhi7iIbbOV7v/ giBsV/phdkVuMeKbEGMDLXfmI97VSOFMR5YArFOY57ExLzaPGfJFxpBFmDuLQn9lFKwrxA/FP gWNEbdEvxaWEY4fzn3dsKJTrswQ5XVbJkpPpBZ2R/V9vU6DCJR5KJDfySS23RKQpI1TK86ZFj 7J32XpBQSwdohxo6YfoilHyLwhA1aQywtcK/0tt5EBbsnjcNVvgqj48pBVmI1isHCY9b0ILRT 8CiFDRL1pRykHN3xo7OTI1fqmhOQ0KCPHT5JTwywJ45nKLb/Oakh1AGSNkM7kqE3roXPj6hOY Wb6ycM9DfEPWLQmpYL6OmcdMDLMv0P8ghWXMTkLG1aVqwBqeDDwHYHZzvLY= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171205_051244_099356_D35730DF X-CRM114-Status: GOOD ( 15.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, Arnd Bergmann , linux-kernel@vger.kernel.org, Takashi Iwai , Liam Girdwood , Jaroslav Kysela , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 061981ff8cc8 ("ASoC: atmel: properly select dma driver state") changed the way that the dependencies are handled, but then the Class D amplifier support got merged, which used the old method. This seems to have triggered a very rare randconfig condition for me now, leading to a link error: sound/soc/atmel/atmel_ssc_dai.o: In function `atmel_ssc_set_audio': atmel_ssc_dai.c:(.text+0x79c): undefined reference to `atmel_pcm_dma_platform_register' atmel_ssc_dai.c:(.text+0x79c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `atmel_pcm_dma_platform_register' sound/soc/atmel/atmel_ssc_dai.o: In function `atmel_ssc_put_audio': atmel_ssc_dai.c:(.text+0xf24): undefined reference to `atmel_pcm_dma_platform_unregister' atmel_ssc_dai.c:(.text+0xf24): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `atmel_pcm_dma_platform_unregister' This changes the SND_ATMEL_SOC_DMA option so it gets built whenever one of the two users (SND_ATMEL_SOC_SSC_DMA and SND_ATMEL_SOC_CLASSD) is enabled, with the twist that we make it built-in when SND_ATMEL_SOC_SSC is built-in, even if one of the other two is a module. I think this captures best what the real dependency in the hardware is, and it simplifies the logic a bit. Fixes: e0a25b6d1862 ("ASoC: atmel-classd: add the Audio Class D Amplifier") Signed-off-by: Arnd Bergmann --- v2: rewrite the change completely, after running into a new regression. I'm putting it out on the list so we can review the change together, but I'm still doing more testing at the same time. If I don't reply by Dec 6, nothing new has come up. --- sound/soc/atmel/Kconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/atmel/Kconfig b/sound/soc/atmel/Kconfig index 4a56f3dfba51..af9a9096d50b 100644 --- a/sound/soc/atmel/Kconfig +++ b/sound/soc/atmel/Kconfig @@ -20,8 +20,8 @@ config SND_ATMEL_SOC_SSC_PDC config SND_ATMEL_SOC_DMA tristate select SND_SOC_GENERIC_DMAENGINE_PCM - default m if SND_ATMEL_SOC_SSC_DMA=m && SND_ATMEL_SOC_SSC=m - default y if SND_ATMEL_SOC_SSC_DMA=y || (SND_ATMEL_SOC_SSC_DMA=m && SND_ATMEL_SOC_SSC=y) + default y if SND_ATMEL_SOC_SSC=y && (SND_ATMEL_SOC_SSC_DMA=m || SND_ATMEL_SOC_CLASSD=m) + default SND_ATMEL_SOC_CLASSD || SND_ATMEL_SOC_SSC_DMA config SND_ATMEL_SOC_SSC_DMA tristate @@ -64,7 +64,6 @@ config SND_AT91_SOC_SAM9X5_WM8731 config SND_ATMEL_SOC_CLASSD tristate "Atmel ASoC driver for boards using CLASSD" depends on ARCH_AT91 || COMPILE_TEST - select SND_ATMEL_SOC_DMA select REGMAP_MMIO help Say Y if you want to add support for Atmel ASoC driver for boards using