Re: [REGRESSION][BISECTED] My audio broke (was: [PATCH 05/27] ALSA: hda: Move controller drivers into sound/hda/controllers directory)

Takashi Iwai
2025-12-03T09:42:43Z

On Tue, 02 Dec 2025 20:21:45 +0100,
Askar Safin wrote:
>
> On Thu, Oct 16, 2025 at 12:52 PM Takashi Iwai <tiwai@suse.de> wrote:
> > Could you try to just enable CONFIG_SND_SOC_SOF_ALDERLAKE=m on top of
> > the broken config? If my guess is right, this should make the audio
> > working again.
>
> I did this. And the audio indeed works now.
>
> Here are detailed logs:
>
> - Here is Debian config for 6.18-rc7: [config-6.18-amd64]
> - I downloaded vanilla Linux 6.18-rc7 from kernel.org
> - I copied that Debian config (see above) as .config to Linux sources
> - I did "LOCALVERSION=-first make --silent -j32 < /dev/null" ("<
> /dev/null", because I don't want to answer any questions)
> - This is output: [attachment first-out]
> - Then I booted into it
> - Audio works
> - Here is config of this kernel: [config-6.18.0-rc7-first]
> - Here is "find /lib/modules/6.18.0-rc7-first": [find-6.18.0-rc7-first]
> - Here is alsa-info: [attachment alsa-info-first]
> - Here is lsmod: [attachment first-lsmod]
> - Then I "cd" into kernel source (note that ".config" remained since last time)
> - I typed "make localmodconfig < /dev/null"
> - Here is output: [attachment localmodconfig-out]
> - I did "LOCALVERSION=-second make --silent -j32"
> - This command didn't produce any output and didn't ask any questions
> - Then I booted into new kernel
> - Audio doesn't work
> - Here is config of this kernel: [config-6.18.0-rc7-second]
> - Here is "find /lib/modules/6.18.0-rc7-second": [find-6.18.0-rc7-second]
> - Here is alsa-info: [attachment alsa-info-second]
> - Here is lsmod: [attachment second-lsmod]
> - I enabled CONFIG_SND_SOC_SOF_ALDERLAKE=m
> - Then I booted into new kernel
> - Audio works (!!!)
> - Here is config: [config-6.18.0-rc7-third]
> - Here is alsa-info: [alsa-info-third]
>
> I used default Debian initramfs generator during all these tests.

Then the problem is that snd-intel-dspcfg assigns
SND_INTEL_DSP_DRIVER_ANY because no corresponding entry matches to
your device without CONFIG_SND_SOC_SOF_ALDERLAKE. This leads to let
AVS probing it, then failing.

A rather hackish fix would be something like below. Instead of
dropping the SOF-only entries via ifdef, make them dumb entries
instead, so that the legacy driver are assigned for those when the
kconfigs aren't set.

The below patch is to the latest Linus tree, and for older kernels,
you might need to adjust it, but you see what to be done there.

thanks,

Takashi

-- 8< --
diff --git a/sound/hda/core/intel-dsp-config.c b/sound/hda/core/intel-dsp-config.c
index c401c0658421..818d8e502731 100644
--- a/sound/hda/core/intel-dsp-config.c
+++ b/sound/hda/core/intel-dsp-config.c
@@ -29,6 +29,9 @@ MODULE_PARM_DESC(dsp_driver, "Force the DSP driver for Intel DSP (0=auto, 1=lega
#define FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE (FLAG_SOF_ONLY_IF_DMIC | \
FLAG_SOF_ONLY_IF_SOUNDWIRE)

+/* Enable SOF only the given kconfig is enabled, otherwise fallback to legacy */
+#define FLAG_SOF_DEP(cfg) (IS_ENABLED(cfg) ? FLAG_SOF : 0)
+
struct config_entry {
u32 flags;
u16 device;
@@ -209,11 +212,13 @@ static const struct config_entry config_table[] = {
.device = PCI_DEVICE_ID_INTEL_HDA_CNL_LP,
.codec_hid = &essx_83x6,
},
+#endif
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_CANNONLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_CNL_LP,
},
-#endif
+

/* Coffelake */
#if IS_ENABLED(CONFIG_SND_SOC_SOF_COFFEELAKE)
@@ -230,11 +235,12 @@ static const struct config_entry config_table[] = {
{}
}
},
+#endif
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_COFFEELAKE) |\
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_CNL_H,
},
-#endif

