Skip to content

Commit f9dfa8f

Browse files
arndbbroonie
authored andcommitted
ASoC: SOF: sort out Kconfig, again
The imx8 config keeps causing issues: WARNING: unmet direct dependencies detected for SND_SOC_SOF_IMX8M Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=m] && SND_SOC_SOF_TOPLEVEL [=y] && SND_SOC_SOF_IMX_TOPLEVEL [=y] && IMX_DSP [=n] Selected by [m]: - SND_SOC_SOF_IMX_OF [=m] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=m] && SND_SOC_SOF_TOPLEVEL [=y] && SND_SOC_SOF_IMX_TOPLEVEL [=y] && SND_SOC_SOF_IMX8M_SUPPORT [=y] This is complicated by two drivers having dependencies on both platform specific drivers and the SND_SOC_SOF_OF framework code, and using an somewhat obscure method to build them the same way as the SOC_SOF_OF symbol (built-in or modular). My solution now ensures that the two drivers can only be enabled when the dependencies are met: - When the platform specific drivers are built-in, everything is fine, as SOC_SOF_OF is either =y or =m - When both are loadable modules, it also works, both for Kconfig and at runtime - When the hardware drivers are loadable modules or disabled, and SOC_SOF_OF=y, prevent the IMX_SOF_OF drivers from being turned on, as this would be broken. It seems that this is just an elaborate way to describe two tristate symbols that have straight dependencies, but maybe I'm missing some subtle point. It seems to always build for me now. Fixes: fe57a92 ("ASoC: SOF: Add missing dependency on IMX_SCU") Fixes: afb93d7 ("ASoC: SOF: imx: Add i.MX8M HW support") Fixes: cb0312f ("ASoC: SOF: imx: fix undefined reference issue") Fixes: afb93d7 ("ASoC: SOF: imx: Add i.MX8M HW support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://lore.kernel.org/r/20200428212752.2901778-1-arnd@arndb.de Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 79149fb commit f9dfa8f

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎sound/soc/sof/imx/Kconfig‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,29 @@ config SND_SOC_SOF_IMX_OF
2121

2222
config SND_SOC_SOF_IMX8_SUPPORT
2323
bool "SOF support for i.MX8"
24-
depends on IMX_SCU
24+
depends on IMX_SCU=y || IMX_SCU=SND_SOC_SOF_IMX_OF
25+
depends on IMX_DSP=y || IMX_DSP=SND_SOC_SOF_IMX_OF
2526
help
2627
This adds support for Sound Open Firmware for NXP i.MX8 platforms
2728
Say Y if you have such a device.
2829
If unsure select "N".
2930

3031
config SND_SOC_SOF_IMX8
3132
tristate
32-
depends on IMX_SCU
33-
select IMX_DSP
3433
help
3534
This option is not user-selectable but automagically handled by
3635
'select' statements at a higher level
3736

3837
config SND_SOC_SOF_IMX8M_SUPPORT
3938
bool "SOF support for i.MX8M"
39+
depends on IMX_DSP=y || IMX_DSP=SND_SOC_SOF_OF
4040
help
4141
This adds support for Sound Open Firmware for NXP i.MX8M platforms
4242
Say Y if you have such a device.
4343
If unsure select "N".
4444

4545
config SND_SOC_SOF_IMX8M
4646
tristate
47-
depends on IMX_DSP
4847
help
4948
This option is not user-selectable but automagically handled by
5049
'select' statements at a higher level

0 commit comments

Comments
 (0)