Skip to content

Fix SOF kconfigs - #1382

Merged
plbossart merged 13 commits into
thesofproject:topic/sof-devfrom
plbossart:fix/sof-kconfigs
Nov 1, 2019
Merged

plbossart merged 13 commits into
thesofproject:topic/sof-devfrom
plbossart:fix/sof-kconfigs

Conversation

@plbossart

Copy link
Copy Markdown
Member

We have a number of issues with distros selecting options that make no sense.
Let's try and be more explicit about what they should use.

@xiulipan I updated the kconfig fragments, I hope the configs are dynamically generated from GIT?

Comment thread sound/soc/intel/Kconfig Resolved
@xiulipan

Copy link
Copy Markdown

@plbossart All CI kconfig and QA kconfig will come from the https://github.com/thesofproject/kconfig
I see the change in kconfig repo and I think the CI build will also updated with that.

I re-trigger the sst build in Jenkins, it seems some codec failed when BYT and SKL sst driver is not selected.

cujomalainey
cujomalainey previously approved these changes Oct 30, 2019
ranj063
ranj063 previously approved these changes Oct 30, 2019
@plbossart
plbossart dismissed stale reviews from ranj063 and cujomalainey via e78c455 October 30, 2019 20:54
@plbossart

Copy link
Copy Markdown
Member Author

@cujomalainey the last change for GLK might impact your Chrome configs?

@cujomalainey

Copy link
Copy Markdown

In theory it shouldnt as we are completely on SOF for GLK. Thanks for the warning though.

@plbossart

Copy link
Copy Markdown
Member Author

In theory it shouldnt as we are completely on SOF for GLK. Thanks for the warning though.

I added the new Kconfig SND_SOC_INTEL_GLK_DA7219_MAX98357A_MACH, so if you only select options for SOF this would require a new selection.

@cujomalainey

Copy link
Copy Markdown

Ah ok, I don't think we have any SOF releases for GLK upcoming so I will keep that in mind, ill make sure Ben knows about any CML changes as well

@plbossart

Copy link
Copy Markdown
Member Author

Ah ok, I don't think we have any SOF releases for GLK upcoming so I will keep that in mind, ill make sure Ben knows about any CML changes as well

there's no change for CML in terms of Kconfigs exposed, it's that now you can compile just CML without dependencies on selections done for APL.

Comment on lines +92 to +94
This option is mutually exclusive with the Haswell/Broadwell legacy
driver. If you want to enable SOF on Broadwell you need to deselect
the legacy driver first.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

When running make menuconfig, this option will not even appear in the menu when the dependency is unmet — meaning the user/maintainer will not be able to navigate to this option and press ? to view this text, except when SND_SOC_INTEL_HASWELL=n.

So, this is probably not the best place to explain what other option the user/maintainer needs to deselect first, if they want to be able to see and select this option...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

that's how mutual exclusion based on 'depends' work. I have no ability to change this.
All I could do is add text in the help to say that the legacy option gates SOF.

@dpward dpward Oct 31, 2019 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

My suggestion would be to move at least the second sentence into the help text for SND_SOC_INTEL_HASWELL (rewording as needed).

As it stands now, if the user is able to read the second sentence at all, they can ignore it, because the legacy driver is already deselected.

If this doesn't follow the pattern used elsewhere in Kconfig files though (which seems to vary by subsystem), then please disregard.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll add an explanation on the legacy side as well.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is not that change against the goal I meant with the sound/hda/intel-dsp-config.c ? For distros, we need to have all drivers available and select the correct drivers at runtime (automatically and by the user config). I believe that there should not be any "depends on SND_SOC_INTEL_HASWELL=n" config dependencies at all.

@dpward dpward Nov 10, 2019 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'm not sure which question is being asked here.
As of the time this was merged, sound/hda/intel-dsp-config.c is not sufficient to prevent kernel bug 204237 from happening. It seems other changes are still needed for these drivers to coexist.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Intel-dsp-config.c should resolve the issue for the PCI probe, but it seems that we need to do this for ACPI probe, too. @plbossart, I'm right? The target is to be able to compile both SOF / SST drivers for distros.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, I don't know how to do a dynamic detection for Broadwell and Baytrail. SOF is a replacement but it's not ready for prime time just yet.

