Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify kconfig #92

Merged
merged 11 commits into from
Apr 24, 2024
Merged

Conversation

plbossart
Copy link
Member

probably the largest cleanup in a very long time.

Lots of obsolete options and a baseline-defconfig that was bloated.

This requires lots of checks/testing. @ujfalusi @kv2019i @marc-hb @fredoh9 @bardliao please double-check if I missed anything or removed too many things.

Lots of options were removed at least 2 years ago, remove from
sof-defconfig.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
This option is not available as a user choice and is automagically
selected.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
This option is not available as a user choice and SND_SOC_SOF_CLIENT
is automagically selected.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
base-defconfig Outdated Show resolved Hide resolved
CONFIG_SND_SOC_RT712_SDCA_SDW=m
CONFIG_SND_SOC_RT712_SDCA_DMIC_SDW=m
CONFIG_SND_SOC_RT722_SDCA_SDW=m
CONFIG_SND_SOC_RT715_SDW=m

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I am thinking should codec driver be selected by machine drivers? And we will see the issue if a machine driver doesn't select required codec driver in Kconfig.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a good question.

The problem is that for SoundWire maintenance we want to compile all possible codecs. If we don't we might have compilation misses when we change SoundWire APIs, etc.
But on the other hand, as you mentioned if we use them all then we can't figure out missing dependencies for boards.

I guess I am biased on the first option...

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not both? Using two different subsets of defconfig files. Github workflows are great for this sort of compilation test.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a bad idea @marc-hb, this really depends on whether you are a developer or not, so we could use soundwire-defconfig for the sof-defconfig and soundwire-dev-defconfig for the sof-dev-defconfig. Intel CI uses the latter, so as you said we could have a GitHub action for the minimal sof-defconfig stuff for non-developers.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and updating the machine driver every time when a new SDW codec is added? That does not make much sense, right?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and updating the machine driver every time when a new SDW codec is added? That does not make much sense, right?

If we added a new codec support to a machine driver, I think it makes sense that we need to select the codec driver if the machine driver is selected.
Like

config SND_SOC_INTEL_SOUNDWIRE_SOF_MACH
        tristate "SoundWire generic machine driver"
        depends on I2C && ACPI
        depends on MFD_INTEL_LPSS || COMPILE_TEST
        depends on SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES || COMPILE_TEST
        depends on SOUNDWIRE
        select SND_SOC_MAX98363
        select SND_SOC_MAX98373_I2C
        select SND_SOC_MAX98373_SDW
        select SND_SOC_RT700_SDW
        select SND_SOC_RT711_SDW
        select SND_SOC_RT711_SDCA_SDW
        select SND_SOC_RT712_SDCA_SDW
        select SND_SOC_RT712_SDCA_DMIC_SDW
        select SND_SOC_RT715_SDW
        select SND_SOC_RT715_SDCA_SDW
        select SND_SOC_RT722_SDCA_SDW
        select SND_SOC_RT1308_SDW
        select SND_SOC_RT1308
        select SND_SOC_RT1316_SDW
        select SND_SOC_RT1318_SDW
        select SND_SOC_RT5682_SDW
        select SND_SOC_CS42L42_SDW
        select SND_SOC_CS42L43
        select SND_SOC_CS42L43_SDW
        select MFD_CS42L43
        select MFD_CS42L43_SDW
        select SND_SOC_CS35L56_SDW
        select SND_SOC_DMIC
        select SND_SOC_INTEL_HDA_DSP_COMMON
        select SND_SOC_INTEL_SOF_MAXIM_COMMON
        imply SND_SOC_SDW_MOCKUP

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ujfalusi the sof-sdw machine driver pretty much supports all existing SoundWire devices, so we have to select them all to avoid missing dependencies on dais.

@marc-hb
Copy link

marc-hb commented Apr 23, 2024

Can you do this in two steps / two PRs?

  1. Pure cleanup that does not change the final .config files. Does not need any "real" review because the .config files do not change. Can be merged instantly. Does not need to be tested.

  2. Actual .config changes. Smaller PR, easier and faster to review.

@fredoh9
Copy link

fredoh9 commented Apr 23, 2024

Started PR tests with this PR as it is,

  • KConfig Branch: simplify-kconfig

  • KConfig Commit: 717bb4838e19

  • pr_main_ace : planresultdetail/40196

  • pr_main_cavs : planresultdetail/40197

  • pr_stable_v2_2 : planresultdetail/40199

@plbossart
Copy link
Member Author

v2: pure cleanup without any additions. I double-checked that the .config was the same, but it wouldn't hurt if @marc-hb or @fredoh9 double-checked this.

The changes will be submitted separately once this PR is merged.

Move everything that seems board or test-device related to devices-defconfig.

When in doubt, options remain in base-defconfig

Signed-off-by: Pierre-Louis Bossart <[email protected]>
This name was an earlier version that was never upstreamed

Signed-off-by: Pierre-Louis Bossart <[email protected]>
The _SUPPORT version is no longer used.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
Nothing new, just moved from sof-dev-defconfig where this didn't
belong.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
This work has not progressed, remove for now.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
Remove obsolete options, use module.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
We removed this CONFIG_SND_SOC_SOF_HDA_COMMON_HDMI_CODEC a very long
time ago.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
rename done at least 2 years ago.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
@plbossart
Copy link
Member Author

all tests green, merging.

@plbossart plbossart merged commit 043b1cf into thesofproject:master Apr 24, 2024
4 checks passed
@plbossart plbossart mentioned this pull request Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants