mb/google/fatcat/var/francka: Conditionally init HDA
This commit implements `mainboard_is_hda_codec_enabled` for the Google
Francka 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_ALC256M_CG_HDA)` is set. This targets the
ALC256M-CG HDA codec.
This change ensures that HDA verb tables are loaded only when the
ALC256M-CG HDA codec is actively configured for the Francka variant.
Crucially, this prevents attempts to incorrectly load HDA verbs for
other audio interfaces, like SoundWire (SNDW), which might be present
in different Francka hardware configurations.
The header `intelblocks/hda.h` added to support this HDA initialization
logic.
BUG=b:ENTER_FRANCKA_BUG_ID_HERE
TEST=Verified HDA verb table loading is skipped on Francka platforms
when configured with non-HDA audio codecs (e.g., SNDW),
and proceeds as expected when ALC256M-CG HDA is configured
Change-Id: Idbc506c1ad180c7e8ecdec51c3491e6f0518204c
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87463
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Pranava Y N <pranavayn@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
This commit is contained in:
parent
e545494f6d
commit
2e387e13f5
1 changed files with 20 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include <baseboard/variants.h>
|
||||
#include <fsp/api.h>
|
||||
#include <fw_config.h>
|
||||
#include <intelblocks/hda.h>
|
||||
|
||||
void variant_update_soc_memory_init_params(FSPM_UPD *memupd)
|
||||
{
|
||||
|
|
@ -15,3 +16,22 @@ void variant_update_soc_memory_init_params(FSPM_UPD *memupd)
|
|||
m_cfg->PchHdaSdiEnable[1] = 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_ALC256M_CG_HDA` value, which is used to identify
|
||||
* Francka SKUs with HDA codec support.
|
||||
*
|
||||
* Return true if the `FW_CONFIG` indicates HDA support (i.e., contains
|
||||
* `AUDIO_ALC256M_CG_HDA`), false otherwise.
|
||||
*/
|
||||
bool mainboard_is_hda_codec_enabled(void)
|
||||
{
|
||||
if (fw_config_probe(FW_CONFIG(AUDIO, AUDIO_ALC256M_CG_HDA)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue