Paul2 Huang has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59856 )
Change subject: mb/google/octopus: add audio codec into SSFC support for ApelE ......................................................................
mb/google/octopus: add audio codec into SSFC support for ApelE
Add ALC5682I-VS codec support
BUG=b:198722640 BRANCH=octopus TEST=Set CBI SSFC BIT9-11 to select codec, and test audio work
Change-Id: I80be12d88e100ce8586371fc49b36447859e24f8 --- M src/mainboard/google/octopus/mainboard.c M src/mainboard/google/octopus/variants/baseboard/include/baseboard/cbi_ssfc.h 2 files changed, 16 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/56/59856/1
diff --git a/src/mainboard/google/octopus/mainboard.c b/src/mainboard/google/octopus/mainboard.c index 9ffd633..fac4250 100644 --- a/src/mainboard/google/octopus/mainboard.c +++ b/src/mainboard/google/octopus/mainboard.c @@ -209,6 +209,21 @@ continue; }
+ if ((audio_dev->chip_ops == &drivers_i2c_generic_ops) && + (codec == SSFC_AUDIO_CODEC_RT5682_VS)) { + struct drivers_i2c_generic_config *cfg = + audio_dev->chip_info; + + if (cfg != NULL && !strcmp(cfg->hid, "10EC5682")) { + cfg->hid = "RTL5682"; + printk(BIOS_INFO, "enable RT5682 VS.\n"); + continue; + } else if (cfg != NULL && !strcmp(cfg->hid, "RTL5682")) { + printk(BIOS_INFO, "enable RT5682 VS.\n"); + continue; + } + } + printk(BIOS_INFO, "%s has been disabled\n", audio_dev->chip_ops->name); audio_dev->enabled = 0; } diff --git a/src/mainboard/google/octopus/variants/baseboard/include/baseboard/cbi_ssfc.h b/src/mainboard/google/octopus/variants/baseboard/include/baseboard/cbi_ssfc.h index cef047a..cd160ba 100644 --- a/src/mainboard/google/octopus/variants/baseboard/include/baseboard/cbi_ssfc.h +++ b/src/mainboard/google/octopus/variants/baseboard/include/baseboard/cbi_ssfc.h @@ -30,6 +30,7 @@ SSFC_AUDIO_CODEC_DA7219, SSFC_AUDIO_CODEC_RT5682, SSFC_AUDIO_CODEC_CS42L42, + SSFC_AUDIO_CODEC_RT5682_VS, }; #define SSFC_AUDIO_CODEC_OFFSET 9 #define SSFC_AUDIO_CODEC_MASK 0x7