Malik Hsu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59367 )
Change subject: mb/google/brya/variants/primus: add fw_config_probe for ALC5682I-VS ......................................................................
mb/google/brya/variants/primus: add fw_config_probe for ALC5682I-VS
Added fw_config_probe method to distinguish different audio codecs to facilitate the use of different topology files by the OS.
BUG=b:205883511 TEST=emerge-brya coreboot chromeos-bootimage and check audio function
Signed-off-by: Malik_Hsu malik_hsu@wistron.corp-partner.google.com Change-Id: I0d5b95e89154b2cb6b371f24cc1b151c23ff642f --- M src/mainboard/google/brya/variants/primus/overridetree.cb M src/mainboard/google/brya/variants/primus/variant.c 2 files changed, 6 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/59367/1
diff --git a/src/mainboard/google/brya/variants/primus/overridetree.cb b/src/mainboard/google/brya/variants/primus/overridetree.cb index 48319b7..dd68a06 100644 --- a/src/mainboard/google/brya/variants/primus/overridetree.cb +++ b/src/mainboard/google/brya/variants/primus/overridetree.cb @@ -14,6 +14,7 @@ field AUDIO 8 10 option AUDIO_UNKNOWN 0 option MAX98360_ALC5682I_I2S 1 + option MAX98360_ALC5682I_VS_I2S 2 end field DB_LTE 11 12 option LTE_ABSENT 0 diff --git a/src/mainboard/google/brya/variants/primus/variant.c b/src/mainboard/google/brya/variants/primus/variant.c index b783ac0..09f88df 100644 --- a/src/mainboard/google/brya/variants/primus/variant.c +++ b/src/mainboard/google/brya/variants/primus/variant.c @@ -4,6 +4,7 @@ #include <boardid.h> #include <device/device.h> #include <drivers/i2c/hid/chip.h> +#include <fw_config.h>
static void devtree_update_emmc_rtd3(uint32_t board_ver) { @@ -21,9 +22,10 @@
if (board_ver <= 1) return; - - config->hid = "RTL5682"; - audio_codec->enabled = 1; + if(fw_config_probe(FW_CONFIG(AUDIO, MAX98360_ALC5682I_VS_I2S))){ + config->hid = "RTL5682"; + audio_codec->enabled = 1; + } }
void variant_devtree_update(void)