From patchwork Thu May 28 09:36:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 6497171 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 95901C0020 for ; Thu, 28 May 2015 09:39:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A452A2060B for ; Thu, 28 May 2015 09:39:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B3662205F9 for ; Thu, 28 May 2015 09:39:14 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YxuEy-0006fk-8K; Thu, 28 May 2015 09:36:40 +0000 Received: from down.free-electrons.com ([37.187.137.238] helo=mail.free-electrons.com) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YxuEu-0006dG-Ut for linux-arm-kernel@lists.infradead.org; Thu, 28 May 2015 09:36:38 +0000 Received: by mail.free-electrons.com (Postfix, from userid 106) id 84BE21B9; Thu, 28 May 2015 11:36: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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from localhost (128-79-216-6.hfc.dyn.abo.bbox.fr [128.79.216.6]) by mail.free-electrons.com (Postfix) with ESMTPSA id 42C4C162; Thu, 28 May 2015 11:36:16 +0200 (CEST) Date: Thu, 28 May 2015 11:36:14 +0200 From: Alexandre Belloni To: Paul Bolle Subject: Re: [PATCH 2/2] ASoC: atmel: compile pcm driver in snd-soc-atmel_ssc_dai Message-ID: <20150528093614.GL2185@piout.net> References: <1432591459-22613-1-git-send-email-alexandre.belloni@free-electrons.com> <1432591459-22613-2-git-send-email-alexandre.belloni@free-electrons.com> <1432713024.27695.235.camel@x220> <20150527091902.GN3199@piout.net> <1432718749.27695.254.camel@x220> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1432718749.27695.254.camel@x220> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150528_023637_299645_AFE8F752 X-CRM114-Status: GOOD ( 18.37 ) X-Spam-Score: -0.0 (/) Cc: alsa-devel@alsa-project.org, Arnd Bergmann , Nicolas Ferre , linux-kernel@vger.kernel.org, Mark Brown , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Hi, On 27/05/2015 at 11:25:49 +0200, Paul Bolle wrote : > On Wed, 2015-05-27 at 11:19 +0200, Alexandre Belloni wrote: > > However, the Kconfig maintainer found a way to do the right thing so we > > may as well drop that patch and keep those as modules. > > Perhaps I missed a message: do you have a link? > It was part of a private discussion. This would give that (replaces my other patch) if you want to test: From b93ca1a4d9fa63c37e3d2b0aecbd1ec691a40922 Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Mon, 25 May 2015 23:42:17 +0200 Subject: [PATCH] ASoC: atmel: properly select dma driver state It is currently possible to have CONFIG_SND_ATMEL_SOC_SSC=y with either CONFIG_SND_ATMEL_SOC_PDC=m or CONFIG_SND_ATMEL_SOC_DMA=m. This results in a driver that compiles but does not link with this kind of error: sound/built-in.o: In function `atmel_ssc_set_audio': (.text+0x87d90): undefined reference to `atmel_pcm_pdc_platform_register' sound/built-in.o: In function `atmel_ssc_put_audio': (.text+0x8879a): undefined reference to `atmel_pcm_pdc_platform_unregister' Introduce new config options SND_ATMEL_SOC_SSC_PDC and SND_ATMEL_SOC_SSC_DMA which should be used by the board drivers and the correct logic to properly select the SND_ATMEL_SOC_PDC and SND_ATMEL_SOC_DMA states. Reported-by: Randy Dunlap Signed-off-by: Alexandre Belloni --- sound/soc/atmel/Kconfig | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/sound/soc/atmel/Kconfig b/sound/soc/atmel/Kconfig index 93abe4e6d596..1489cd461aec 100644 --- a/sound/soc/atmel/Kconfig +++ b/sound/soc/atmel/Kconfig @@ -10,20 +10,31 @@ if SND_ATMEL_SOC config SND_ATMEL_SOC_PDC tristate + default m if SND_ATMEL_SOC_SSC_PDC=m && SND_ATMEL_SOC_SSC=m + default y if SND_ATMEL_SOC_SSC_PDC=y || (SND_ATMEL_SOC_SSC_PDC=m && SND_ATMEL_SOC_SSC=y) + +config SND_ATMEL_SOC_SSC_PDC + tristate 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) + +config SND_ATMEL_SOC_SSC_DMA + tristate config SND_ATMEL_SOC_SSC tristate + default y if SND_ATMEL_SOC_SSC_DMA=y || SND_ATMEL_SOC_SSC_PDC=y + default m if SND_ATMEL_SOC_SSC_DMA=m || SND_ATMEL_SOC_SSC_PDC=m config SND_AT91_SOC_SAM9G20_WM8731 tristate "SoC Audio support for WM8731-based At91sam9g20 evaluation board" depends on ARCH_AT91 || COMPILE_TEST depends on ATMEL_SSC && SND_SOC_I2C_AND_SPI - select SND_ATMEL_SOC_PDC - select SND_ATMEL_SOC_SSC + select SND_ATMEL_SOC_SSC_PDC select SND_SOC_WM8731 help Say Y if you want to add support for SoC audio on WM8731-based @@ -33,8 +44,7 @@ config SND_ATMEL_SOC_WM8904 tristate "Atmel ASoC driver for boards using WM8904 codec" depends on ARCH_AT91 || COMPILE_TEST depends on ATMEL_SSC && I2C - select SND_ATMEL_SOC_SSC - select SND_ATMEL_SOC_DMA + select SND_ATMEL_SOC_SSC_DMA select SND_SOC_WM8904 help Say Y if you want to add support for Atmel ASoC driver for boards using @@ -44,8 +54,7 @@ config SND_AT91_SOC_SAM9X5_WM8731 tristate "SoC Audio support for WM8731-based at91sam9x5 board" depends on ARCH_AT91 || COMPILE_TEST depends on ATMEL_SSC && SND_SOC_I2C_AND_SPI - select SND_ATMEL_SOC_SSC - select SND_ATMEL_SOC_DMA + select SND_ATMEL_SOC_SSC_DMA select SND_SOC_WM8731 help Say Y if you want to add support for audio SoC on an