Skip to content

Commit 7548a39

Browse files
plbossartbroonie
authored andcommitted
ASoC: SOF: i.MX: simplify Kconfig
Follow the Intel example and simplify the Kconfig a) start from the end-product for 'select' chains b) use 'depends on' to filter out configurations. c) use snd-sof-of as a common module without any 'select' Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Signed-off-by: Daniel Baluta <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 5f55c96 commit 7548a39

File tree

3 files changed

+17
-35
lines changed

3 files changed

+17
-35
lines changed

sound/soc/sof/Kconfig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@ config SND_SOC_SOF_ACPI_DEV
4040
config SND_SOC_SOF_OF
4141
tristate "SOF OF enumeration support"
4242
depends on OF || COMPILE_TEST
43-
select SND_SOC_SOF
4443
help
4544
This adds support for Device Tree enumeration. This option is
4645
required to enable i.MX8 devices.
4746
Say Y if you need this option. If unsure select "N".
4847

48+
config SND_SOC_SOF_OF_DEV
49+
tristate
50+
4951
config SND_SOC_SOF_COMPRESS
5052
bool
5153
select SND_SOC_COMPRESS

sound/soc/sof/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ obj-$(CONFIG_SND_SOC_SOF_NOCODEC) += snd-sof-nocodec.o
1717

1818

1919
obj-$(CONFIG_SND_SOC_SOF_ACPI_DEV) += snd-sof-acpi.o
20-
obj-$(CONFIG_SND_SOC_SOF_OF) += snd-sof-of.o
20+
obj-$(CONFIG_SND_SOC_SOF_OF_DEV) += snd-sof-of.o
2121
obj-$(CONFIG_SND_SOC_SOF_PCI_DEV) += snd-sof-pci.o
2222

2323
obj-$(CONFIG_SND_SOC_SOF_INTEL_TOPLEVEL) += intel/

sound/soc/sof/imx/Kconfig

Lines changed: 13 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,53 +11,33 @@ config SND_SOC_SOF_IMX_TOPLEVEL
1111

1212
if SND_SOC_SOF_IMX_TOPLEVEL
1313

14-
config SND_SOC_SOF_IMX_OF
15-
def_tristate SND_SOC_SOF_OF
16-
select SND_SOC_SOF_IMX8 if SND_SOC_SOF_IMX8_SUPPORT
17-
select SND_SOC_SOF_IMX8M if SND_SOC_SOF_IMX8M_SUPPORT
18-
help
19-
This option is not user-selectable but automagically handled by
20-
'select' statements at a higher level.
21-
2214
config SND_SOC_SOF_IMX_COMMON
2315
tristate
16+
select SND_SOC_SOF_OF_DEV
17+
select SND_SOC_SOF
18+
select SND_SOC_SOF_XTENSA
19+
select SND_SOC_SOF_COMPRESS
2420
help
2521
This option is not user-selectable but automagically handled by
2622
'select' statements at a higher level.
2723

28-
config SND_SOC_SOF_IMX8_SUPPORT
29-
bool "SOF support for i.MX8"
30-
depends on IMX_SCU=y || IMX_SCU=SND_SOC_SOF_IMX_OF
31-
depends on IMX_DSP=y || IMX_DSP=SND_SOC_SOF_IMX_OF
24+
config SND_SOC_SOF_IMX8
25+
tristate "SOF support for i.MX8"
26+
depends on IMX_SCU
27+
depends on IMX_DSP
28+
select SND_SOC_SOF_IMX_COMMON
3229
help
3330
This adds support for Sound Open Firmware for NXP i.MX8 platforms.
3431
Say Y if you have such a device.
3532
If unsure select "N".
3633

37-
config SND_SOC_SOF_IMX8
38-
tristate
34+
config SND_SOC_SOF_IMX8M
35+
tristate "SOF support for i.MX8M"
36+
depends on IMX_DSP
3937
select SND_SOC_SOF_IMX_COMMON
40-
select SND_SOC_SOF_XTENSA
41-
select SND_SOC_SOF_COMPRESS
42-
help
43-
This option is not user-selectable but automagically handled by
44-
'select' statements at a higher level.
45-
46-
config SND_SOC_SOF_IMX8M_SUPPORT
47-
bool "SOF support for i.MX8M"
48-
depends on IMX_DSP=y || IMX_DSP=SND_SOC_SOF_OF
4938
help
5039
This adds support for Sound Open Firmware for NXP i.MX8M platforms.
5140
Say Y if you have such a device.
5241
If unsure select "N".
5342

54-
config SND_SOC_SOF_IMX8M
55-
tristate
56-
select SND_SOC_SOF_IMX_COMMON
57-
select SND_SOC_SOF_XTENSA
58-
select SND_SOC_SOF_COMPRESS
59-
help
60-
This option is not user-selectable but automagically handled by
61-
'select' statements at a higher level.
62-
63-
endif ## SND_SOC_SOF_IMX_IMX_TOPLEVEL
43+
endif ## SND_SOC_SOF_IMX_TOPLEVEL

0 commit comments

Comments
 (0)