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: 10092897 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 BFAD560327 for ; Tue, 5 Dec 2017 13:11:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 978C928B11 for ; Tue, 5 Dec 2017 13:11:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C1FC29409; Tue, 5 Dec 2017 13:11:52 +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=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB86028B11 for ; Tue, 5 Dec 2017 13:11:51 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 2A044267758; Tue, 5 Dec 2017 14:11:50 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id D20EB26775A; Tue, 5 Dec 2017 14:11:48 +0100 (CET) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) by alsa0.perex.cz (Postfix) with ESMTP id B67D8266AE1 for ; Tue, 5 Dec 2017 14:11:46 +0100 (CET) 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 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= Cc: alsa-devel@alsa-project.org, Arnd Bergmann , linux-kernel@vger.kernel.org, Takashi Iwai , Liam Girdwood , linux-arm-kernel@lists.infradead.org Subject: [alsa-devel] [PATCH] [v2] ASoC: atmel-classd: improve Kconfig dependencies X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.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