From patchwork Mon Jul 31 08:30:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9871255 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 584D26037D for ; Mon, 31 Jul 2017 08:34:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 49E8E28426 for ; Mon, 31 Jul 2017 08:34:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E8BF2843B; Mon, 31 Jul 2017 08:34:06 +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,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE 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 E1AD128426 for ; Mon, 31 Jul 2017 08:34:05 +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=2Vl833a+KxBOp2rWnGIaAFRX4tuBSVy3wrlpGTzfknw=; b=jNQ hiHo+iLgtqrFPfqbdH0Slv8k9BDa+MlAzKtoblWcNRqWHOszNuo+25x4WmEjm29ASbwJn+Km25rYz 2KtlSHenvQO+3S35sMCBZM+NH2MxsHCEaxmk9Iobm7p/oqhgcU3pLY7ulHXwI8Trv1FGweGLUBTk4 r3iVBHd2dfDv4V47fR4N9904BQ/7Ng/YHmSWnpUYHNhOo4UYaQwqlnVu8E+csNg2q2LHJtSxF/RwQ EMozrPKbZzjzWerM4aW01shjP3ZRYHrDtgVSjW6RH/fNkZLJrVCB+J9ID8g2182k/Ky996ZDH2X3R 19E+1g87Wdxh/mlweqPuI/zLwjwHRow==; 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 1dc69M-0003qF-Sq; Mon, 31 Jul 2017 08:34:04 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dc69J-0003ol-SN; Mon, 31 Jul 2017 08:34:03 +0000 Received: from wuerfel.lan ([78.43.238.10]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.129]) with ESMTPA (Nemesis) id 0MeOiZ-1dCSvR1LbT-00QCFc; Mon, 31 Jul 2017 10:32:22 +0200 From: Arnd Bergmann To: Liam Girdwood , Mark Brown Subject: [PATCH] ASoC: improve RT5514 dependencies Date: Mon, 31 Jul 2017 10:30:55 +0200 Message-Id: <20170731083217.4142512-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:cV1lBy9PQrAlYToDR8JWdz5TtO45pvi5k2//gRqCKZIrG3rZCPx NGn/z6vMNazB4STUIJoB++srqcQ6XOBirD9oINpIsv+h7pnLxpNlYN7Ys9p44FbqwJ6MTHl tYuOb5MujFcwbt/DZWy4i3WoUf70+8/3775OGy+YLww2XlbilcbVMMfjtopGlmlMmjflDpC mQIUNMr8+4XCmBGzp06hw== X-UI-Out-Filterresults: notjunk:1; V01:K0:4pI0nk0iakc=:MVzWKn6XE6gP1S/m81+vt1 34deTUg5AiiDSH6Dda4BEKc8LTYDv6GT7B8bjZ/hcgO6JkBrwFbzmZNazIHTHAPSO4IgMBIgR UyHHpWktsoZpIv42MhD2ZxAMFhI0OAyjNbhdrOzq5RvjFJ6UTY5PCOZxmL4ZfENEKI6FNqyGo wZxYsc3lPJ82f3RFOJLTvgJRiD20iVddHlpUbToescxySbd+iv+7Vlf7N3mPyo4voVEzzBgY6 DP7pEIks+0tCkbEmG53twqfQY6Dxc/YEOu9U+y18EYPZYaDc4P+WTz1MkRmMpM+ncvnwZ/QPY 3EeVI1PS3mbJ8eCCEq76ZoGUFXL6rxtoVOto4BDrCVDbWZcp6q06qB3C7YiFIH8dID9SyctEJ 6/7NRMCUbrFlCCRlK6KTfaxdym2OIGT+utrw48Du8IIyv0pkjE+2dOPUN9Wvo8XxaFgySCtEd JiYS3oMoRFwV3ZkYQFOXzRp8ujY/flooS5yS8zcwbn/OT+0sV23D0KQ7O9K2jkAvIKkzsYhV9 tpjtiYTgPC0arf88uugb6j72jZ17rWErgr45YXlZPoiSEc2w4cq+xVa0x6jt986FFXCef33rh MLfgNOvWGsrOjSIQDRV9bJ7jVsBy+8ZaoOd0PD+a42ZTu3P/fRpfIyzRT+UwEfbOEaT1m35MM fd4223K8np9CYpb0cckmucyEQHy1KuwBtT3MOd2gN9kS9ZmUN/fdvdk3VnrULp0s3ikzC2veU y0WIzMEvG8IO+OryulQSuSAuIVEsza0w3CU1yA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170731_013402_255795_A73B0992 X-CRM114-Status: GOOD ( 12.58 ) X-BeenThere: linux-mediatek@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, Ryder Lee , Hsin-yu Chao , Arnd Bergmann , linux-rockchip@lists.infradead.org, Harsha Priya N , linux-kernel@vger.kernel.org, Takashi Iwai , Jaroslav Kysela , Sugar Zhang , Vinod Koul , linux-mediatek@lists.infradead.org, Matthias Brugger , Naveen M , Charles Keepax , Xing Zheng , linux-arm-kernel@lists.infradead.org, Heiko Stuebner MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP With SND_SOC_RT5514_SPI=m and SND_SOC_RT5514=y, we get this link error: sound/soc/codecs/rt5514.o: In function `rt5514_dsp_voice_wake_up_put': rt5514.c:(.text+0x2068): undefined reference to `rt5514_spi_burst_write' rt5514.c:(.text+0x20c8): undefined reference to `rt5514_spi_burst_write' This adds another Kconfig symbol to work around the link error, forcing the main driver to be a loadable module as well if some other driver selects the I2C side to be built-in. Fixes: 2a18483a7fb4 ("ASoC: Intel: Add Kabylake machine driver for RT5514, RT5663 and MAX98927") Signed-off-by: Arnd Bergmann --- This can now lead to a configuration with SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH=y and SND_SOC_RT5514=m. I don't know if that is a problem or not. An alternative approach would be to flip the dependency between rt5514_spi.ko and rt5514.ko and avoid having the rt5514_spi_burst_write symbol exported. --- sound/soc/codecs/Kconfig | 7 ++++++- sound/soc/intel/Kconfig | 2 +- sound/soc/mediatek/Kconfig | 2 +- sound/soc/rockchip/Kconfig | 1 - 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 024ddc9938ed..115c6144ca2a 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -117,7 +117,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_RT274 if I2C select SND_SOC_RT286 if I2C select SND_SOC_RT298 if I2C - select SND_SOC_RT5514 if I2C + select SND_SOC_RT5514_I2C if I2C select SND_SOC_RT5616 if I2C select SND_SOC_RT5631 if I2C select SND_SOC_RT5640 if I2C @@ -738,6 +738,11 @@ config SND_SOC_RT298 config SND_SOC_RT5514 tristate + default m if SND_SOC_RT5514_SPI=m + default SND_SOC_RT5514_I2C || SND_SOC_RT5514_SPI + +config SND_SOC_RT5514_I2C + tristate config SND_SOC_RT5514_SPI tristate diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig index b301bfff1c09..f5ef912190ed 100644 --- a/sound/soc/intel/Kconfig +++ b/sound/soc/intel/Kconfig @@ -259,7 +259,7 @@ config SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH select SND_SOC_INTEL_SST select SND_SOC_INTEL_SKYLAKE select SND_SOC_RT5663 - select SND_SOC_RT5514 + select SND_SOC_RT5514_I2C select SND_SOC_MAX98927 select SND_SOC_HDAC_HDMI help diff --git a/sound/soc/mediatek/Kconfig b/sound/soc/mediatek/Kconfig index 5c68797f36c4..6ccf73ae77ca 100644 --- a/sound/soc/mediatek/Kconfig +++ b/sound/soc/mediatek/Kconfig @@ -67,7 +67,7 @@ config SND_SOC_MT8173_RT5650_RT5514 tristate "ASoC Audio driver for MT8173 with RT5650 RT5514 codecs" depends on SND_SOC_MT8173 && I2C select SND_SOC_RT5645 - select SND_SOC_RT5514 + select SND_SOC_RT5514_I2C help This adds ASoC driver for Mediatek MT8173 boards with the RT5650 and RT5514 codecs. diff --git a/sound/soc/rockchip/Kconfig b/sound/soc/rockchip/Kconfig index c84487805876..c1139aecdfbe 100644 --- a/sound/soc/rockchip/Kconfig +++ b/sound/soc/rockchip/Kconfig @@ -65,7 +65,6 @@ config SND_SOC_RK3399_GRU_SOUND depends on SND_SOC_ROCKCHIP && I2C && GPIOLIB && CLKDEV_LOOKUP && SPI select SND_SOC_ROCKCHIP_I2S select SND_SOC_MAX98357A - select SND_SOC_RT5514 select SND_SOC_DA7219 select SND_SOC_RT5514_SPI help