diff --git a/src/mainboard/google/fatcat/variants/fatcat/variant.c b/src/mainboard/google/fatcat/variants/fatcat/variant.c index 3e0ee54505..a3d7e79e65 100644 --- a/src/mainboard/google/fatcat/variants/fatcat/variant.c +++ b/src/mainboard/google/fatcat/variants/fatcat/variant.c @@ -1,12 +1,13 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include +#include #include #include #include +#include #include #include -#include const char *get_wifi_sar_cbfs_filename(void) { @@ -93,3 +94,22 @@ bool variant_is_barrel_charger_present(void) else return false; } + +/* + * HDA verb table loading is supported based on the firmware configuration. + * + * This function determines if the current platform has an HDA codec enabled by + * examining the `FW_CONFIG` value. Specifically, it checks if the + * `FW_CONFIG` includes the `AUDIO_ALC256_HDA` value, which is used to identify + * Fatcat SKUs with HDA codec support. + * + * Return true if the `FW_CONFIG` indicates HDA support (i.e., contains + * `AUDIO_ALC256_HDA`), false otherwise. + */ +bool mainboard_is_hda_codec_enabled(void) +{ + if (fw_config_probe(FW_CONFIG(AUDIO, AUDIO_ALC256_HDA))) + return true; + + return false; +}