From patchwork Tue Apr 29 19:36:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 4088801 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 36F6DBFF02 for ; Tue, 29 Apr 2014 19:37:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 67B062021F for ; Tue, 29 Apr 2014 19:37:19 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 33D7C20211 for ; Tue, 29 Apr 2014 19:37:18 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 74A75265142; Tue, 29 Apr 2014 21:37:16 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id BF7E12650D8; Tue, 29 Apr 2014 21:37:03 +0200 (CEST) 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 E21262650F0; Tue, 29 Apr 2014 21:37:01 +0200 (CEST) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) by alsa0.perex.cz (Postfix) with ESMTP id EE6EC265062 for ; Tue, 29 Apr 2014 21:36:53 +0200 (CEST) Received: from wuerfel.localnet (HSI-KBW-134-3-133-35.hsi14.kabel-badenwuerttemberg.de [134.3.133.35]) by mrelayeu.kundenserver.de (node=mreue103) with ESMTP (Nemesis) id 0Lfp8c-1XFs0z1C6U-00pOff; Tue, 29 Apr 2014 21:36:23 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Date: Tue, 29 Apr 2014 21:36:22 +0200 Message-ID: <5363504.ttXVrGSYNO@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.11.0-18-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <8655908.M1OtjG8JKI@wuerfel> References: <6606961.lAGLvkNsEj@wuerfel> <20140429165630.GD16981@sirena.org.uk> <8655908.M1OtjG8JKI@wuerfel> MIME-Version: 1.0 X-Provags-ID: V02:K0:rXM40BvIel8RHzsRxAsNj+chUICwk7oqzjpgfSYJqCf BdqlYEI9rnbL2Q1i/t++OpeP/JrwCRHStw2bavxAf/MQ18uJCd IyFgUw7waqh0uLb8MCvgGm0To+4ok6yYLN45Np7TxnUw5Y078p UqT37SSS0uaUO1gjp32RhTDklcxVIW939epgWiZ8M3qXkTRHn2 NU6o8QgAMMbcayLJ7a/9UhhYuGrsFFOt967JtAItlUmXYdpWvK PBFhnpaPB3CaEo9GdURGAufTEkoe7z+024YIl82a6FIGiZkmpj jB6u+6aYUq0YAUbX3k+Ew0APEO0mJ0TQ9nIpXh0MUC3W85W2/J IuMdxvzkG4Z6OPaBg8v8= Cc: alsa-devel@alsa-project.org, Mark Brown , Lars-Peter Clausen , Alexander Shiyan , Liam Girdwood Subject: Re: [alsa-devel] [PATCH] ASoC: fsl: select SND_SOC_IMX_PCM_DMA where needed 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Since commit 204dec93eaa "ASoC: fsl: Allow to select individual common options", it is possible to enable SND_SOC_FSL_SSI and SND_SOC_FSL_SPDIF manually, either as loadable modules or built-in. This unfortunately leads to a link error if one or both of them are built-in, while the imx-pcm-dma framework is a loadable module: sound/built-in.o: In function `fsl_ssi_probe': :(.text+0x51fb8): undefined reference to `imx_pcm_dma_init' sound/built-in.o: In function `fsl_spdif_probe': :(.text+0x52e20): undefined reference to `imx_pcm_dma_init' This changes Kconfig to prevent this case by using 'select' to turn on the imx-pcm-dma code from both drivers. For consistency, we also turn on the imx-pcm-fiq code, which is an alternative to the dma implementation. Note that imx-pcm-fiq is platform dependent, so we must not enable that unless we are building a kernel for i.MX. Note also the "if SND_IMX_SOC != n" syntax as opposed to the normal "if SND_IMX_SOC". This is needed to avoid turning on the options as 'm' if 'SND_IMX_SOC' is a module. Signed-off-by: Arnd Bergmann diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig index fb26345..b2a1ade 100644 --- a/sound/soc/fsl/Kconfig +++ b/sound/soc/fsl/Kconfig @@ -9,6 +9,8 @@ config SND_SOC_FSL_SAI config SND_SOC_FSL_SSI tristate "Synchronous Serial Interface module support" + select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC != n + select SND_SOC_IMX_PCM_FIQ if SND_IMX_SOC != n && ARCH_MXC help Say Y if you want to add Synchronous Serial Interface (SSI) support for the Freescale CPUs. @@ -18,6 +20,8 @@ config SND_SOC_FSL_SSI config SND_SOC_FSL_SPDIF tristate "Sony/Philips Digital Interface module support" select REGMAP_MMIO + select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC != n + select SND_SOC_IMX_PCM_FIQ if SND_IMX_SOC != n && ARCH_MXC help Say Y if you want to add Sony/Philips Digital Interface (SPDIF) support for the Freescale CPUs.