Merge "make some HVAC properties zoned am: f1ccec1 am: 78415c2" into nyc-mr1-dev-plus-aosp
am: 35f56b3
* commit '35f56b32ac2825fdbde3218e7d53187cb91d48db':
Change-Id: I57f1cf40dde0788223c7e13fee8e646a7d6c3819
diff --git a/include/hardware/fingerprint.h b/include/hardware/fingerprint.h
index b567732..fd9ce46 100644
--- a/include/hardware/fingerprint.h
+++ b/include/hardware/fingerprint.h
@@ -18,6 +18,7 @@
#define ANDROID_INCLUDE_HARDWARE_FINGERPRINT_H
#include <hardware/hw_auth_token.h>
+#include <hardware/hardware.h>
#define FINGERPRINT_MODULE_API_VERSION_1_0 HARDWARE_MODULE_API_VERSION(1, 0)
#define FINGERPRINT_MODULE_API_VERSION_2_0 HARDWARE_MODULE_API_VERSION(2, 0)
diff --git a/include/hardware/vehicle.h b/include/hardware/vehicle.h
index 314daff..6132df8 100644
--- a/include/hardware/vehicle.h
+++ b/include/hardware/vehicle.h
@@ -494,6 +494,11 @@
* LOSS_TRANSIENT: always should be VEHICLE_AUDIO_EXT_FOCUS_CAR_TRANSIENT
* int32_array[3]: should be zero.
*
+ * A focus response should be sent per each focus request even if there is no change in
+ * focus state. This can happen in case like focus request only involving context change
+ * where android side still needs matching focus response to confirm that audio module
+ * has made necessary changes.
+ *
* If car does not support VEHICLE_PROPERTY_AUDIO_FOCUS, focus is assumed to be granted always.
*
* @value_type VEHICLE_VALUE_TYPE_INT32_VEC4
@@ -643,8 +648,16 @@
/**
* Property to control audio volume of each audio context.
*
+ * vehicle_prop_config_t
+ * config_array[0] : bit flags of all supported audio contexts. If this is 0,
+ * audio volume is controlled per physical stream
+ * config_array[1] : flags defined in vehicle_audio_volume_capability_flag to
+ * represent audio module's capability.
+ *
* Data type looks like:
- * int32_array[0] : stream context as defined in vehicle_audio_context_flag.
+ * int32_array[0] : stream context as defined in vehicle_audio_context_flag. If only physical
+ stream is supported (config_array[0] == 0), this will represent physical
+ stream number.
* int32_array[1] : volume level, valid range is 0 to int32_max_value defined in config.
* 0 will be mute state. int32_min_value in config should be always 0.
* int32_array[2] : One of vehicle_audio_volume_state.
@@ -660,6 +673,27 @@
*/
#define VEHICLE_PROPERTY_AUDIO_VOLUME (0x00000901)
+
+/**
+ * flags to represent capability of audio volume property.
+ * used in config_array[1] of vehicle_prop_config_t.
+ */
+enum vehicle_audio_volume_capability_flag {
+ /**
+ * External audio module or vehicle hal has persistent storage
+ * to keep the volume level. This should be set only when per context
+ * volume level is supproted. When this is set, audio volume level per
+ * each context will be retrieved from the property when systen starts up.
+ * And external audio module is also expected to adjust volume automatically
+ * whenever there is an audio context change.
+ * When this flag is not set, android side will assume that there is no
+ * persistent storage and stored value in android side will be used to
+ * initialize the volume level. And android side will set volume level
+ * of each physical streams whenever there is an audio context change.
+ */
+ VEHICLE_AUDIO_VOLUME_CAPABILITY_PERSISTENT_STORAGE = 0x1,
+};
+
/**
* enum to represent audio volume state.
*/
@@ -683,8 +717,18 @@
/**
* Property for handling volume limit set by user. This limits maximum volume that can be set
- * per each context.
- * int32_array[0] : stream context as defined in vehicle_audio_context_flag.
+ * per each context or physical stream.
+ *
+ * vehicle_prop_config_t
+ * config_array[0] : bit flags of all supported audio contexts. If this is 0,
+ * audio volume is controlled per physical stream
+ * config_array[1] : flags defined in vehicle_audio_volume_capability_flag to
+ * represent audio module's capability.
+ *
+ * Data type looks like:
+ * int32_array[0] : stream context as defined in vehicle_audio_context_flag. If only physical
+ * stream is supported (config_array[0] == 0), this will represent physical
+ * stream number.
* int32_array[1] : maximum volume set to the stream. If there is no restriction, this value
* will be bigger than VEHICLE_PROPERTY_AUDIO_VOLUME's max value.
*