Debian Codegraph @

src/mainboard/google/fatcat/variants/francka/variant.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <baseboard/variants.h>
4 #include <fsp/api.h>
5 #include <fw_config.h>
6 #include <intelblocks/hda.h>
7
8 void variant_update_soc_memory_init_params(FSPM_UPD *memupd)
9 {
10 FSP_M_CONFIG *m_cfg = &memupd->FspmConfig;
11
12 /* HDA Audio */
13 if (fw_config_probe(FW_CONFIG(AUDIO, AUDIO_ALC256M_CG_HDA))) {
14 printk(BIOS_INFO, "Overriding HDA SDI lanes.\n");
15 m_cfg->PchHdaSdiEnable[0] = true;
16 m_cfg->PchHdaSdiEnable[1] = false;
17 }
18 }
19
20 /*
21 * HDA verb table loading is supported based on the firmware configuration.
22 *
23 * This function determines if the current platform has an HDA codec enabled by
24 * examining the `FW_CONFIG` value. Specifically, it checks if the
25 * `FW_CONFIG` includes the `AUDIO_ALC256M_CG_HDA` value, which is used to identify
26 * Francka SKUs with HDA codec support.
27 *
28 * Return true if the `FW_CONFIG` indicates HDA support (i.e., contains
29 * `AUDIO_ALC256M_CG_HDA`), false otherwise.
30 */
31 bool mainboard_is_hda_codec_enabled(void)
32 {
33 if (fw_config_probe(FW_CONFIG(AUDIO, AUDIO_ALC256M_CG_HDA)))
34 return true;
35
36 return false;
37 }