Merge changes Ib793b6ec,I8bebeaa4 into main
* changes:
Add notify status change api per vendor request
Add more parameters for picture and audio per vendor request
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl
index c29ae18..7ff333b 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl
@@ -37,7 +37,7 @@
android.hardware.tv.mediaquality.DolbyAudioProcessing.SoundMode soundMode;
boolean volumeLeveler;
boolean surroundVirtualizer;
- boolean doblyAtmos;
+ boolean dolbyAtmos;
enum SoundMode {
GAME,
MOVIE,
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
index 9b413d4..1923043 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
@@ -38,4 +38,5 @@
oneway void onParamCapabilityChanged(long pictureProfileId, in android.hardware.tv.mediaquality.ParamCapability[] caps);
oneway void onVendorParamCapabilityChanged(long pictureProfileId, in android.hardware.tv.mediaquality.VendorParamCapability[] caps);
oneway void requestPictureParameters(long pictureProfileId);
+ oneway void onStreamStatusChanged(long pictureProfileId, android.hardware.tv.mediaquality.StreamStatus status);
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureParameter.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureParameter.aidl
index c38e96f..27b587d 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureParameter.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/PictureParameter.aidl
@@ -71,4 +71,47 @@
int panelInitMaxLuminceNits;
boolean panelInitMaxLuminceValid;
android.hardware.tv.mediaquality.Gamma gamma;
+ int colorTemperatureRedGain;
+ int colorTemperatureGreenGain;
+ int colorTemperatureBlueGain;
+ int colorTemperatureRedOffset;
+ int colorTemperatureGreenOffset;
+ int colorTemperatureBlueOffset;
+ int[11] elevenPointRed;
+ int[11] elevenPointGreen;
+ int[11] elevenPointBlue;
+ android.hardware.tv.mediaquality.QualityLevel lowBlueLight;
+ android.hardware.tv.mediaquality.QualityLevel LdMode;
+ int osdRedGain;
+ int osdGreenGain;
+ int osdBlueGain;
+ int osdRedOffset;
+ int osdGreenOffset;
+ int osdBlueOffset;
+ int osdHue;
+ int osdSaturation;
+ int osdContrast;
+ boolean colorTunerSwitch;
+ int colorTunerHueRed;
+ int colorTunerHueGreen;
+ int colorTunerHueBlue;
+ int colorTunerHueCyan;
+ int colorTunerHueMagenta;
+ int colorTunerHueYellow;
+ int colorTunerHueFlesh;
+ int colorTunerSaturationRed;
+ int colorTunerSaturationGreen;
+ int colorTunerSaturationBlue;
+ int colorTunerSaturationCyan;
+ int colorTunerSaturationMagenta;
+ int colorTunerSaturationYellow;
+ int colorTunerSaturationFlesh;
+ int colorTunerLuminanceRed;
+ int colorTunerLuminanceGreen;
+ int colorTunerLuminanceBlue;
+ int colorTunerLuminanceCyan;
+ int colorTunerLuminanceMagenta;
+ int colorTunerLuminanceYellow;
+ int colorTunerLuminanceFlesh;
+ boolean activeProfile;
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/SoundParameter.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/SoundParameter.aidl
index 63eb55f..a15c0b1 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/SoundParameter.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/SoundParameter.aidl
@@ -50,4 +50,5 @@
@nullable android.hardware.tv.mediaquality.DtsVirtualX dtsVirtualX;
android.hardware.tv.mediaquality.DigitalOutput digitalOutput;
int digitalOutputDelayMs;
+ boolean activeProfile;
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/StreamStatus.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/StreamStatus.aidl
new file mode 100644
index 0000000..23e584b
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/StreamStatus.aidl
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.tv.mediaquality;
+@VintfStability
+enum StreamStatus {
+ SDR,
+ DOLBYVISION,
+ HDR10,
+ TCH,
+ HLG,
+ HDR10PLUS,
+ HDRVIVID,
+ IMAXSDR,
+ IMAXHDR10,
+ IMAXHDR10PLUS,
+ FMMSDR,
+ FMMHDR10,
+ FMMHDR10PLUS,
+ FMMHLG,
+ FMMDOLBY,
+ FMMTCH,
+ FMMHDRVIVID,
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl
index d56848c..8b8d336 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/DolbyAudioProcessing.aidl
@@ -60,5 +60,5 @@
* mixed in Dolby Atmos and a compatible sound system with upward-firing speakers
* or a Dolby Atmos soundbar.
*/
- boolean doblyAtmos;
+ boolean dolbyAtmos;
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
index c8c7e68..0e11fb0 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
@@ -18,6 +18,7 @@
import android.hardware.tv.mediaquality.ParamCapability;
import android.hardware.tv.mediaquality.PictureProfile;
+import android.hardware.tv.mediaquality.StreamStatus;
import android.hardware.tv.mediaquality.VendorParamCapability;
@VintfStability
@@ -60,4 +61,13 @@
* @param pictureProfileId The PictureProfile id that associate with the PictureProfile.
*/
void requestPictureParameters(long pictureProfileId);
+
+ /**
+ * Notifies Media Quality Manager when stream status changed.
+ *
+ * @param pictureProfileId the ID of the profile used by the media content. -1 if there
+ * is no associated profile.
+ * @param status the status of the current stream.
+ */
+ void onStreamStatusChanged(long pictureProfileId, StreamStatus status);
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureParameter.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureParameter.aidl
index b7f2a11..a4d5592 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureParameter.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/PictureParameter.aidl
@@ -253,4 +253,191 @@
/* The gamma curve used for the display. */
Gamma gamma;
+
+ /**
+ * The color gain value for color temperature adjustment.
+ * The value adjusts the intensity of color in the bright areas on the TV.
+ *
+ * The value range is from -100 to 100 where -100 would eliminate that color
+ * and 100 would significantly boost that color.
+ *
+ * The default/unmodified value is 0. No adjustment is applied to that color.
+ */
+ int colorTemperatureRedGain;
+
+ int colorTemperatureGreenGain;
+
+ int colorTemperatureBlueGain;
+
+ /**
+ * The color offset value for color temperature adjustment.
+ * This value adjusts the intensity of color in the dark areas on the TV.
+ *
+ * The value range is from -100 to 100 where -100 would eliminate that color
+ * and 100 would significantly boost that color.
+ *
+ * The default/unmodified value is 0. No adjustment is applied to that color.
+ */
+ int colorTemperatureRedOffset;
+
+ int colorTemperatureGreenOffset;
+
+ int colorTemperatureBlueOffset;
+
+ /**
+ * The parameters in this section is for 11-point white balance in advanced TV picture setting.
+ * 11-Point White Balance allows for very precise adjustment of the color temperature of the
+ * TV. It aims to make sure white looks truly white, without any unwanted color tints, across
+ * the entire range of brightness levels.
+ *
+ * The "11 points" refer to 11 different brightness levels from 0 (black) to 10 (white).
+ * At each of these points, we can fine-tune the mixture of red, green and blue to achieve
+ * neutral white.
+ *
+ * These parameters specifically control the amount of red, blue or green at each of the 11
+ * brightness points. The parameter type is an int array with a fix size of 11. The indexes
+ * 0 - 10 are the 11 different points. For example, elevenPointRed[0] adjusts the red level
+ * at the darkest black level. elevenPointRed[1] adjusts red at the next brightness level up,
+ * and so on.
+ *
+ * The value range is from 0 - 100 for each indexes, where 0 is the minimum intensity of
+ * that color(red, green, blue) at a specific brightness point and 100 is the maximum intensity
+ * of that color at that point.
+ *
+ * The default/unmodified value is 50. It can be other values depends on different TVs.
+ */
+ int[11] elevenPointRed;
+
+ int[11] elevenPointGreen;
+
+ int[11] elevenPointBlue;
+
+ /**
+ * Adjust gamma blue gain/offset.
+ *
+ * The default value is middle. Can be different depends on different TVs.
+ */
+ QualityLevel lowBlueLight;
+
+ /**
+ * Advance setting for local dimming level.
+ *
+ * The default value is off. Can be different depends on different TVs.
+ */
+ QualityLevel LdMode;
+
+ /**
+ * The parameter in this section is for on-screen display color gain and offset.
+ *
+ * Color gain is to adjust the intensity of that color (red, blue, green) in the brighter
+ * part of the image.
+ * Color offset is to adjust the intensity of that color in the darker part of the image.
+ *
+ * For example, increase OSD (on-screen display) red gain will make brighter reds even more
+ * intense, while decreasing it will make them less vibrant. Increase OSD red offset will add
+ * more red to the darker areas, while decreasing it will reduce the red in the shadows.
+ *
+ * The value range is from 0 to 2047. (11-bit resolution for the adjustment)
+ * The default value depends on different TVs.
+ */
+ int osdRedGain;
+
+ int osdGreenGain;
+
+ int osdBlueGain;
+
+ int osdRedOffset;
+
+ int osdGreenOffset;
+
+ int osdBlueOffset;
+
+ /* The value range is 0-100 */
+ int osdHue;
+
+ /* The value range is 0-255 */
+ int osdSaturation;
+
+ int osdContrast;
+
+ /**
+ * Enable/disable color tuner.
+ *
+ * The color tuner can adjust color temperature and picture color.
+ * The default is enabled.
+ */
+ boolean colorTunerSwitch;
+
+ /**
+ * The parameters in this section adjust the hue of each color.
+ *
+ * For example, increase colorTunerHueRed will make the image more purplish-red or more
+ * orange-red. increase colorTunerHueGreen will make the image more yellowish-green or
+ * more bluish-green. Flesh is a special one, it can make skin tones appear warmer (reddish)
+ * or cooler (more yellowish).
+ *
+ * The value range is from 0 - 100, and the default value is 50.
+ */
+ int colorTunerHueRed;
+
+ int colorTunerHueGreen;
+
+ int colorTunerHueBlue;
+
+ int colorTunerHueCyan;
+
+ int colorTunerHueMagenta;
+
+ int colorTunerHueYellow;
+
+ int colorTunerHueFlesh;
+
+ /**
+ * The parameters in this section adjust the saturation of each color.
+ *
+ * For example, increase colorTunerSaturationBlue will make the color blue more deeper
+ * and richer. Decrease will make the color blue more washed-out blues.
+ *
+ * The value range is from 0 -100, and the default value is 50.
+ */
+ int colorTunerSaturationRed;
+
+ int colorTunerSaturationGreen;
+
+ int colorTunerSaturationBlue;
+
+ int colorTunerSaturationCyan;
+
+ int colorTunerSaturationMagenta;
+
+ int colorTunerSaturationYellow;
+
+ int colorTunerSaturationFlesh;
+
+ /**
+ * The parameters in this section adjust the luminance (brightness) of each color.
+ *
+ * For example, increase colorTunerLuminanceRed will makes red appear brighter. Decrease
+ * will makes red appear darker.
+ *
+ * The value range is from 0 -100, and the default value is 50.
+ */
+ int colorTunerLuminanceRed;
+
+ int colorTunerLuminanceGreen;
+
+ int colorTunerLuminanceBlue;
+
+ int colorTunerLuminanceCyan;
+
+ int colorTunerLuminanceMagenta;
+
+ int colorTunerLuminanceYellow;
+
+ int colorTunerLuminanceFlesh;
+
+ /**
+ * Determines whether the current profile is actively in use or not.
+ */
+ boolean activeProfile;
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/SoundParameter.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/SoundParameter.aidl
index 4714ad2..6feb7c0 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/SoundParameter.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/SoundParameter.aidl
@@ -92,4 +92,9 @@
/* Digital output delay in ms. */
int digitalOutputDelayMs;
+
+ /**
+ * Determines whether the current profile is actively in use or not.
+ */
+ boolean activeProfile;
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/StreamStatus.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/StreamStatus.aidl
new file mode 100644
index 0000000..ec3b995
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/StreamStatus.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.tv.mediaquality;
+
+@VintfStability
+enum StreamStatus {
+ SDR,
+ DOLBYVISION,
+ HDR10,
+ TCH,
+ HLG,
+ HDR10PLUS,
+ HDRVIVID,
+ IMAXSDR,
+ IMAXHDR10,
+ IMAXHDR10PLUS,
+ FMMSDR,
+ FMMHDR10,
+ FMMHDR10PLUS,
+ FMMHLG,
+ FMMDOLBY,
+ FMMTCH,
+ FMMHDRVIVID,
+}
diff --git a/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp b/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
index 3be471b..f785cad 100644
--- a/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
+++ b/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
@@ -29,6 +29,7 @@
#include <aidl/android/hardware/tv/mediaquality/SoundParameter.h>
#include <aidl/android/hardware/tv/mediaquality/SoundParameters.h>
#include <aidl/android/hardware/tv/mediaquality/SoundProfile.h>
+#include <aidl/android/hardware/tv/mediaquality/StreamStatus.h>
#include <android/binder_auto_utils.h>
#include <android/binder_manager.h>
@@ -51,6 +52,7 @@
using aidl::android::hardware::tv::mediaquality::SoundParameter;
using aidl::android::hardware::tv::mediaquality::SoundParameters;
using aidl::android::hardware::tv::mediaquality::SoundProfile;
+using aidl::android::hardware::tv::mediaquality::StreamStatus;
using aidl::android::hardware::tv::mediaquality::VendorParamCapability;
using aidl::android::hardware::tv::mediaquality::VendorParameterIdentifier;
using android::ProcessState;
@@ -97,6 +99,8 @@
ScopedAStatus requestPictureParameters(int64_t) { return ScopedAStatus::ok(); }
+ ScopedAStatus onStreamStatusChanged(int64_t, StreamStatus) { return ScopedAStatus::ok(); }
+
private:
std::function<void(const PictureProfile& pictureProfile)> on_hal_picture_profile_adjust_;
};