[MQ HAL] Add prarmeter capability APIs
Test: mmm
Flag: android.media.tv.flags.media_quality_fw
Bug: 375472716
Change-Id: Ie459114d0a1fe22d08610a78dbfce68621bcc9e9
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl
index 7215464..9a15d15 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl
@@ -53,4 +53,6 @@
android.hardware.tv.mediaquality.ISoundProfileChangedListener getSoundProfileListener();
void setSoundProfileAdjustmentListener(android.hardware.tv.mediaquality.ISoundProfileAdjustmentListener listener);
android.hardware.tv.mediaquality.SoundParameters getSoundParameters(long soundProfileId);
+ void getParamCaps(in android.hardware.tv.mediaquality.ParameterName[] paramNames, out android.hardware.tv.mediaquality.ParamCapability[] caps);
+ void getVendorParamCaps(in android.hardware.tv.mediaquality.VendorParameterIdentifier[] names, out android.hardware.tv.mediaquality.VendorParamCapability[] caps);
}
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 ae3d391..6339377 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
@@ -35,4 +35,6 @@
@VintfStability
interface IPictureProfileAdjustmentListener {
oneway void onPictureProfileAdjusted(in android.hardware.tv.mediaquality.PictureProfile pictureProfile);
+ oneway void onParamCapabilityChanged(long pictureProfileId, in android.hardware.tv.mediaquality.ParamCapability[] caps);
+ oneway void onVendorParamCapabilityChanged(long pictureProfileId, in android.hardware.tv.mediaquality.VendorParamCapability[] caps);
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
index ceebb1b..1006349 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
@@ -35,4 +35,6 @@
@VintfStability
interface ISoundProfileAdjustmentListener {
oneway void onSoundProfileAdjusted(in android.hardware.tv.mediaquality.SoundProfile soundProfile);
+ oneway void onParamCapabilityChanged(long soundProfileId, in android.hardware.tv.mediaquality.ParamCapability[] caps);
+ oneway void onVendorParamCapabilityChanged(long soundProfileId, in android.hardware.tv.mediaquality.VendorParamCapability[] caps);
}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/NumberRange.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/NumberRange.aidl
new file mode 100644
index 0000000..9fc9d0d
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/NumberRange.aidl
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 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
+union NumberRange {
+ @nullable int[2] intMinMax;
+ @nullable long[2] longMinMax;
+ @nullable double[2] doubleMinMax;
+ @nullable int[] intValuesSupported;
+ @nullable long[] longValuesSupported;
+ @nullable double[] doubleValuesSupported;
+}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ParamCapability.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ParamCapability.aidl
new file mode 100644
index 0000000..c60f1d1
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ParamCapability.aidl
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 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
+parcelable ParamCapability {
+ android.hardware.tv.mediaquality.ParameterName name;
+ boolean isSupported;
+ @nullable android.hardware.tv.mediaquality.ParameterDefaultValue defaultValue;
+ @nullable android.hardware.tv.mediaquality.ParameterRange range;
+}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ParameterDefaultValue.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ParameterDefaultValue.aidl
new file mode 100644
index 0000000..14e5ff4
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ParameterDefaultValue.aidl
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 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
+union ParameterDefaultValue {
+ int intDefault;
+ long longDefault;
+ double doubleDefault;
+ String stringDefault;
+}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ParameterName.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ParameterName.aidl
new file mode 100644
index 0000000..711e270
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ParameterName.aidl
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 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 ParameterName {
+ BRIGHTNESS,
+ CONTRAST,
+ SHARPNESS,
+ SATURATION,
+ HUE,
+ COLOR_TUNER_BRIGHTNESS,
+ COLOR_TUNER_SATURATION,
+ COLOR_TUNER_HUE,
+ COLOR_TUNER_RED_OFFSET,
+ COLOR_TUNER_GREEN_OFFSET,
+ COLOR_TUNER_BLUE_OFFSET,
+ COLOR_TUNER_RED_GAIN,
+ COLOR_TUNER_GREEN_GAIN,
+ COLOR_TUNER_BLUE_GAIN,
+ NOISE_REDUCTION,
+ MPEG_NOISE_REDUCTION,
+ FLASH_TONE,
+ DE_CONTOUR,
+ DYNAMIC_LUMA_CONTROL,
+ FILM_MODE,
+ BLACK_STRETCH,
+ BLUE_STRETCH,
+ COLOR_TUNE,
+ COLOR_TEMPERATURE,
+ GLOBE_DIMMING,
+ AUTO_PICTUREQUALITY_ENABLED,
+ AUTO_SUPER_RESOLUTION_ENABLED,
+ BALANCE,
+ BASS,
+ TREBLE,
+ SURROUND_SOUND_ENABLED,
+ EQUALIZER_DETAIL,
+ SPEAKERS_ENABLED,
+ SPEAKERS_DELAY_MS,
+ ENHANCED_AUDIO_RETURN_CHANNEL_ENABLED,
+ AUTO_VOLUME_CONTROL,
+ DOWNMIX_MODE,
+ DTS_DRC,
+ DOLBY_AUDIO_PROCESSING,
+ DOLBY_DIALOGUE_ENHANCER,
+ DTS_VIRTUAL_X,
+ DIGITAL_OUTPUT,
+ DIGITAL_OUTPUT_DELAY_MS,
+}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ParameterRange.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ParameterRange.aidl
new file mode 100644
index 0000000..66bc405
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ParameterRange.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 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
+parcelable ParameterRange {
+ android.hardware.tv.mediaquality.NumberRange numRange;
+ ParcelableHolder vendorDefinedValues;
+}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/VendorParamCapability.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/VendorParamCapability.aidl
new file mode 100644
index 0000000..9cf29a5
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/VendorParamCapability.aidl
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 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
+parcelable VendorParamCapability {
+ ParcelableHolder name;
+ boolean isSupported;
+ @nullable android.hardware.tv.mediaquality.ParameterDefaultValue defaultValue;
+ @nullable android.hardware.tv.mediaquality.ParameterRange range;
+}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/VendorParameterIdentifier.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/VendorParameterIdentifier.aidl
new file mode 100644
index 0000000..016c22d
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/VendorParameterIdentifier.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 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
+parcelable VendorParameterIdentifier {
+ ParcelableHolder identifier;
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.aidl
index f15d3c6..028621a 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.aidl
@@ -22,8 +22,12 @@
import android.hardware.tv.mediaquality.IPictureProfileChangedListener;
import android.hardware.tv.mediaquality.ISoundProfileAdjustmentListener;
import android.hardware.tv.mediaquality.ISoundProfileChangedListener;
+import android.hardware.tv.mediaquality.ParamCapability;
+import android.hardware.tv.mediaquality.ParameterName;
import android.hardware.tv.mediaquality.PictureParameters;
import android.hardware.tv.mediaquality.SoundParameters;
+import android.hardware.tv.mediaquality.VendorParamCapability;
+import android.hardware.tv.mediaquality.VendorParameterIdentifier;
/**
* Interface for the media quality service
@@ -178,4 +182,14 @@
* @return SoundParameters with all the pre-defined parameters and vendor defined parameters.
*/
SoundParameters getSoundParameters(long soundProfileId);
+
+ /**
+ * Gets capability information of the given parameters.
+ */
+ void getParamCaps(in ParameterName[] paramNames, out ParamCapability[] caps);
+
+ /**
+ * Gets vendor capability information of the given parameters.
+ */
+ void getVendorParamCaps(in VendorParameterIdentifier[] names, out VendorParamCapability[] caps);
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
index 52759f7..806d90d 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
@@ -16,7 +16,9 @@
package android.hardware.tv.mediaquality;
+import android.hardware.tv.mediaquality.ParamCapability;
import android.hardware.tv.mediaquality.PictureProfile;
+import android.hardware.tv.mediaquality.VendorParamCapability;
@VintfStability
oneway interface IPictureProfileAdjustmentListener {
@@ -26,4 +28,22 @@
* @param pictureProfile Picture profile.
*/
void onPictureProfileAdjusted(in PictureProfile pictureProfile);
+
+ /**
+ * Notifies Media Quality Manager when parameter capabilities changed.
+ *
+ * @param pictureProfileId the ID of the profile used by the media content. -1 if there
+ * is no associated profile.
+ * @param caps the updated capabilities.
+ */
+ void onParamCapabilityChanged(long pictureProfileId, in ParamCapability[] caps);
+
+ /**
+ * Notifies Media Quality Manager when venfor parameter capabilities changed.
+ *
+ * @param pictureProfileId the ID of the profile used by the media content. -1 if there
+ * is no associated profile.
+ * @param caps the updated vendor capabilities.
+ */
+ void onVendorParamCapabilityChanged(long pictureProfileId, in VendorParamCapability[] caps);
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
index fd41352..5ee9d86 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
@@ -16,7 +16,9 @@
package android.hardware.tv.mediaquality;
+import android.hardware.tv.mediaquality.ParamCapability;
import android.hardware.tv.mediaquality.SoundProfile;
+import android.hardware.tv.mediaquality.VendorParamCapability;
@VintfStability
oneway interface ISoundProfileAdjustmentListener {
@@ -26,4 +28,22 @@
* @param soundProfile Sound profile.
*/
void onSoundProfileAdjusted(in SoundProfile soundProfile);
+
+ /**
+ * Notifies Media Quality Manager when parameter capabilities changed.
+ *
+ * @param soundProfileId the ID of the profile used by the media content. -1 if there
+ * is no associated profile.
+ * @param caps the updated capabilities.
+ */
+ void onParamCapabilityChanged(long soundProfileId, in ParamCapability[] caps);
+
+ /**
+ * Notifies Media Quality Manager when venfor parameter capabilities changed.
+ *
+ * @param soundProfileId the ID of the profile used by the media content. -1 if there
+ * is no associated profile.
+ * @param caps the updated vendor capabilities.
+ */
+ void onVendorParamCapabilityChanged(long soundProfileId, in VendorParamCapability[] caps);
}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/NumberRange.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/NumberRange.aidl
new file mode 100644
index 0000000..94a041c
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/NumberRange.aidl
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 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;
+
+/** Parameter supported number range **/
+@VintfStability
+union NumberRange {
+ /** Min value and max value of an int parameter. Inclusive. */
+ @nullable int[2] intMinMax;
+ /** Min value and max value of a long parameter. Inclusive. */
+ @nullable long[2] longMinMax;
+ /** Min value and max value of a double parameter. Inclusive. */
+ @nullable double[2] doubleMinMax;
+
+ /** An array of supported int values. */
+ @nullable int[] intValuesSupported;
+ /** An array of supported long values. */
+ @nullable long[] longValuesSupported;
+ /** An array of supported double values. */
+ @nullable double[] doubleValuesSupported;
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ParamCapability.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ParamCapability.aidl
new file mode 100644
index 0000000..933a1a3
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ParamCapability.aidl
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 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;
+
+import android.hardware.tv.mediaquality.ParameterDefaultValue;
+import android.hardware.tv.mediaquality.ParameterName;
+import android.hardware.tv.mediaquality.ParameterRange;
+/**
+ * Capability of parameters.
+ */
+@VintfStability
+parcelable ParamCapability {
+ /** Name of the parameter **/
+ ParameterName name;
+
+ /** true if this parameter is supported **/
+ boolean isSupported;
+
+ /**
+ * Default value of this parameter. null if there is no default value.
+ */
+ @nullable ParameterDefaultValue defaultValue;
+
+ /**
+ * The supported range of this parameter. null if there is no specific range.
+ */
+ @nullable ParameterRange range;
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ParameterDefaultValue.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ParameterDefaultValue.aidl
new file mode 100644
index 0000000..3827134
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ParameterDefaultValue.aidl
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 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;
+
+/** Parameter default value **/
+@VintfStability
+union ParameterDefaultValue {
+ int intDefault;
+ long longDefault;
+ double doubleDefault;
+ String stringDefault;
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ParameterName.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ParameterName.aidl
new file mode 100644
index 0000000..0a3c97b
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ParameterName.aidl
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 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;
+
+/**
+ * Parameter names.
+ * <p>Details of the parameters can be found at
+ * android.hardware.tv.mediaquality.PictureParameter and
+ * android.hardware.tv.mediaquality.SoundParameter.
+ */
+@VintfStability
+enum ParameterName {
+ BRIGHTNESS,
+ CONTRAST,
+ SHARPNESS,
+ SATURATION,
+ HUE,
+ COLOR_TUNER_BRIGHTNESS,
+ COLOR_TUNER_SATURATION,
+ COLOR_TUNER_HUE,
+ COLOR_TUNER_RED_OFFSET,
+ COLOR_TUNER_GREEN_OFFSET,
+ COLOR_TUNER_BLUE_OFFSET,
+ COLOR_TUNER_RED_GAIN,
+ COLOR_TUNER_GREEN_GAIN,
+ COLOR_TUNER_BLUE_GAIN,
+ NOISE_REDUCTION,
+ MPEG_NOISE_REDUCTION,
+ FLASH_TONE,
+ DE_CONTOUR,
+ DYNAMIC_LUMA_CONTROL,
+ FILM_MODE,
+ BLACK_STRETCH,
+ BLUE_STRETCH,
+ COLOR_TUNE,
+ COLOR_TEMPERATURE,
+ GLOBE_DIMMING,
+ AUTO_PICTUREQUALITY_ENABLED,
+ AUTO_SUPER_RESOLUTION_ENABLED,
+
+ BALANCE,
+ BASS,
+ TREBLE,
+ SURROUND_SOUND_ENABLED,
+ EQUALIZER_DETAIL,
+ SPEAKERS_ENABLED,
+ SPEAKERS_DELAY_MS,
+ ENHANCED_AUDIO_RETURN_CHANNEL_ENABLED,
+ AUTO_VOLUME_CONTROL,
+ DOWNMIX_MODE,
+ DTS_DRC,
+ DOLBY_AUDIO_PROCESSING,
+ DOLBY_DIALOGUE_ENHANCER,
+ DTS_VIRTUAL_X,
+ DIGITAL_OUTPUT,
+ DIGITAL_OUTPUT_DELAY_MS,
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ParameterRange.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ParameterRange.aidl
new file mode 100644
index 0000000..836b5b8
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ParameterRange.aidl
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 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;
+
+import android.hardware.tv.mediaquality.NumberRange;
+
+/** Parameter supported range **/
+@VintfStability
+parcelable ParameterRange {
+ /** Supported number range */
+ NumberRange numRange;
+
+ /** Supported vendor-defined values **/
+ ParcelableHolder vendorDefinedValues;
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/VendorParamCapability.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/VendorParamCapability.aidl
new file mode 100644
index 0000000..1d9476d
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/VendorParamCapability.aidl
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 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;
+
+import android.hardware.tv.mediaquality.ParameterDefaultValue;
+import android.hardware.tv.mediaquality.ParameterRange;
+
+/**
+ * Capability of vendor parameters.
+ */
+@VintfStability
+parcelable VendorParamCapability {
+ /** Name of the parameter **/
+ ParcelableHolder name;
+
+ /** true if this parameter is supported **/
+ boolean isSupported;
+
+ /**
+ * Default value of this parameter. null if there is no default value.
+ */
+ @nullable ParameterDefaultValue defaultValue;
+
+ /**
+ * The supported range of this parameter. null if there is no specific range.
+ */
+ @nullable ParameterRange range;
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/VendorParameterIdentifier.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/VendorParameterIdentifier.aidl
new file mode 100644
index 0000000..f974b16
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/VendorParameterIdentifier.aidl
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 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;
+
+/**
+ * Identifier of vendor parameters.
+ */
+@VintfStability
+parcelable VendorParameterIdentifier {
+ /** Identifier of the parameter **/
+ ParcelableHolder identifier;
+}
diff --git a/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs b/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs
index a579e66..2958a5e 100644
--- a/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs
+++ b/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs
@@ -22,12 +22,16 @@
AmbientBacklightSettings::AmbientBacklightSettings,
IPictureProfileAdjustmentListener::IPictureProfileAdjustmentListener,
IPictureProfileChangedListener::IPictureProfileChangedListener,
+ ParamCapability::ParamCapability,
+ ParameterName::ParameterName,
PictureParameter::PictureParameter,
PictureParameters::PictureParameters,
ISoundProfileAdjustmentListener::ISoundProfileAdjustmentListener,
ISoundProfileChangedListener::ISoundProfileChangedListener,
SoundParameter::SoundParameter,
SoundParameters::SoundParameters,
+ VendorParamCapability::VendorParamCapability,
+ VendorParameterIdentifier::VendorParameterIdentifier,
};
use binder::{Interface, ParcelableHolder, Strong};
use std::sync::{Arc, Mutex};
@@ -273,4 +277,22 @@
Ok(sound_params)
}
+
+ fn getParamCaps(
+ &self,
+ param_names: &[ParameterName],
+ _caps: &mut Vec<ParamCapability>
+ ) -> binder::Result<()> {
+ println!("getParamCaps. len= {}", param_names.len());
+ Ok(())
+ }
+
+ fn getVendorParamCaps(
+ &self,
+ param_names: &[VendorParameterIdentifier],
+ _caps: &mut Vec<VendorParamCapability>
+ ) -> binder::Result<()> {
+ println!("getVendorParamCaps. len= {}", param_names.len());
+ Ok(())
+ }
}
diff --git a/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp b/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
index c1cc898..07e30e6 100644
--- a/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
+++ b/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
@@ -42,10 +42,12 @@
using aidl::android::hardware::tv::mediaquality::BnPictureProfileAdjustmentListener;
using aidl::android::hardware::tv::mediaquality::BnSoundProfileAdjustmentListener;
using aidl::android::hardware::tv::mediaquality::IMediaQuality;
+using aidl::android::hardware::tv::mediaquality::ParamCapability;
using aidl::android::hardware::tv::mediaquality::PictureParameters;
using aidl::android::hardware::tv::mediaquality::PictureProfile;
using aidl::android::hardware::tv::mediaquality::SoundParameters;
using aidl::android::hardware::tv::mediaquality::SoundProfile;
+using aidl::android::hardware::tv::mediaquality::VendorParamCapability;
using android::ProcessState;
using android::String16;
using ndk::ScopedAStatus;
@@ -79,6 +81,15 @@
return ScopedAStatus::ok();
}
+ ScopedAStatus onParamCapabilityChanged(int64_t, const std::vector<ParamCapability>&) override {
+ return ScopedAStatus::ok();
+ }
+
+ ScopedAStatus onVendorParamCapabilityChanged(int64_t,
+ const std::vector<VendorParamCapability>&) {
+ return ScopedAStatus::ok();
+ }
+
private:
std::function<void(const PictureProfile& pictureProfile)> on_hal_picture_profile_adjust_;
};
@@ -94,6 +105,15 @@
return ScopedAStatus::ok();
}
+ ScopedAStatus onParamCapabilityChanged(int64_t, const std::vector<ParamCapability>&) override {
+ return ScopedAStatus::ok();
+ }
+
+ ScopedAStatus onVendorParamCapabilityChanged(int64_t,
+ const std::vector<VendorParamCapability>&) {
+ return ScopedAStatus::ok();
+ }
+
private:
std::function<void(const SoundProfile& soundProfile)> on_hal_sound_profile_adjust_;
};