Attention is currently required from: Anson Tseng, Frank Chu, Nick Vaccaro, Zhuohao Lee. Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59557 )
Change subject: mb/google/volteer/var/delbin: Add fw_config probe for ALC5682-VD & VS ......................................................................
Patch Set 6:
(2 comments)
File src/mainboard/google/volteer/variants/delbin/overridetree.cb:
https://review.coreboot.org/c/coreboot/+/59557/comment/371dd19a_7897f1cb PS6, Line 148: device i2c 1a on end suggestion: if you add an alias here, you can simplify the variant.c code quite a bit, I will show you. change this to: `device i2c 1a alias audio_codec on end`
File src/mainboard/google/volteer/variants/delbin/variant.c:
https://review.coreboot.org/c/coreboot/+/59557/comment/dbdb0515_1422376d PS6, Line 7: : extern struct chip_operations drivers_i2c_generic_ops; : static void audio_codec_update(void) : { : const struct device_path codec_path[] = { : {.type = DEVICE_PATH_PCI, .pci.devfn = PCH_DEVFN_I2C0}, : {.type = DEVICE_PATH_I2C, .i2c.device = 0x1a} : }; : const struct device *codec = : find_dev_nested_path(pci_root_bus(), codec_path, ARRAY_SIZE(codec_path)); : struct drivers_i2c_generic_config *config; : : if (!codec || (codec->chip_ops != &drivers_i2c_generic_ops) || !codec->chip_info) : return; : config = codec->chip_info; : : if (fw_config_probe(FW_CONFIG(AUDIO_CODEC_SOURCE, AUDIO_CODEC_ALC5682))) : config->hid = "10EC5682"; : else if (fw_config_probe(FW_CONFIG(AUDIO_CODEC_SOURCE, AUDIO_CODEC_ALC5682I_VS))) : config->hid = "RTL5682"; if you add the alias above, you should be able to simplify this to (untested): ``` static void audio_codec_update(void) { const struct device *codec = DEV_PTR(audio_codec); struct drivers_i2c_generic_config *config;
config = codec->chip_info; if (fw_config_probe(FW_CONFIG(AUDIO_CODEC_SOURCE, AUDIO_CODEC_ALC5682))) config->hid = "10EC5682"; else config->hid = "RTL5682"; ```