From c9b646025d9f155509a6cda1c292bfd120daeb9e Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Sat, 24 Jul 2021 22:59:12 +0200 Subject: [PATCH] platform-profile: Add support for 'quiet' profile --- src/ppd-driver-platform-profile.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ppd-driver-platform-profile.c b/src/ppd-driver-platform-profile.c index 1da5a75..8111251 100644 --- a/src/ppd-driver-platform-profile.c +++ b/src/ppd-driver-platform-profile.c @@ -59,7 +59,9 @@ profile_to_acpi_platform_profile_value (PpdDriverPlatformProfile *self, case PPD_PROFILE_POWER_SAVER: if (g_strv_contains ((const char * const*) self->profile_choices, "low-power")) return "low-power"; - return "cool"; + if (g_strv_contains ((const char * const*) self->profile_choices, "cool")) + return "cool"; + return "quiet"; case PPD_PROFILE_BALANCED: return "balanced"; case PPD_PROFILE_PERFORMANCE: @@ -141,7 +143,8 @@ verify_acpi_platform_profile_choices (PpdDriverPlatformProfile *self) const char * const *choices = (const char * const*) self->profile_choices; if ((g_strv_contains (choices, "low-power") || - g_strv_contains (choices, "cool")) && + g_strv_contains (choices, "cool") || + g_strv_contains (choices, "quiet")) && g_strv_contains (choices, "balanced") && g_strv_contains (choices, "performance")) return PPD_PROBE_RESULT_SUCCESS; -- GitLab