From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935258AbdDSWAz (ORCPT ); Wed, 19 Apr 2017 18:00:55 -0400 Received: from avon.wwwdotorg.org ([70.85.31.133]:34980 "EHLO avon.wwwdotorg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1764848AbdDSWAu (ORCPT ); Wed, 19 Apr 2017 18:00:50 -0400 Subject: Re: [PATCH 3/3] sound: ASoC: tegra: Select tegra30 i2s and ahub for tegra124 SoC To: Paul Kocialkowski , Thierry Reding References: <20170418151159.31843-1-contact@paulk.fr> <1492533513.3504.2.camel@paulk.fr> Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Alexandre Courbot , Marcel Ziswiler , Rob Herring From: Stephen Warren Message-ID: <41ef55f7-8f17-4ca3-4757-bfefb1fe8321@wwwdotorg.org> Date: Wed, 19 Apr 2017 16:00:46 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1492533513.3504.2.camel@paulk.fr> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/18/2017 10:38 AM, Paul Kocialkowski wrote: > Le mardi 18 avril 2017 à 10:15 -0600, Stephen Warren a écrit : >> On 04/18/2017 09:11 AM, Paul Kocialkowski wrote: >>> This selects the tegra30 i2s and ahub controllers for the tegra124 SoC. >>> These are needed when building without ARCH_TEGRA_3x_SOC set. >>> diff --git a/sound/soc/tegra/Kconfig b/sound/soc/tegra/Kconfig >>> index efbe8d4c019e..bcd18d2cf7a7 100644 >>> --- a/sound/soc/tegra/Kconfig >>> +++ b/sound/soc/tegra/Kconfig >>> @@ -46,7 +46,7 @@ config SND_SOC_TEGRA20_SPDIF >>> >>> config SND_SOC_TEGRA30_AHUB >>> tristate >>> - depends on SND_SOC_TEGRA && ARCH_TEGRA_3x_SOC >>> + depends on SND_SOC_TEGRA && (ARCH_TEGRA_3x_SOC || >>> ARCH_TEGRA_124_SOC) >> >> Is this really a compile-time dependency? > > From a quick look at the code, I doubt this is really a build dependency. > >> If so, don't we need to add T210 and T186 entries into that || condition too, >> since we could be building a kernel with just T210/T186 support and no T124 >> support? > > In the spirit of this patch, adding entries for other tegra platforms would make > sense. Would you prefer that we leave out the dependency from SND_SOC_TEGRA30_* > and only select the right I2S driver to use in each codec driver? > > If not, we'd have to list all relevant platforms both in the I2S/AHUB drivers > and in each codec's rules (which is not necessarily and issue, but there's no > need to have artificial platform dependencies). > > What do you think? I think we should just remove most of these "depends on" since they're mostly set up to reflect runtime requirements rather than build time requirements. The only points I'd make are: 1) Everything should "depends on SND_SOC_TEGRA" simply so the options don't show up and clutter menuconfig menus unless SND_SOC_TEGRA is enabled. 2) SND_SOC_TEGRA30_I2S does need the Tegra30 AHUB driver in order to compile/link, since it directly calls functions in that driver. This is already handled by SND_SOC_TEGRA30_I2S doing "select SND_SOC_TEGRA30_AHUB". 3) The machine drivers all do e.g. "select SND_SOC_TEGRA30_I2S if ARCH_TEGRA_3x_SOC". This was an attempt to make the machine drivers only pull in the relevant drivers for the SoC(s) being compiled for. I'm not sure this still makes sense; this won't work on kernels that only support T124/T210/T186 since ARCH_TEGRA_3x_SOC isn't enabled then. Should we just remove all those and make sure the defconfigs are updated to make sure the relevant I2S/AHUB/SPDIF/AC97 drivers are explicitly enabled? Perhaps we should default all the I2S/AHUB/SPDIF/AC97 to y (which will only apply if SND_SOC_TEGRA is enabled)?