Messages in this thread | | | Subject | Re: [alsa-devel] [PATCH] ASoC: skl: always select SND_SOC_HDAC_HDA | From | Pierre-Louis Bossart <> | Date | Mon, 5 Nov 2018 11:18:07 -0600 |
| |
>>> We have this ("strange") lines over the drivers: >>> >>> config BAR >>> depends on FOO || FOO=n >>> >>> which guarantees that FOO will be not module when BAR is built-in. >> That's what I normally use, but I could not figure this one out. >> One problem is that SND_SOC_ALL_CODECS selects >> SND_SOC_HDAC_HDA, and SND_SOC_ALL_CODECS itself >> may be =m, causing the failure for >> SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH=y. >> >> It might work with a separate dummy symbol: >> >> config SND_SOC_HDAC_HDA_FORCE >> tristate >> depends on SND_SOC_ALL_CODECS != n >> default SND_SOC_INTEL_SKYLAKE >> select SND_SOC_HDAC_HDA >> >> This would make SND_SOC_HDAC_HDA built-in even >> with SND_SOC_ALL_CODECS=m and >> SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH=n >> >> It seems a bit ugly, and would need some testing. > The mixture of depends and select is often more confusing, so IMO, we > should align with only select as Pierre's suggestion, in this > particular case.
I tried to avoid re-adding a "depends on" which we tried to remove last year, but there is still a conditional statement which assumes a very specific evaluation order.
1. SKYLAKE is enabled as m or y
2. that enables some machine drivers (through an if statement), some of which might select HDA audio
3. the selections done within the SKYLAKE config are conditional on the outcome of #2.
it seems to work but I don't know if it's by design or an accident :-). One could argue it's a hidden "depends on".
| |