Attention is currently required from: Avi Uday, Jayvik Desai, Kapil Porwal, Pranava Y N.
Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/87462?usp=email )
Change subject: mainboard/google/fatcat: Conditional ALC256 HDA init for fatcat variant ......................................................................
mainboard/google/fatcat: Conditional ALC256 HDA init for fatcat variant
This commit implements `mainboard_hda_init()` for the Google Fatcat mainboard variant. This overrides the default weak HDA common initialization.
Initialization of the High Definition Audio (HDA) controller, managed by `azalia_audio_init()` (which handles HDA verb table loading), is now conditional. It proceeds only if the firmware config `FW_CONFIG(AUDIO, AUDIO_ALC256_HDA)` is set. This value (3) specifically targets the ALC256 HDA codec.
This change ensures that HDA verb tables are loaded only when the ALC256 HDA codec is actively configured for the Fatcat variant. Crucially, this prevents attempts to incorrectly load HDA verbs for other audio interfaces, like SoundWire (SNDW) or I2S, which might be present in different Fatcat hardware configurations.
The headers `device/azalia_device.h` and `intelblocks/hda.h` were added for this. As a minor stylistic update, header inclusions in this file were also alphabetized.
BUG=b:413638298 TEST=Verified HDA verb table loading is skipped on Fatcat platforms when configured with non-HDA audio codecs (e.g., SNDW, I2S), and proceeds as expected when ALC256 HDA is configured.
Change-Id: Ifc158b7d15c763cc07d28154259b7e64709bea16 Signed-off-by: Subrata Banik subratabanik@google.com --- M src/mainboard/google/fatcat/variants/fatcat/variant.c 1 file changed, 9 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/62/87462/1
diff --git a/src/mainboard/google/fatcat/variants/fatcat/variant.c b/src/mainboard/google/fatcat/variants/fatcat/variant.c index 3e0ee54..4766c26 100644 --- a/src/mainboard/google/fatcat/variants/fatcat/variant.c +++ b/src/mainboard/google/fatcat/variants/fatcat/variant.c @@ -1,12 +1,14 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <baseboard/variants.h> +#include <device/azalia_device.h> +#include <drivers/intel/touch/chip.h> #include <ec/google/chromeec/ec.h> #include <fsp/api.h> #include <fw_config.h> +#include <intelblocks/hda.h> #include <sar.h> #include <soc/gpio_soc_defs.h> -#include <drivers/intel/touch/chip.h>
const char *get_wifi_sar_cbfs_filename(void) { @@ -93,3 +95,9 @@ else return false; } + +void mainboard_hda_init(struct device *dev) +{ + if (fw_config_probe(FW_CONFIG(AUDIO, AUDIO_ALC256_HDA))) + azalia_audio_init(dev); +}