…F is selected"

This reverts commit e1e6e54.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
…iver

Some distros select all options blindly, which leads to confusion and
bug reports. Since SOF does not support Baytrail-CR for now, and
UCM/topology files are still being propagated to downstream distros,
make SOF on Baytrail an opt-in option that first require distros to
opt-out of existing defaults.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
Some distros select all options blindly, which leads to confusion and
bug reports. SOF does not fully support Broadwell due to firmware
dependencies, the machine drivers can only support one option, and
UCM/topology files are still being propagated to downstream distros,
so make SOF on Broadwell an opt-in option that first require distros
to opt-out of existing defaults.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204237
Fixes: f35bf70 ('ASoC: Intel: Make sure BDW based machine drivers build for SOF')
Signed-off-by: Pierre-Louis Bossart <[email protected]>
This legacy driver is already deprecated, let's make sure there is no
conflict with SOF.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
…ify help

Some distros select all possible options, despite existing warnings to
be careful. This leads to e.g. user reports that the HDaudio codec and
DMIC are not handled by SOF.

Add an explicit menu item to unlock developer options, and make them
dependent on CONFIG_EXPERT. Hopefully with this double-lock these
options will only be selected by developers.

GitHub issue: thesofproject/sof#1885
Signed-off-by: Pierre-Louis Bossart <[email protected]>
updated solution to the problem reported with randconfig:

CONFIG_SND_SOC_SOF_IMX depends on CONFIG_SND_SOC_SOF, but is in
turn referenced by the sof-of-dev driver. This creates a reverse
dependency that manifests in a link error when CONFIG_SND_SOC_SOF_OF
is built-in but CONFIG_SND_SOC_SOF_IMX=m:

sound/soc/sof/sof-of-dev.o:(.data+0x118): undefined reference to `sof_imx8_ops'

use def_trisate to propagate the right settings without select.

Fixes: f4df4e4 ("ASoC: SOF: imx8: Fix COMPILE_TEST error")
Fixes: 202acc5 ("ASoC: SOF: imx: Add i.MX8 HW support")
Suggested-by: Arnd Bergmann <[email protected]>
Signed-off-by: Pierre-Louis Bossart <[email protected]>
So far we used select to use the relevant built-in/module options, but
this led to blurring layers between core and Intel Kconfigs.

Use def_tristate works just as well and removes Intel stuff from the code.

Suggested-by: Arnd Bergmann <[email protected]>
Signed-off-by: Pierre-Louis Bossart <[email protected]>
This option famously broke audio on Linus' laptop and the problem have
not been fixed.

Mark as DEPRECATED to avoid any ambiguity with distros.

Use SOF if you need HDaudio support w/ the DSP enabled, e.g. for DMIC
capture.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
This option is only required with the Skylake platform driver, there
is no reason to have this option in machine drivers. This is
e.g. useless for SOF-based solutions.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
This isn't upstream anyways

Signed-off-by: Pierre-Louis Bossart <[email protected]>
The same driver is reused for 3 different configurations, but the
driver will only be build if ApolloLake is selected.

Fix and make sure each device can work without dependencies on others
(useful for minimal configurations).

Signed-off-by: Pierre-Louis Bossart <[email protected]>
Geminilake machine drivers are only tested and recommended with SOF.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
The wrong dependency is used and the build can be broken

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

Copy link
Copy Markdown
Member Author

Updated comments for legacy as suggested by @dpward

@plbossart
plbossart merged commit 2286f8f into thesofproject:topic/sof-dev Nov 1, 2019
Comment thread sound/soc/intel/Kconfig
typically used for Chromebooks. This is a recommended option.
This option is mutually exclusive with the SOF support on
Broadwell. If you want to enable SOF on Broadwell, you need to
deselect this option first.

@perexg perexg Nov 9, 2019 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What is the reason that the SST / SOF drivers cannot be compiled together for this hardware ?

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.

6 participants