From patchwork Fri Nov 10 14:54:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 118570 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp8031622qgn; Fri, 10 Nov 2017 06:56:14 -0800 (PST) X-Google-Smtp-Source: AGs4zMZpFUr5scDEkBeG/Ug0YSVhm6RqncTg21LxrTPQMj0d+TZXHqalsru0894O0HQT/583G2rf X-Received: by 10.28.63.77 with SMTP id m74mr462899wma.117.1510325774044; Fri, 10 Nov 2017 06:56:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510325774; cv=none; d=google.com; s=arc-20160816; b=AQGsdRTlLhzJT5TuFs3mUz2JIXga3PWpcKpNkjq7rf8EOYpI/cNCiF6uXpFLP24Vea c+MJXymT7+8rR2Wp06iiurUcMNnrVrC/8qSC5twm9MU9F0IuW/PZ+ZyuMoVI+h3Bjs26 5ifO5XUpHZHGraRhXlyZ2ZcEBwltfQovY/uKtjGHk1vPs02+w+3goKlRt1BCgKWKBi+W 6rvKr2KX+PE0kbwhA+iFITX7SnE84e6XocAKc9QxHwjAtBPdRTiNa/e/JupZokZUtgEH tzcHr7WbIDDJ2C7GP0vGGnyKWMWTgDBq0cmeHbg722lBs0SGn4Gi4L6b/Y0HTuYsum5n DdwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:delivered-to:arc-authentication-results; bh=RMwM2w1XHjEJLKjEKi9ZJETUP+TYtiF+fVd2adT3iII=; b=bKsm9RW7qdmeQc2nvOx/xgHbyC/2nuNscQTN+MOJym0y/3oePxy5qdZNfC5STAk5VJ GV+CT2vgG7MxUthLEdrNGHYFa5MGx/TmDHwQkf4oHNG1XeDajOgDIBW6NeYXElbqzeTh x8JWhwBPO5MAVh3109J4I5fPrANF/6SAL/YAl+a7bjTVvUp/hwjZ3Jeef2F2BhFxYlXu T+Y20DKiGwQmwiTO9fGVpbd/lLtPDpzaXjhn06QSYqrNAU2uhAQot6OZG8HUGt1jqzRb cY8OvNzXJj3Ri/QjyaV4eyo4nM+0eqFmSbXKqb2SXOtLUJyYuyuPQly97FfXI5v98yEB zbhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id s5si7912099wra.178.2017.11.10.06.56.13; Fri, 10 Nov 2017 06:56:14 -0800 (PST) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id A655F26705E; Fri, 10 Nov 2017 15:56:12 +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 24D962678FE; Fri, 10 Nov 2017 15:56:11 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2 autolearn=disabled version=3.4.0 Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.75]) by alsa0.perex.cz (Postfix) with ESMTP id 78D7A26705E for ; Fri, 10 Nov 2017 15:56:08 +0100 (CET) Received: from wuerfel.lan ([109.193.157.232]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0M7sMi-1f8HVp3kkC-00vOfZ; Fri, 10 Nov 2017 15:55:54 +0100 From: Arnd Bergmann To: Mark Brown Date: Fri, 10 Nov 2017 15:54:43 +0100 Message-Id: <20171110145455.821805-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20171110145455.821805-1-arnd@arndb.de> References: <20171110145455.821805-1-arnd@arndb.de> X-Provags-ID: V03:K0:bAs0b0OXp3cZTF8DiUKK4tA9zp1ksUbAqyraYU5tSDynF+53bOS BwDUJtqzluywc/m3YJ3u+uFQh2VXPYLXTaNts0/68YvcSL7/h+EiQtEpMtq9CbJtww3z/tM 0fh4rbbMHVHdt0cIE2yamumSZgC1AiA2e5Uvyhxy0qw1X1QUND5ZcTdmfSbInJF3FcZZzyK ckWcpngF6trkMxwBZ8sgA== X-UI-Out-Filterresults: notjunk:1; V01:K0:0ucshRFLjl8=:O9gXzR1QKH1MFzo5bcNxvv kAZVD/z8T6i5vFazp07XkwGFUTlDDVgsC+w34bP7yACeOQtb8oY16qytDm82MXk0FY7IkR9/K OXKNujSqd1VVVe/1MLZ4yxgBsKrSVYdPUeUHgzdpz5si0Fk7ZjmY6SDQhr0lkMxMZObTPQoch v2qnjEcHX7pjUd56XWtV4VXPXZtmo63EhJPRch3LHWpO3b9xa5HadmkW8RmcGKkhCrxMDVzB4 zpqW3keUVYhTGUCdWEj9sPfpb6ZKw37/Yfgo9XSeFDXZK9UaOVtKin16g1aYaUR7bfZvc0z4e pAvWKwQIjzvJ48jkzCjVIx4nU+3RVxvAm6SrAvYLlcB9noz7Yx8Q3TtYZTFUZz42zxafBVUIQ LYSGA8KfJ9PjqxseUNw9vUrDdWciIm6S8BDE/wi1jDHg/fUvkXxir4tbiExcjcMhM+TEhqVgh 4r66O8P1ENFqPSXVGjY8WJctVOBNZ6OqVIAhrWtBdXkXUZWxCKA5FjZ1RF1y8v56pg7KShIb5 04iYxmjVLJOcgmDEuqvkhjN92kZ/yc9og9joDNgA+bDaI6bqSAXSTUjAPCwOmwl1uypvj5Y+s +FudAV7XEzYLYUM6Gwijvb3wPKy47wSNdMZk4dUk32KYT7+3lNqnJK9/N8HWUVLKmo55VrbMG xMMYf8oHtCECDfel8xLv5l/hEp+joWJsVsD72GYJ1UcQhO2Mgk9hMTAnMf2/jbiqhAa7bkdE3 7n+83lC6Ad66HB/KzqckDlv6TO9/ZvX8ZP8k1A== Cc: alsa-devel@alsa-project.org, Arnd Bergmann , linux-kernel@vger.kernel.org, Takashi Iwai , Liam Girdwood , Bard Liao , Charles Keepax Subject: [alsa-devel] [PATCH 2/2] ASoC: rt5514: work around link error 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 The main rt5514 driver optionally calls into the SPI back-end to load the firmware. This causes a link error when one driver selects rt5514 as built-in and another driver selects rt5514-spi as a loadable module: sound/soc/codecs/rt5514.o: In function `rt5514_dsp_voice_wake_up_put': rt5514.c:(.text+0xac8): undefined reference to `rt5514_spi_burst_write' As a workaround, this adds another silent symbol, to force rt5514-spi to be built-in for that configuration. I'm not overly happy with that solution, but couldn't come up with anything better. Using 'IS_REACHABLE()' would break the case that relies on the loadable module, and all other ideas would result in more complexity. Signed-off-by: Arnd Bergmann --- sound/soc/codecs/Kconfig | 4 ++++ sound/soc/codecs/Makefile | 1 + 2 files changed, 5 insertions(+) -- 2.9.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 0838ae710941..a42ddbc93f3d 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -749,6 +749,10 @@ config SND_SOC_RT5514 config SND_SOC_RT5514_SPI tristate +config SND_SOC_RT5514_SPI_BUILTIN + bool # force RT5514_SPI to be built-in to avoid link errors + default SND_SOC_RT5514=y && SND_SOC_RT5514_SPI=m + config SND_SOC_RT5616 tristate "Realtek RT5616 CODEC" depends on I2C diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile index 05018b7ca72b..0001069ce2a7 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile @@ -360,6 +360,7 @@ obj-$(CONFIG_SND_SOC_RT286) += snd-soc-rt286.o obj-$(CONFIG_SND_SOC_RT298) += snd-soc-rt298.o obj-$(CONFIG_SND_SOC_RT5514) += snd-soc-rt5514.o obj-$(CONFIG_SND_SOC_RT5514_SPI) += snd-soc-rt5514-spi.o +obj-$(CONFIG_SND_SOC_RT5514_SPI_BUILTIN) += snd-soc-rt5514-spi.o obj-$(CONFIG_SND_SOC_RT5616) += snd-soc-rt5616.o obj-$(CONFIG_SND_SOC_RT5631) += snd-soc-rt5631.o obj-$(CONFIG_SND_SOC_RT5640) += snd-soc-rt5640.o