aboutsummaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@gmail.com>2023-01-17 13:51:29 -0600
committerMatt DeVillier <matt.devillier@amd.corp-partner.google.com>2023-05-05 15:38:53 +0000
commit1db8c57470f373787448d8fb8961b0dc1208a953 (patch)
tree0671fc7de6fef5690a199b524a59d5bf04d5f7cb /src/drivers
parentb78e4620375cc5668db668d900340fd89271c330 (diff)
vc/google: Decouple DSM_CALIB from CHROMEOS
DSM (Dynamic Speaker Management) uses calibration parameters stored in a VPD (Vital Product Data) FMAP region to configure the audio output via an ACPI _DSD table. This has no dependency on a ChromeOS, and can be used by Linux/Windows drivers if appropriately configured. Remove the dependency of DSM_CALIB (and the calibration file) on CHROMEOS and replace it with VPD, so that non-CHROMEOS builds can utilize this feature as well. Move files from underneath vc/google/chromeos to underscore the point. TEST=build/boot google/nightfury, dump ACPI, verify DSM calibraton parameters present in _DSD table. Change-Id: I643b3581bcc662befc9e30736dae806f94b055af Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/74812 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: CoolStar <coolstarorganization@gmail.com> Reviewed-by: Sean Rhodes <sean@starlabs.systems> Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/i2c/max98390/max98390.c6
-rw-r--r--src/drivers/i2c/rt1011/rt1011.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/drivers/i2c/max98390/max98390.c b/src/drivers/i2c/max98390/max98390.c
index 9786e2bc13..11acd22829 100644
--- a/src/drivers/i2c/max98390/max98390.c
+++ b/src/drivers/i2c/max98390/max98390.c
@@ -8,7 +8,7 @@
#include <device/path.h>
#include <identity.h>
#include <stdint.h>
-#include <vendorcode/google/chromeos/chromeos.h>
+#include <vendorcode/google/dsm_calib.h>
#include "chip.h"
#define MAX98390_ACPI_HID "MX98390"
@@ -47,7 +47,7 @@ static void max98390_fill_ssdt(const struct device *dev)
acpigen_write_resourcetemplate_footer();
/* Device Properties */
- if (CONFIG(CHROMEOS_DSM_CALIB)) {
+ if (CONFIG(GOOGLE_DSM_CALIB)) {
if (get_dsm_calibration_from_key(config->r0_calib_key, &r0_value)
|| get_dsm_calibration_from_key(config->temperature_calib_key,
&temp_value)) {
@@ -63,7 +63,7 @@ static void max98390_fill_ssdt(const struct device *dev)
}
}
- if (CONFIG(CHROMEOS_DSM_PARAM_FILE_NAME)) {
+ if (CONFIG(GOOGLE_DSM_PARAM_FILE_NAME)) {
if (config->dsm_param_file_name) {
if (!dp)
dp = acpi_dp_new_table("_DSD");
diff --git a/src/drivers/i2c/rt1011/rt1011.c b/src/drivers/i2c/rt1011/rt1011.c
index 6977d95f51..9a21748e53 100644
--- a/src/drivers/i2c/rt1011/rt1011.c
+++ b/src/drivers/i2c/rt1011/rt1011.c
@@ -7,7 +7,7 @@
#include <device/device.h>
#include <device/path.h>
#include <stdint.h>
-#include <vendorcode/google/chromeos/chromeos.h>
+#include <vendorcode/google/dsm_calib.h>
#include "chip.h"
#define RT1011_ACPI_HID "10EC1011"
@@ -45,7 +45,7 @@ static void rt1011_fill_ssdt(const struct device *dev)
acpigen_write_resourcetemplate_footer();
/* Device Properties */
- if (CONFIG(CHROMEOS_DSM_CALIB)) {
+ if (CONFIG(GOOGLE_DSM_CALIB)) {
if (get_dsm_calibration_from_key(config->r0_calib_key, &r0_value)
|| get_dsm_calibration_from_key(config->temperature_calib_key,
&temp_value)) {