#if IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE)
/* Cometlake-LP */
@@ -269,10 +275,6 @@ static const struct config_entry config_table[] = {
.device = PCI_DEVICE_ID_INTEL_HDA_CML_LP,
.codec_hid = &essx_83x6,
},
- {
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
- .device = PCI_DEVICE_ID_INTEL_HDA_CML_LP,
- },
/* Cometlake-H */
{
.flags = FLAG_SOF,
@@ -298,11 +300,17 @@ static const struct config_entry config_table[] = {
.device = PCI_DEVICE_ID_INTEL_HDA_CML_H,
.codec_hid = &essx_83x6,
},
+#endif
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_COMETLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_CML_H,
},
-#endif
+ {
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_COMETLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .device = PCI_DEVICE_ID_INTEL_HDA_CML_LP,
+ },

/* Icelake */
#if IS_ENABLED(CONFIG_SND_SOC_SOF_ICELAKE)
@@ -324,11 +332,12 @@ static const struct config_entry config_table[] = {
.device = PCI_DEVICE_ID_INTEL_HDA_ICL_LP,
.codec_hid = &essx_83x6,
},
+#endif
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_ICELAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_ICL_LP,
},
-#endif

/* Jasper Lake */
#if IS_ENABLED(CONFIG_SND_SOC_SOF_JASPERLAKE)
@@ -356,11 +365,12 @@ static const struct config_entry config_table[] = {
.device = PCI_DEVICE_ID_INTEL_HDA_JSL_N,
.codec_hid = &essx_83x6,
},
+#endif
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_JASPERLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC,
.device = PCI_DEVICE_ID_INTEL_HDA_JSL_N,
},
-#endif

/* Tigerlake */
#if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE)
@@ -388,137 +398,150 @@ static const struct config_entry config_table[] = {
.device = PCI_DEVICE_ID_INTEL_HDA_TGL_LP,
.codec_hid = &essx_83x6,
},
+#endif
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_TIGERLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_TGL_LP,
},
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_TIGERLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_TGL_H,
},
-#endif

/* Elkhart Lake */
-#if IS_ENABLED(CONFIG_SND_SOC_SOF_ELKHARTLAKE)
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_ELKHARTLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC,
.device = PCI_DEVICE_ID_INTEL_HDA_EHL_0,
},
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_ELKHARTLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC,
.device = PCI_DEVICE_ID_INTEL_HDA_EHL_3,
},
-#endif

/* Alder Lake / Raptor Lake */
#if IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE)
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF,
+ .device = PCI_DEVICE_ID_INTEL_HDA_ADL_P,
+ .dmi_table = (const struct dmi_system_id []) {
+ {
+ .ident = "Google Chromebooks",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Google"),
+ }
+ },
+ {}
+ }
+ },
+ {
+ .flags = FLAG_SOF,
+ .device = PCI_DEVICE_ID_INTEL_HDA_ADL_P,
+ .codec_hid = &essx_83x6,
+ },
+ {
+ .flags = FLAG_SOF,
+ .device = PCI_DEVICE_ID_INTEL_HDA_ADL_PS,
+ .codec_hid = &essx_83x6,
+ },
+ {
+ .flags = FLAG_SOF,
+ .device = PCI_DEVICE_ID_INTEL_HDA_ADL_N,
+ .dmi_table = (const struct dmi_system_id []) {
+ {
+ .ident = "Google Chromebooks",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Google"),
+ }
+ },
+ {}
+ }
+ },
+ {
+ .flags = FLAG_SOF,
+ .device = PCI_DEVICE_ID_INTEL_HDA_RPL_P_0,
+ .dmi_table = (const struct dmi_system_id []) {
+ {
+ .ident = "Google Chromebooks",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Google"),
+ }
+ },
+ {}
+ }
+ },
+ {
+ .flags = FLAG_SOF,
+ .device = PCI_DEVICE_ID_INTEL_HDA_RPL_P_1,
+ .dmi_table = (const struct dmi_system_id []) {
+ {
+ .ident = "Google Chromebooks",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Google"),
+ }
+ },
+ {}
+ }
+ },
+#endif
+ {
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_ALDERLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_ADL_S,
},
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_ALDERLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_RPL_S,
},
{
- .flags = FLAG_SOF,
- .device = PCI_DEVICE_ID_INTEL_HDA_ADL_P,
- .dmi_table = (const struct dmi_system_id []) {
- {
- .ident = "Google Chromebooks",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Google"),
- }
- },
- {}
- }
- },
- {
- .flags = FLAG_SOF,
- .device = PCI_DEVICE_ID_INTEL_HDA_ADL_P,
- .codec_hid = &essx_83x6,
- },
- {
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_ALDERLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_ADL_P,
},
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_ALDERLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_ADL_PX,
},
{
- .flags = FLAG_SOF,
- .device = PCI_DEVICE_ID_INTEL_HDA_ADL_PS,
- .codec_hid = &essx_83x6,
- },
- {
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_ALDERLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_ADL_PS,
},
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_ALDERLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_ADL_M,
},
{
- .flags = FLAG_SOF,
- .device = PCI_DEVICE_ID_INTEL_HDA_ADL_N,
- .dmi_table = (const struct dmi_system_id []) {
- {
- .ident = "Google Chromebooks",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Google"),
- }
- },
- {}
- }
- },
- {
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_ALDERLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_ADL_N,
},
{
- .flags = FLAG_SOF,
- .device = PCI_DEVICE_ID_INTEL_HDA_RPL_P_0,
- .dmi_table = (const struct dmi_system_id []) {
- {
- .ident = "Google Chromebooks",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Google"),
- }
- },
- {}
- }
- },
- {
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_ALDERLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_RPL_P_0,
},
{
- .flags = FLAG_SOF,
- .device = PCI_DEVICE_ID_INTEL_HDA_RPL_P_1,
- .dmi_table = (const struct dmi_system_id []) {
- {
- .ident = "Google Chromebooks",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Google"),
- }
- },
- {}
- }
- },
- {
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_ALDERLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_RPL_P_1,
},
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_ALDERLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_RPL_M,
},
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_ALDERLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_RPL_PX,
},
-#endif

/* Meteor Lake */
#if IS_ENABLED(CONFIG_SND_SOC_SOF_METEORLAKE)
@@ -536,55 +559,56 @@ static const struct config_entry config_table[] = {
{}
}
},
+#endif
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_METEORLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_MTL,
},
/* ArrowLake-S */
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_METEORLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_ARL_S,
},
/* ArrowLake */
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_METEORLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_ARL,
},
-#endif

/* Lunar Lake */
-#if IS_ENABLED(CONFIG_SND_SOC_SOF_LUNARLAKE)
/* Lunarlake-P */
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_LUNARLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_LNL_P,
},
-#endif

/* Panther Lake, Wildcat Lake */
-#if IS_ENABLED(CONFIG_SND_SOC_SOF_PANTHERLAKE)
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_PANTHERLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_PTL,
},
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_PANTHERLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_PTL_H,
},
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_PANTHERLAKE) | \
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_WCL,
},

-#endif
-
/* Nova Lake */
-#if IS_ENABLED(CONFIG_SND_SOC_SOF_NOVALAKE)
{
- .flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
+ .flags = FLAG_SOF_DEP(CONFIG_SND_SOC_SOF_NOVALAKE) |\
+ FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = PCI_DEVICE_ID_INTEL_HDA_NVL_S,
},
-#endif

};