Treat all tags as unsigned when comparing them am: 28a872eb79
am: 8f1436275a
Change-Id: I2b3f571ed02470ab6b1e46f7d239fbd767c68225
diff --git a/include/hardware/audio.h b/include/hardware/audio.h
index ec7fd4b..3b734f7 100644
--- a/include/hardware/audio.h
+++ b/include/hardware/audio.h
@@ -147,6 +147,9 @@
/* Enable mono audio playback if 1, else should be 0. */
#define AUDIO_PARAMETER_MONO_OUTPUT "mono_output"
+/* Enable AANC */
+#define AUDIO_PARAMETER_KEY_AANC "aanc_enabled"
+
/**
* audio codec parameters
*/
diff --git a/include/hardware/bt_rc.h b/include/hardware/bt_rc.h
index 4a1a56f..9b6ac1d 100644
--- a/include/hardware/bt_rc.h
+++ b/include/hardware/bt_rc.h
@@ -23,14 +23,13 @@
#define BT_RC_NUM_APP 1
/* Macros */
-#define BTRC_MAX_ATTR_STR_LEN 255
+#define BTRC_MAX_ATTR_STR_LEN (1 << 16)
#define BTRC_UID_SIZE 8
#define BTRC_MAX_APP_SETTINGS 8
#define BTRC_MAX_FOLDER_DEPTH 4
#define BTRC_MAX_APP_ATTR_SIZE 16
#define BTRC_MAX_ELEM_ATTR_SIZE 8
-#define BTRC_FEATURE_MASK_SIZE 16
-
+#define BTRC_FEATURE_BIT_MASK_SIZE 16
/* Macros for valid scopes in get_folder_items */
#define BTRC_SCOPE_PLAYER_LIST 0x00 /* Media Player List */
@@ -46,6 +45,25 @@
#define BTRC_ITEM_FOLDER 0x02 /* Folder */
#define BTRC_ITEM_MEDIA 0x03 /* Media File */
+/* Macros for media attribute IDs */
+#define BTRC_MEDIA_ATTR_ID_INVALID -1
+#define BTRC_MEDIA_ATTR_ID_TITLE 0x00000001
+#define BTRC_MEDIA_ATTR_ID_ARTIST 0x00000002
+#define BTRC_MEDIA_ATTR_ID_ALBUM 0x00000003
+#define BTRC_MEDIA_ATTR_ID_TRACK_NUM 0x00000004
+#define BTRC_MEDIA_ATTR_ID_NUM_TRACKS 0x00000005
+#define BTRC_MEDIA_ATTR_ID_GENRE 0x00000006
+#define BTRC_MEDIA_ATTR_ID_PLAYING_TIME 0x00000007 /* in miliseconds */
+
+/* Macros for folder types */
+#define BTRC_FOLDER_TYPE_MIXED 0x00
+#define BTRC_FOLDER_TYPE_TITLES 0x01
+#define BTRC_FOLDER_TYPE_ALBUMS 0x02
+#define BTRC_FOLDER_TYPE_ARTISTS 0x03
+#define BTRC_FOLDER_TYPE_GENRES 0x04
+#define BTRC_FOLDER_TYPE_PLAYLISTS 0x05
+#define BTRC_FOLDER_TYPE_YEARS 0x06
+
/* Macros for media types */
#define BTRC_MEDIA_TYPE_AUDIO 0x00 /* audio */
#define BTRC_MEDIA_TYPE_VIDEO 0x01 /* video */
@@ -231,7 +249,7 @@
uint8_t major_type;
uint32_t sub_type;
uint8_t play_status;
- uint8_t features[BTRC_FEATURE_MASK_SIZE];
+ uint8_t features[BTRC_FEATURE_BIT_MASK_SIZE];
uint16_t charset_id;
uint8_t name[BTRC_MAX_ATTR_STR_LEN];
} btrc_item_player_t;
@@ -362,6 +380,43 @@
typedef void (* btrc_add_to_now_playing_callback) (uint8_t scope,
uint8_t* uid, uint16_t uid_counter, bt_bdaddr_t *bd_addr);
+/** Callback for set addressed player response on TG **/
+typedef void (* btrc_set_addressed_player_callback) (uint16_t player_id, bt_bdaddr_t *bd_addr);
+
+/** Callback for set browsed player response on TG **/
+typedef void (* btrc_set_browsed_player_callback) (uint16_t player_id, bt_bdaddr_t *bd_addr);
+
+/** Callback for get folder items on TG
+** num_attr: specifies the number of attributes requested in p_attr_ids
+*/
+typedef void (* btrc_get_folder_items_callback) (uint8_t scope, uint32_t start_item,
+ uint32_t end_item, uint8_t num_attr, uint32_t *p_attr_ids, bt_bdaddr_t *bd_addr);
+
+/** Callback for changing browsed path on TG **/
+typedef void (* btrc_change_path_callback) (uint8_t direction,
+ uint8_t* folder_uid, bt_bdaddr_t *bd_addr);
+
+/** Callback to fetch the get item attributes of the media item
+** num_attr: specifies the number of attributes requested in p_attrs
+*/
+typedef void (* btrc_get_item_attr_callback) (uint8_t scope, uint8_t* uid, uint16_t uid_counter,
+ uint8_t num_attr, btrc_media_attr_t *p_attrs, bt_bdaddr_t *bd_addr);
+
+/** Callback for play request for the media item indicated by an identifier */
+typedef void (* btrc_play_item_callback) (uint8_t scope,
+ uint16_t uid_counter, uint8_t* uid, bt_bdaddr_t *bd_addr);
+
+/** Callback to fetch total number of items from a folder **/
+typedef void (* btrc_get_total_num_of_items_callback) (uint8_t scope, bt_bdaddr_t *bd_addr);
+
+/** Callback for conducting recursive search on a current browsed path for a specified string */
+typedef void (* btrc_search_callback) (uint16_t charset_id,
+ uint16_t str_len, uint8_t* p_str, bt_bdaddr_t *bd_addr);
+
+/** Callback to add a specified media item indicated by an identifier to now playing queue. */
+typedef void (* btrc_add_to_now_playing_callback) (uint8_t scope,
+ uint8_t* uid, uint16_t uid_counter, bt_bdaddr_t *bd_addr);
+
/** BT-RC Target callback structure. */
typedef struct {
/** set to sizeof(BtRcCallbacks) */
@@ -502,11 +557,12 @@
void (*cleanup)( void );
} btrc_interface_t;
-typedef void (* btrc_passthrough_rsp_callback) (int id, int key_state, bt_bdaddr_t *bd_addr);
+typedef void (* btrc_passthrough_rsp_callback) (bt_bdaddr_t *bd_addr, int id, int key_state);
typedef void (* btrc_groupnavigation_rsp_callback) (int id, int key_state);
-typedef void (* btrc_connection_state_callback) (bool state, bt_bdaddr_t *bd_addr);
+typedef void (* btrc_connection_state_callback) (
+ bool rc_connect, bool bt_connect, bt_bdaddr_t *bd_addr);
typedef void (* btrc_ctrl_getrcfeatures_callback) (bt_bdaddr_t *bd_addr, int features);
@@ -535,6 +591,14 @@
typedef void (* btrc_ctrl_play_status_changed_callback)(bt_bdaddr_t *bd_addr,
btrc_play_status_t play_status);
+typedef void (* btrc_ctrl_get_folder_items_callback )(bt_bdaddr_t *bd_addr,
+ const btrc_folder_items_t *folder_items,
+ uint8_t count);
+
+typedef void (* btrc_ctrl_change_path_callback)(bt_bdaddr_t *bd_addr, uint8_t count);
+
+typedef void (* btrc_ctrl_set_browsed_player_callback )(
+ bt_bdaddr_t *bd_addr, uint8_t num_items, uint8_t depth);
/** BT-RC Controller callback structure. */
typedef struct {
/** set to sizeof(BtRcCallbacks) */
@@ -551,6 +615,9 @@
btrc_ctrl_track_changed_callback track_changed_cb;
btrc_ctrl_play_position_changed_callback play_position_changed_cb;
btrc_ctrl_play_status_changed_callback play_status_changed_cb;
+ btrc_ctrl_get_folder_items_callback get_folder_items_cb;
+ btrc_ctrl_change_path_callback change_folder_path_cb;
+ btrc_ctrl_set_browsed_player_callback set_browsed_player_cb;
} btrc_ctrl_callbacks_t;
/** Represents the standard BT-RC AVRCP Controller interface. */
@@ -575,6 +642,25 @@
bt_status_t (*set_player_app_setting_cmd) (bt_bdaddr_t *bd_addr, uint8_t num_attrib,
uint8_t* attrib_ids, uint8_t* attrib_vals);
+ /** send command to play a particular item */
+ bt_status_t (*play_item_cmd) (
+ bt_bdaddr_t *bd_addr, uint8_t scope, uint8_t *uid, uint16_t uid_counter);
+
+ /** get the now playing list */
+ bt_status_t (*get_now_playing_list_cmd) (bt_bdaddr_t *bd_addr, uint8_t start, uint8_t items);
+
+ /** get the folder list */
+ bt_status_t (*get_folder_list_cmd) (bt_bdaddr_t *bd_addr, uint8_t start, uint8_t items);
+
+ /** get the folder list */
+ bt_status_t (*get_player_list_cmd) (bt_bdaddr_t *bd_addr, uint8_t start, uint8_t items);
+
+ /** get the folder list */
+ bt_status_t (*change_folder_path_cmd) (bt_bdaddr_t *bd_addr, uint8_t direction, uint8_t * uid);
+
+ /** set browsed player */
+ bt_status_t (*set_browsed_player_cmd) (bt_bdaddr_t *bd_addr, uint16_t player_id);
+
/** send rsp to set_abs_vol received from target */
bt_status_t (*set_volume_rsp) (bt_bdaddr_t *bd_addr, uint8_t abs_vol, uint8_t label);
diff --git a/include/hardware/fingerprint.h b/include/hardware/fingerprint.h
index 618ca7e..e7c825f 100644
--- a/include/hardware/fingerprint.h
+++ b/include/hardware/fingerprint.h
@@ -18,10 +18,12 @@
#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)
#define FINGERPRINT_MODULE_API_VERSION_2_1 HARDWARE_MODULE_API_VERSION(2, 1)
+#define FINGERPRINT_MODULE_API_VERSION_3_0 HARDWARE_MODULE_API_VERSION(3, 0)
#define FINGERPRINT_HARDWARE_MODULE_ID "fingerprint"
typedef enum fingerprint_msg_type {
@@ -84,14 +86,13 @@
uint64_t msg; /* Vendor specific message. Used for user guidance */
} fingerprint_enroll_t;
-typedef struct fingerprint_enumerated {
+typedef struct fingerprint_iterator {
fingerprint_finger_id_t finger;
uint32_t remaining_templates;
-} fingerprint_enumerated_t;
+} fingerprint_iterator_t;
-typedef struct fingerprint_removed {
- fingerprint_finger_id_t finger;
-} fingerprint_removed_t;
+typedef fingerprint_iterator_t fingerprint_enumerated_t;
+typedef fingerprint_iterator_t fingerprint_removed_t;
typedef struct fingerprint_acquired {
fingerprint_acquired_info_t acquired_info; /* information about the image */
@@ -206,7 +207,7 @@
/*
* Enumerate all the fingerprint templates found in the directory set by
* set_active_group()
- * For each template found notify() will be called with:
+ * For each template found a notify() will be called with:
* fingerprint_msg.type == FINGERPRINT_TEMPLATE_ENUMERATED
* fingerprint_msg.data.enumerated.finger indicating a template id
* fingerprint_msg.data.enumerated.remaining_templates indicating how many more
@@ -221,9 +222,14 @@
* Fingerprint remove request:
* Deletes a fingerprint template.
* Works only within the path set by set_active_group().
- * notify() will be called with details on the template deleted.
- * fingerprint_msg.type == FINGERPRINT_TEMPLATE_REMOVED and
- * fingerprint_msg.data.removed.finger indicating the template id removed.
+ * The fid parameter can be used as a widcard:
+ * * fid == 0 -- delete all the templates in the group.
+ * * fid != 0 -- delete this specific template from the group.
+ * For each template found a notify() will be called with:
+ * fingerprint_msg.type == FINGERPRINT_TEMPLATE_REMOVED
+ * fingerprint_msg.data.removed.finger indicating a template id deleted
+ * fingerprint_msg.data.removed.remaining_templates indicating how many more
+ * templates will be deleted by this operation.
*
* Function return: 0 if fingerprint template(s) can be successfully deleted
* or a negative number in case of error, generally from the errno.h set.
diff --git a/include/hardware/keymaster_defs.h b/include/hardware/keymaster_defs.h
index 0f9bc27..323b7dd 100644
--- a/include/hardware/keymaster_defs.h
+++ b/include/hardware/keymaster_defs.h
@@ -135,6 +135,9 @@
KM_TAG_OS_PATCHLEVEL = KM_UINT | 706, /* Patch level of system (keymaster2) */
KM_TAG_UNIQUE_ID = KM_BYTES | 707, /* Used to provide unique ID in attestation */
KM_TAG_ATTESTATION_CHALLENGE = KM_BYTES | 708, /* Used to provide challenge in attestation */
+ KM_TAG_ATTESTATION_APPLICATION_ID = KM_BYTES | 709, /* Used to identify the set of possible
+ * applications of which one has initiated
+ * a key attestation */
/* Tags used only to provide data to or receive data from operations */
KM_TAG_ASSOCIATED_DATA = KM_BYTES | 1000, /* Used to provide associated data for AEAD modes. */
@@ -427,6 +430,7 @@
KM_ERROR_KEY_REQUIRES_UPGRADE = -62,
KM_ERROR_ATTESTATION_CHALLENGE_MISSING = -63,
KM_ERROR_KEYMASTER_NOT_CONFIGURED = -64,
+ KM_ERROR_ATTESTATION_APPLICATION_ID_MISSING = -65,
KM_ERROR_UNIMPLEMENTED = -100,
KM_ERROR_VERSION_MISMATCH = -101,
diff --git a/include/hardware/sensors.h b/include/hardware/sensors.h
index b1df317..99c1147 100644
--- a/include/hardware/sensors.h
+++ b/include/hardware/sensors.h
@@ -803,7 +803,8 @@
* system. At most one sensor of this type can be present in one sensor HAL implementation and
* presence of a sensor of this type in sensor HAL implementation indicates that this sensor HAL
* supports dynamic sensor feature. Operations, such as batch, activate and setDelay, to this
- * special purpose sensor should be treated as no-op and return successful.
+ * special purpose sensor should be treated as no-op and return successful; flush() also
+ * has to generate flush complete event as if this is a sensor that does not support batching.
*
* A dynamic sensor connection indicates connection of a physical device or instantiation of a
* virtual sensor backed by algorithm; and a dynamic sensor disconnection indicates the the
@@ -1333,7 +1334,13 @@
int sensor_handle, int64_t sampling_period_ns);
/**
- * Returns an array of sensor data.
+ * Write an array of sensor_event_t to data. The size of the
+ * available buffer is specified by count. Returns number of
+ * valid sensor_event_t.
+ *
+ * This function should block if there is no sensor event
+ * available when being called. Thus, return value should always be
+ * positive.
*/
int (*poll)(struct sensors_poll_device_t *dev,
sensors_event_t* data, int count);
diff --git a/include/hardware/vehicle.h b/include/hardware/vehicle.h
index a590fbd..da11407 100644
--- a/include/hardware/vehicle.h
+++ b/include/hardware/vehicle.h
@@ -122,7 +122,7 @@
* @data_member info_model_year
* @unit VEHICLE_UNIT_TYPE_YEAR
*/
-#define VEHICLE_PROPERTY_INFO_MODEL_YEAR (0x00000103)
+#define VEHICLE_PROPERTY_INFO_MODEL_YEAR (0x00000103)
/**
* Fuel capacity of the vehicle
@@ -253,7 +253,7 @@
- //==== HVAC Properties ====
+//==== HVAC Properties ====
/**
* Fan speed setting
@@ -293,7 +293,7 @@
/**
* HVAC current temperature.
* @value_type VEHICLE_VALUE_TYPE_ZONED_FLOAT
- * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE|VEHICLE_PROP_CHANGE_MODE_CONTINUOUS
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
* @access VEHICLE_PROP_ACCESS_READ_WRITE
* @zone_type VEHICLE_ZONE
* @data_member hvac.temperature_current
@@ -303,7 +303,7 @@
/**
* HVAC, target temperature set.
* @value_type VEHICLE_VALUE_TYPE_ZONED_FLOAT
- * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE|VEHICLE_PROP_CHANGE_MODE_CONTINUOUS
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
* @access VEHICLE_PROP_ACCESS_READ_WRITE
* @zone_type VEHICLE_ZONE
* @data_member hvac.temperature_set
@@ -373,6 +373,34 @@
#define VEHICLE_PROPERTY_HVAC_DUAL_ON (0x00000509)
/**
+ * On/off automatic mode
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_BOOLEAN
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_ZONE
+ * @data_member hvac.auto_on
+ */
+#define VEHICLE_PROPERTY_HVAC_AUTO_ON (0x0000050A)
+
+/**
+ * Seat temperature
+ *
+ * Negative values indicate cooling.
+ * 0 indicates off.
+ * Positive values indicate heating.
+ *
+ * Some vehicles may have multiple levels of heating and cooling. The min/max
+ * range defines the allowable range and number of steps in each direction.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_HVAC_SEAT_TEMPERATURE (0x0000050B)
+
+/**
* Represents power state for HVAC. Some HVAC properties will require matching power to be turned on
* to get out of OFF state. For non-zoned HVAC properties, VEHICLE_ALL_ZONE corresponds to
* global power state.
@@ -396,8 +424,7 @@
* @data_member outside_temperature
* @unit VEHICLE_UNIT_TYPE_CELCIUS
*/
-
-#define VEHICLE_PROPERTY_ENV_OUTSIDE_TEMPERATURE (0x00000703)
+#define VEHICLE_PROPERTY_ENV_OUTSIDE_TEMPERATURE (0x00000703)
/**
@@ -408,7 +435,7 @@
* @data_member cabin_temperature
* @unit VEHICLE_UNIT_TYPE_CELCIUS
*/
-#define VEHICLE_PROPERTY_ENV_CABIN_TEMPERATURE (0x00000704)
+#define VEHICLE_PROPERTY_ENV_CABIN_TEMPERATURE (0x00000704)
/*
@@ -434,7 +461,7 @@
* @config_flags Number of presets supported
* @data_member int32_array
*/
-#define VEHICLE_PROPERTY_RADIO_PRESET (0x0000801)
+#define VEHICLE_PROPERTY_RADIO_PRESET (0x0000801)
/**
* Constants relevant to radio.
@@ -492,7 +519,13 @@
* VEHICLE_AUDIO_EXT_FOCUS_CAR_PERMANENT when car side is playing something
* permanent.
* LOSS_TRANSIENT: always should be VEHICLE_AUDIO_EXT_FOCUS_CAR_TRANSIENT
- * int32_array[3]: should be zero.
+ * int32_array[3]: context requested by android side when responding to focus request.
+ * When car side is taking focus away, this 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.
*
@@ -501,7 +534,7 @@
* @access VEHICLE_PROP_ACCESS_READ_WRITE
* @data_member int32_array
*/
-#define VEHICLE_PROPERTY_AUDIO_FOCUS (0x00000900)
+#define VEHICLE_PROPERTY_AUDIO_FOCUS (0x00000900)
enum vehicle_audio_focus_request {
VEHICLE_AUDIO_FOCUS_REQUEST_GAIN = 0x1,
@@ -638,13 +671,23 @@
VEHICLE_AUDIO_CONTEXT_SYSTEM_SOUND_FLAG = 0x400,
/** Radio is played */
VEHICLE_AUDIO_CONTEXT_RADIO_FLAG = 0x800,
+ /** Ext source is played. This is for tagging generic ext sources. */
+ VEHICLE_AUDIO_CONTEXT_EXT_SOURCE_FLAG = 0x1000,
};
/**
* 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.
@@ -658,7 +701,34 @@
* @config_flags all audio contexts supported.
* @data_member int32_array
*/
-#define VEHICLE_PROPERTY_AUDIO_VOLUME (0x00000901)
+#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,
+ /**
+ * When this flag is set, the H/W can support only single master volume for all streams.
+ * There is no way to set volume level differently per each stream or context.
+ */
+ VEHICLE_AUDIO_VOLUME_CAPABILITY_MASTER_VOLUME_ONLY = 0x2,
+};
+
/**
* enum to represent audio volume state.
@@ -683,8 +753,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.
*
@@ -698,7 +778,7 @@
* @config_flags all audio contexts supported.
* @data_member int32_array
*/
-#define VEHICLE_PROPERTY_AUDIO_VOLUME_LIMIT (0x00000902)
+#define VEHICLE_PROPERTY_AUDIO_VOLUME_LIMIT (0x00000902)
/**
* Index in int32_array for VEHICLE_PROPERTY_AUDIO_VOLUME_LIMIT property.
@@ -727,7 +807,7 @@
* @access VEHICLE_PROP_ACCESS_WRITE
* @data_member int32_array
*/
-#define VEHICLE_PROPERTY_AUDIO_ROUTING_POLICY (0x00000903)
+#define VEHICLE_PROPERTY_AUDIO_ROUTING_POLICY (0x00000903)
/**
* Index in int32_array for VEHICLE_PROPERTY_AUDIO_ROUTING_POLICY property.
@@ -750,7 +830,7 @@
* this.
* @data_member int32_value
*/
-#define VEHICLE_PROPERTY_AUDIO_HW_VARIANT (0x00000904)
+#define VEHICLE_PROPERTY_AUDIO_HW_VARIANT (0x00000904)
/**
* Flag to be used in vehicle_prop_config.config_flags for VEHICLE_PROPERTY_AUDIO_HW_VARIANT.
@@ -766,6 +846,70 @@
VEHICLE_AUDIO_HW_VARIANT_FLAG_INTERNAL_RADIO_FLAG = 0x1,
};
+/** audio routing for AM/FM. This should be also be the value when there is only one
+ radio module in the system. */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_RADIO_AM_FM "RADIO_AM_FM"
+/** Should be added only when there is a separate radio module with HD capability. */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_RADIO_AM_FM_HD "RADIO_AM_FM_HD"
+/** For digial audio broadcasting type of radio */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_RADIO_DAB "RADIO_DAB"
+/** For satellite type of radio */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_RADIO_SATELLITE "RADIO_SATELLITE"
+/** For CD or DVD */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_CD_DVD "CD_DVD"
+/** For 1st auxiliary input */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_AUX_IN0 "AUX_IN0"
+/** For 2nd auxiliary input */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_AUX_IN1 "AUX_IN1"
+/** For navigation guidance from outside android */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_EXT_NAV_GUIDANCE "EXT_NAV_GUIDANCE"
+/** For voice command from outside android */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_EXT_VOICE_COMMAND "EXT_VOICE_COMMAND"
+/** For voice call from outside android */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_EXT_VOICE_CALL "EXT_VOICE_CALL"
+/** For safety alert from outside android */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_EXT_SAFETY_ALERT "EXT_SAFETY_ALERT"
+
+/**
+* Property to pass hint on external audio routing. When android side request focus
+* with VEHICLE_AUDIO_EXT_FOCUS_CAR_PLAY_ONLY_FLAG flag, this property will be set
+* before setting AUDIO_FOCUS property as a hint for external audio source routing.
+* Note that setting this property alone should not trigger any change.
+* Audio routing should be changed only when AUDIO_FOCUS property is set. Note that
+* this property allows passing custom value as long as it is defined in config_string.
+* This allows supporting non-standard routing options through this property.
+* It is recommended to use separate name space for custom property to prevent conflict in future
+* android releases.
+* Enabling each external routing option is done by enabling each bit flag for the routing.
+* This property can support up to 128 external routings.
+* To give full flexibility, there is no standard definition for each bit flag and
+* assigning each big flag to specific routing type is decided by config_string.
+* config_string has format of each entry separated by ','
+* and each entry has format of bitFlagPositon:typeString[:physicalStreamNumber].
+* bitFlagPosition: represents which big flag will be set to enable this routing. 0 means
+* LSB in int32_array[0]. 31 will be MSB in int32_array[0]. 127 will MSB in int32_array[3].
+* typeString: string representation of external routing. Some types are already defined
+* in VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_* and use them first before adding something
+* custom. Applications will find each routing using this string.
+* physicalStreamNumber: This part is optional and represents physical stream to android
+* which will be disabled when this routing is enabled. If not specified, this routing
+* should not affect physical streams to android.
+* As an example, let's assume a system with two physical streams, 0 for media and 1 for
+* nav guidance. And let's assume external routing option of am fm radio, external navigation
+* guidance, satellite radio, and one custom. Let's assume that radio and satellite replaces
+* physical stream 0 and external navigation replaces physical stream 1. And bit flag will be
+* assigned in the order listed above. This configuration will look like this in config_string:
+* "0:RADIO_AM_FM:0,1:EXT_NAV_GUIDANCE:1,2:RADIO_SATELLITE:0,3:com.test.SOMETHING_CUSTOM"
+* When android requests RADIO_AM_FM, int32_array[0] will be set to 0x1.
+* When android requests RADIO_SATELLITE + EXT_NAV_GUIDANCE, int32_array[0] will be set to 0x2|0x4.
+*
+* @value_type VEHICLE_VALUE_TYPE_INT32_VEC4
+* @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+* @access VEHICLE_PROP_ACCESS_WRITE|VEHICLE_PROP_ACCESS_READ_WRITE
+* @config_string List of all avaiable external source in the system.
+* @data_member int32_array
+*/
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_HINT (0x00000905)
/**
* Property to control power state of application processor.
@@ -788,7 +932,7 @@
* @config_flags Additional info on power state. Should use vehicle_ap_power_state_config_flag.
* @data_member int32_array
*/
-#define VEHICLE_PROPERTY_AP_POWER_STATE (0x00000A00)
+#define VEHICLE_PROPERTY_AP_POWER_STATE (0x00000A00)
enum vehicle_ap_power_state_config_flag {
/**
@@ -895,7 +1039,7 @@
* @access VEHICLE_PROP_ACCESS_READ|VEHICLE_PROP_ACCESS_READ_WRITE
* @data_member int32
*/
-#define VEHICLE_PROPERTY_DISPLAY_BRIGHTNESS (0x00000A01)
+#define VEHICLE_PROPERTY_DISPLAY_BRIGHTNESS (0x00000A01)
/**
@@ -999,7 +1143,7 @@
* @config_array 0:vehicle_instument_cluster_type 1:hw type
* @data_member int32_array
*/
-#define VEHICLE_PROPERTY_INSTRUMENT_CLUSTER_INFO (0x00000A20)
+#define VEHICLE_PROPERTY_INSTRUMENT_CLUSTER_INFO (0x00000A20)
/**
* Represents instrument cluster type available in system
@@ -1019,6 +1163,630 @@
};
/**
+ * Current date and time, encoded as Unix time.
+ * This value denotes the number of seconds that have elapsed since 1/1/1970.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_INT64
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_SET
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @data_member int64_value
+ * @unit VEHICLE_UNIT_TYPE_SECS
+ */
+#define VEHICLE_PROPERTY_UNIX_TIME (0x00000A30)
+
+/**
+ * Current time only.
+ * Some vehicles may not keep track of date. This property only affects the current time, in
+ * seconds during the day. Thus, the max value for this parameter is 86,400 (24 * 60 * 60)
+ *
+ * @value_type VEHICLE_VALUE_TYPE_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_SET
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @data_member int32_value
+ * @unit VEHICLE_UNIT_TYPE_SECS
+ */
+#define VEHICLE_PROPERTY_CURRENT_TIME_IN_SECONDS (0x00000A31)
+
+
+//==== Car Cabin Properties ====
+/**
+ * Most Car Cabin properties have both a MOVE and POSITION parameter associated with them.
+ *
+ * The MOVE parameter will start moving the device in the indicated direction. The magnitude
+ * indicates the relative speed. For instance, setting the WINDOW_MOVE parameter to +1 will roll
+ * the window up. Setting it to +2 (if available) will roll it up faster.
+ *
+ * The POSITION parameter will move the device to the desired position. For instance, if the
+ * WINDOW_POS has a range of 0-100, then setting this parameter to 50 will open the window halfway.
+ * Depending upon the initial position, the window may move up or down to the 50% value.
+ *
+ * OEMs may choose to implement one or both of the MOVE/POSITION parameters depending upon the
+ * capability of the hardware.
+ */
+
+// Doors
+/**
+ * Door position
+ *
+ * This is an integer in case a door may be set to a particular position. Max
+ * value indicates fully open, min value (0) indicates fully closed.
+ *
+ * Some vehicles (minivans) can open the door electronically. Hence, the ability
+ * to write this property.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_DOOR
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_DOOR_POS (0x00000B00)
+
+/**
+ * Door move
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_DOOR
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_DOOR_MOVE (0x00000B01)
+
+
+/**
+ * Door lock
+ *
+ * 'true' indicates door is locked
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_BOOLEAN
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_DOOR
+ * @data_member boolean_value
+ */
+#define VEHICLE_PROPERTY_DOOR_LOCK (0x00000B02)
+
+// Mirrors
+/**
+ * Mirror Z Position
+ *
+ * Positive value indicates tilt upwards, negative value is downwards
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_MIRROR
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_MIRROR_Z_POS (0x00000B40)
+
+/**
+ * Mirror Z Move
+ *
+ * Positive value indicates tilt upwards, negative value is downwards
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_MIRROR
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_MIRROR_Z_MOVE (0x00000B41)
+
+/**
+ * Mirror Y Position
+ *
+ * Positive value indicate tilt right, negative value is left
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_MIRROR
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_MIRROR_Y_POS (0x00000B42)
+
+/**
+ * Mirror Y Move
+ *
+ * Positive value indicate tilt right, negative value is left
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_MIRROR
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_MIRROR_Y_MOVE (0x00000B43)
+
+/**
+ * Mirror Lock
+ *
+ * True indicates mirror positions are locked and not changeable
+ *
+ * @value_type VEHICLE_VALUE_TYPE_BOOLEAN
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @data_member boolean_value
+ */
+#define VEHICLE_PROPERTY_MIRROR_LOCK (0x00000B44)
+
+/**
+ * Mirror Heat
+ *
+ * Increase values denote higher heating levels.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_MIRROR_HEAT (0x00000B45)
+
+/**
+ * Mirror Fold
+ *
+ * True indicates mirrors are folded
+ *
+ * @value_type VEHICLE_VALUE_TYPE_BOOLEAN
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @data_member boolean_value
+ */
+#define VEHICLE_PROPERTY_MIRROR_FOLD (0x00000B46)
+
+// Seats
+/**
+ * Seat memory select
+ *
+ * This parameter selects the memory preset to use to select the seat position.
+ * The minValue is always 0, and the maxValue determines the number of seat
+ * positions available.
+ *
+ * For instance, if the driver's seat has 3 memory presets, the maxValue will be 3.
+ * When the user wants to select a preset, the desired preset number (1, 2, or 3)
+ * is set.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_MEMORY_SELECT (0x00000B80)
+
+/**
+ * Seat memory set
+ *
+ * This setting allows the user to save the current seat position settings into
+ * the selected preset slot. The maxValue for each seat position shall match
+ * the maxValue for VEHICLE_PROPERTY_SEAT_MEMORY_SELECT.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_MEMORY_SET (0x00000B81)
+
+/**
+ * Seatbelt buckled
+ *
+ * True indicates belt is buckled.
+ *
+ * Write access indicates automatic seat buckling capabilities. There are no known cars at this
+ * time, but you never know...
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_BOOLEAN
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member boolean_value
+ */
+#define VEHICLE_PROPERTY_SEAT_BELT_BUCKLED (0x00000B82)
+
+/**
+ * Seatbelt height position
+ *
+ * Adjusts the shoulder belt anchor point.
+ * Max value indicates highest position
+ * Min value indicates lowest position
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_BELT_HEIGHT_POS (0x00000B83)
+
+/**
+ * Seatbelt height move
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_BELT_HEIGHT_MOVE (0x00000B84)
+
+/**
+ * Seat fore/aft position
+ *
+ * Sets the seat position forward (closer to steering wheel) and backwards.
+ * Max value indicates closest to wheel, min value indicates most rearward
+ * position.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_FORE_AFT_POS (0x00000B85)
+
+/**
+ * Seat fore/aft move
+ *
+ * Moves the seat position forward and aft.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_FORE_AFT_MOVE (0x00000B86)
+
+/**
+ * Seat backrest angle 1 position
+ *
+ * Backrest angle 1 is the actuator closest to the bottom of the seat.
+ * Max value indicates angling forward towards the steering wheel.
+ * Min value indicates full recline.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_BACKREST_ANGLE_1_POS (0x00000B87)
+
+/**
+ * Seat backrest angle 1 move
+ *
+ * Moves the backrest forward or recline.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_BACKREST_ANGLE_1_MOVE (0x00000B88)
+
+/**
+ * Seat backrest angle 2 position
+ *
+ * Backrest angle 2 is the next actuator up from the bottom of the seat.
+ * Max value indicates angling forward towards the steering wheel.
+ * Min value indicates full recline.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_BACKREST_ANGLE_2_POS (0x00000B89)
+
+/**
+ * Seat backrest angle 2 move
+ *
+ * Moves the backrest forward or recline.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_BACKREST_ANGLE_2_MOVE (0x00000B8A)
+
+/**
+ * Seat height position
+ *
+ * Sets the seat height.
+ * Max value indicates highest position.
+ * Min value indicates lowest position.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_HEIGHT_POS (0x00000B8B)
+
+/**
+ * Seat height move
+ *
+ * Moves the seat height.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_HEIGHT_MOVE (0x00000B8C)
+
+/**
+ * Seat depth position
+ *
+ * Sets the seat depth, distance from back rest to front edge of seat.
+ * Max value indicates longest depth position.
+ * Min value indicates shortest position.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_DEPTH_POS (0x00000B8D)
+
+/**
+ * Seat depth move
+ *
+ * Adjusts the seat depth.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_DEPTH_MOVE (0x00000B8E)
+
+/**
+ * Seat tilt position
+ *
+ * Sets the seat tilt.
+ * Max value indicates front edge of seat higher than back edge.
+ * Min value indicates front edge of seat lower than back edge.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_TILT_POS (0x00000B8F)
+
+/**
+ * Seat tilt move
+ *
+ * Tilts the seat.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_TILT_MOVE (0x00000B90)
+
+/**
+ * Lumber fore/aft position
+ *
+ * Pushes the lumbar support forward and backwards
+ * Max value indicates most forward position.
+ * Min value indicates most rearward position.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_LUMBAR_FORE_AFT_POS (0x00000B91)
+
+/**
+ * Lumbar fore/aft move
+ *
+ * Adjusts the lumbar support.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_LUMBAR_FORE_AFT_MOVE (0x00000B92)
+
+/**
+ * Lumbar side support position
+ *
+ * Sets the amount of lateral lumbar support.
+ * Max value indicates widest lumbar setting (i.e. least support)
+ * Min value indicates thinnest lumbar setting.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_LUMBAR_SIDE_SUPPORT_POS (0x00000B93)
+
+/**
+ * Lumbar side support move
+ *
+ * Adjusts the amount of lateral lumbar support.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_LUMBAR_SIDE_SUPPORT_MOVE (0x00000B94)
+
+/**
+ * Headrest height position
+ *
+ * Sets the headrest height.
+ * Max value indicates tallest setting.
+ * Min value indicates shortest setting.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_HEADREST_HEIGHT_POS (0x00000B95)
+
+/**
+ * Headrest heigh move
+ *
+ * Moves the headrest up and down.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_HEADREST_HEIGHT_MOVE (0x00000B96)
+
+/**
+ * Headrest angle position
+ *
+ * Sets the angle of the headrest.
+ * Max value indicates most upright angle.
+ * Min value indicates shallowest headrest angle.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_HEADREST_ANGLE_POS (0x00000B97)
+
+/**
+ * Headrest angle move
+ *
+ * Adjusts the angle of the headrest
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_HEADREST_ANGLE_MOVE (0x00000B98)
+
+/**
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_HEADREST_FORE_AFT_POS (0x00000B99)
+
+/**
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_HEADREST_FORE_AFT_MOVE (0x00000B9A)
+
+
+// Windows
+/**
+ * Window Position
+ *
+ * Max = window up / closed
+ * Min = window down / open
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_WINDOW_POS (0x00000BC0)
+
+/**
+ * Window Move
+ *
+ * Max = window up / closed
+ * Min = window down / open
+ * Magnitude denotes relative speed. I.e. +2 is faster than +1 in raising the window.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_WINDOW_MOVE (0x00000BC1)
+
+/**
+ * Window Vent Position
+ *
+ * This feature is used to control the vent feature on a sunroof.
+ *
+ * Max = vent open
+ * Min = vent closed
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_WINDOW_VENT_POS (0x00000BC2)
+
+/**
+ * Window Vent Move
+ *
+ * This feature is used to control the vent feature on a sunroof.
+ *
+ * Max = vent open
+ * Min = vent closed
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_WINDOW_VENT_MOVE (0x00000BC3)
+
+/**
+ * Window Lock
+ *
+ * True indicates windows are locked and can't be moved.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_BOOLEAN
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @data_member boolean_value
+ */
+#define VEHICLE_PROPERTY_WINDOW_LOCK (0x00000BC4)
+
+
+
+/**
* H/W specific, non-standard property can be added as necessary. Such property should use
* property number in range of [VEHICLE_PROPERTY_CUSTOM_START, VEHICLE_PROPERTY_CUSTOM_END].
* Definition of property in this range is completely up to each HAL implementation.
@@ -1027,20 +1795,20 @@
* include config_string of "com.XYZ.some_further_details".
* @range_start
*/
-#define VEHICLE_PROPERTY_CUSTOM_START (0x70000000)
+#define VEHICLE_PROPERTY_CUSTOM_START (0x70000000)
/** @range_end */
-#define VEHICLE_PROPERTY_CUSTOM_END (0x73ffffff)
+#define VEHICLE_PROPERTY_CUSTOM_END (0x73ffffff)
/**
* Property range allocated for system's internal usage like testing. HAL should never declare
* property in this range.
* @range_start
*/
-#define VEHICLE_PROPERTY_INTERNAL_START (0x74000000)
+#define VEHICLE_PROPERTY_INTERNAL_START (0x74000000)
/**
* @range_end
*/
-#define VEHICLE_PROPERTY_INTERNAL_END (0x74ffffff)
+#define VEHICLE_PROPERTY_INTERNAL_END (0x74ffffff)
/**
* Value types for various properties.
@@ -1091,7 +1859,7 @@
VEHICLE_UNIT_TYPE_MILLILITER = 0x00000040,
// time
VEHICLE_UNIT_TYPE_NANO_SECS = 0x00000050,
- VEHICLE_UNOT_TYPE_SECS = 0x00000053,
+ VEHICLE_UNIT_TYPE_SECS = 0x00000053,
VEHICLE_UNIT_TYPE_YEAR = 0x00000059,
};
@@ -1105,8 +1873,12 @@
*/
VEHICLE_PROP_CHANGE_MODE_STATIC = 0x00,
/**
- * Property of this type will be reported when there is a change. get should return the
- * current value.
+ * Property of this type will be reported when there is a change.
+ * get call should return the current value.
+ * Set operation for this property is assumed to be asynchronous. When the property is read
+ * (get) after set, it may still return old value until underlying H/W backing this property
+ * has actually changed the state. Once state is changed, the property will dispatch changed
+ * value as event.
*/
VEHICLE_PROP_CHANGE_MODE_ON_CHANGE = 0x01,
/**
@@ -1114,6 +1886,18 @@
* the data.
*/
VEHICLE_PROP_CHANGE_MODE_CONTINUOUS = 0x02,
+ /**
+ * Property of this type may be polled to get the current value.
+ */
+ VEHICLE_PROP_CHANGE_MODE_POLL = 0x03,
+ /**
+ * This is for property where change event should be sent only when the value is
+ * set from external component. Normal value change will not trigger event.
+ * For example, clock property can send change event only when it is set, outside android,
+ * for case like user setting time or time getting update. There is no need to send it
+ * per every value change.
+ */
+ VEHICLE_PROP_CHANGE_MODE_ON_SET = 0x04,
};
/**
@@ -1468,6 +2252,7 @@
vehicle_boolean_t max_defrost_on;
vehicle_boolean_t recirc_on;
vehicle_boolean_t dual_on;
+ vehicle_boolean_t auto_on;
vehicle_boolean_t power_on;
float temperature_current;
diff --git a/modules/audio/audio_hw.c b/modules/audio/audio_hw.c
index 68b0d3a..35901e4 100644
--- a/modules/audio/audio_hw.c
+++ b/modules/audio/audio_hw.c
@@ -119,7 +119,7 @@
static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
size_t bytes)
{
- ALOGV("out_write: bytes: %d", bytes);
+ ALOGV("out_write: bytes: %zu", bytes);
/* XXX: fake timing for audio output */
struct stub_stream_out *out = (struct stub_stream_out *)stream;
@@ -242,7 +242,7 @@
static ssize_t in_read(struct audio_stream_in *stream, void* buffer,
size_t bytes)
{
- ALOGV("in_read: bytes %d", bytes);
+ ALOGV("in_read: bytes %zu", bytes);
/* XXX: fake timing for audio input */
struct stub_stream_in *in = (struct stub_stream_in *)stream;
diff --git a/modules/camera/3_0/Android.mk b/modules/camera/3_0/Android.mk
new file mode 100644
index 0000000..ae68ed5
--- /dev/null
+++ b/modules/camera/3_0/Android.mk
@@ -0,0 +1,45 @@
+# Copyright (C) 2012 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := camera.default
+LOCAL_MODULE_RELATIVE_PATH := hw
+
+LOCAL_C_INCLUDES += \
+ system/core/include \
+ system/media/camera/include \
+
+LOCAL_SRC_FILES := \
+ CameraHAL.cpp \
+ Camera.cpp \
+ ExampleCamera.cpp \
+ Metadata.cpp \
+ Stream.cpp \
+ VendorTags.cpp \
+
+LOCAL_SHARED_LIBRARIES := \
+ libcamera_metadata \
+ libcutils \
+ liblog \
+ libsync \
+ libutils \
+
+LOCAL_CFLAGS += -Wall -Wextra -fvisibility=hidden
+
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/modules/camera/Camera.cpp b/modules/camera/3_0/Camera.cpp
similarity index 100%
rename from modules/camera/Camera.cpp
rename to modules/camera/3_0/Camera.cpp
diff --git a/modules/camera/Camera.h b/modules/camera/3_0/Camera.h
similarity index 100%
rename from modules/camera/Camera.h
rename to modules/camera/3_0/Camera.h
diff --git a/modules/camera/CameraHAL.cpp b/modules/camera/3_0/CameraHAL.cpp
similarity index 100%
rename from modules/camera/CameraHAL.cpp
rename to modules/camera/3_0/CameraHAL.cpp
diff --git a/modules/camera/CameraHAL.h b/modules/camera/3_0/CameraHAL.h
similarity index 100%
rename from modules/camera/CameraHAL.h
rename to modules/camera/3_0/CameraHAL.h
diff --git a/modules/camera/ExampleCamera.cpp b/modules/camera/3_0/ExampleCamera.cpp
similarity index 100%
rename from modules/camera/ExampleCamera.cpp
rename to modules/camera/3_0/ExampleCamera.cpp
diff --git a/modules/camera/ExampleCamera.h b/modules/camera/3_0/ExampleCamera.h
similarity index 100%
rename from modules/camera/ExampleCamera.h
rename to modules/camera/3_0/ExampleCamera.h
diff --git a/modules/camera/Metadata.cpp b/modules/camera/3_0/Metadata.cpp
similarity index 100%
rename from modules/camera/Metadata.cpp
rename to modules/camera/3_0/Metadata.cpp
diff --git a/modules/camera/Metadata.h b/modules/camera/3_0/Metadata.h
similarity index 100%
rename from modules/camera/Metadata.h
rename to modules/camera/3_0/Metadata.h
diff --git a/modules/camera/Stream.cpp b/modules/camera/3_0/Stream.cpp
similarity index 100%
rename from modules/camera/Stream.cpp
rename to modules/camera/3_0/Stream.cpp
diff --git a/modules/camera/Stream.h b/modules/camera/3_0/Stream.h
similarity index 100%
rename from modules/camera/Stream.h
rename to modules/camera/3_0/Stream.h
diff --git a/modules/camera/VendorTags.cpp b/modules/camera/3_0/VendorTags.cpp
similarity index 100%
rename from modules/camera/VendorTags.cpp
rename to modules/camera/3_0/VendorTags.cpp
diff --git a/modules/camera/VendorTags.h b/modules/camera/3_0/VendorTags.h
similarity index 100%
rename from modules/camera/VendorTags.h
rename to modules/camera/3_0/VendorTags.h
diff --git a/modules/camera/Android.mk b/modules/camera/Android.mk
index ae68ed5..71388aa 100644
--- a/modules/camera/Android.mk
+++ b/modules/camera/Android.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2012 The Android Open Source Project
+# Copyright (C) 2016 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.
@@ -12,34 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := camera.default
-LOCAL_MODULE_RELATIVE_PATH := hw
-
-LOCAL_C_INCLUDES += \
- system/core/include \
- system/media/camera/include \
-
-LOCAL_SRC_FILES := \
- CameraHAL.cpp \
- Camera.cpp \
- ExampleCamera.cpp \
- Metadata.cpp \
- Stream.cpp \
- VendorTags.cpp \
-
-LOCAL_SHARED_LIBRARIES := \
- libcamera_metadata \
- libcutils \
- liblog \
- libsync \
- libutils \
-
-LOCAL_CFLAGS += -Wall -Wextra -fvisibility=hidden
-
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_SHARED_LIBRARY)
+include $(call all-subdir-makefiles)
diff --git a/modules/hwcomposer/hwcomposer.cpp b/modules/hwcomposer/hwcomposer.cpp
index 9d1aa34..7b2e278 100644
--- a/modules/hwcomposer/hwcomposer.cpp
+++ b/modules/hwcomposer/hwcomposer.cpp
@@ -38,18 +38,18 @@
struct hw_device_t** device);
static struct hw_module_methods_t hwc_module_methods = {
- open: hwc_device_open
+ .open = hwc_device_open
};
hwc_module_t HAL_MODULE_INFO_SYM = {
- common: {
- tag: HARDWARE_MODULE_TAG,
- version_major: 1,
- version_minor: 0,
- id: HWC_HARDWARE_MODULE_ID,
- name: "Sample hwcomposer module",
- author: "The Android Open Source Project",
- methods: &hwc_module_methods,
+ .common = {
+ .tag = HARDWARE_MODULE_TAG,
+ .version_major = 1,
+ .version_minor = 0,
+ .id = HWC_HARDWARE_MODULE_ID,
+ .name = "Sample hwcomposer module",
+ .author = "The Android Open Source Project",
+ .methods = &hwc_module_methods,
}
};
@@ -68,8 +68,8 @@
l->displayFrame.bottom);
}
-static int hwc_prepare(hwc_composer_device_1_t *dev,
- size_t numDisplays, hwc_display_contents_1_t** displays) {
+static int hwc_prepare(hwc_composer_device_1_t * /*dev*/,
+ size_t /*numDisplays*/, hwc_display_contents_1_t** displays) {
if (displays && (displays[0]->flags & HWC_GEOMETRY_CHANGED)) {
for (size_t i=0 ; i<displays[0]->numHwLayers ; i++) {
//dump_layer(&list->hwLayers[i]);
@@ -79,16 +79,16 @@
return 0;
}
-static int hwc_set(hwc_composer_device_1_t *dev,
- size_t numDisplays, hwc_display_contents_1_t** displays)
+static int hwc_set(hwc_composer_device_1_t * /*dev*/,
+ size_t /*numDisplays*/, hwc_display_contents_1_t** displays)
{
//for (size_t i=0 ; i<list->numHwLayers ; i++) {
// dump_layer(&list->hwLayers[i]);
//}
- EGLBoolean sucess = eglSwapBuffers((EGLDisplay)displays[0]->dpy,
+ EGLBoolean success = eglSwapBuffers((EGLDisplay)displays[0]->dpy,
(EGLSurface)displays[0]->sur);
- if (!sucess) {
+ if (!success) {
return HWC_EGL_ERROR;
}
return 0;
diff --git a/modules/input/evdev/InputHub.cpp b/modules/input/evdev/InputHub.cpp
index 389955d..e2c65fa 100644
--- a/modules/input/evdev/InputHub.cpp
+++ b/modules/input/evdev/InputHub.cpp
@@ -610,7 +610,7 @@
for (;;) {
ssize_t readSize = TEMP_FAILURE_RETRY(read(inputFd, ievs, sizeof(ievs)));
if (readSize == 0 || (readSize < 0 && errno == ENODEV)) {
- ALOGW("could not get event, removed? (fd: %d, size: %d errno: %d)",
+ ALOGW("could not get event, removed? (fd: %d, size: %zd errno: %d)",
inputFd, readSize, errno);
removedDeviceFds.push_back(inputFd);
@@ -621,7 +621,7 @@
}
break;
} else if (readSize % sizeof(input_event) != 0) {
- ALOGE("could not get event. wrong size=%d", readSize);
+ ALOGE("could not get event. wrong size=%zd", readSize);
break;
} else {
size_t count = static_cast<size_t>(readSize) / sizeof(struct input_event);
@@ -702,7 +702,7 @@
if (event->mask & IN_CREATE) {
auto deviceNode = openNode(path);
if (deviceNode == nullptr) {
- ALOGE("could not open device node %s. err=%d", path.c_str(), res);
+ ALOGE("could not open device node %s. err=%zd", path.c_str(), res);
} else {
mInputCallback->onDeviceAdded(deviceNode);
}
diff --git a/modules/local_time/local_time_hw.c b/modules/local_time/local_time_hw.c
index ac597f4..899c38a 100644
--- a/modules/local_time/local_time_hw.c
+++ b/modules/local_time/local_time_hw.c
@@ -28,6 +28,9 @@
#include <hardware/hardware.h>
#include <hardware/local_time_hal.h>
+// We only support gcc and clang, both of which support this attribute.
+#define UNUSED_ARGUMENT __attribute((unused))
+
struct stub_local_time_device {
struct local_time_hw_device device;
};
@@ -51,7 +54,8 @@
return (int64_t)now;
}
-static uint64_t ltdev_get_local_freq(struct local_time_hw_device* dev)
+static uint64_t ltdev_get_local_freq(
+ struct local_time_hw_device* dev UNUSED_ARGUMENT)
{
// For better or worse, linux clock_gettime routines normalize all clock
// frequencies to 1GHz
diff --git a/modules/nfc-nci/nfc_nci_example.c b/modules/nfc-nci/nfc_nci_example.c
index 758c2b7..ea5eb47 100644
--- a/modules/nfc-nci/nfc_nci_example.c
+++ b/modules/nfc-nci/nfc_nci_example.c
@@ -23,44 +23,61 @@
/*
+ * We want to silence the "unused argument" that gcc and clang give.
+ * Other compilers generating this warning will need to provide their
+ * custom attribute to silence this.
+ */
+#if defined(__GNUC__) || defined(__clang__)
+#define UNUSED_ARGUMENT __attribute((unused))
+#else
+#define UNUSED_ARGUMENT
+#endif
+
+/*
* NCI HAL method implementations. These must be overriden
*/
-static int hal_open(const struct nfc_nci_device *dev,
- nfc_stack_callback_t *p_cback, nfc_stack_data_callback_t *p_data_cback) {
+static int hal_open(const struct nfc_nci_device *dev UNUSED_ARGUMENT,
+ nfc_stack_callback_t *p_cback UNUSED_ARGUMENT,
+ nfc_stack_data_callback_t *p_data_cback UNUSED_ARGUMENT) {
ALOGE("NFC-NCI HAL: %s", __FUNCTION__);
return 0;
}
-static int hal_write(const struct nfc_nci_device *dev,
- uint16_t data_len, const uint8_t *p_data) {
+static int hal_write(const struct nfc_nci_device *dev UNUSED_ARGUMENT,
+ uint16_t data_len UNUSED_ARGUMENT,
+ const uint8_t *p_data UNUSED_ARGUMENT) {
ALOGE("NFC-NCI HAL: %s", __FUNCTION__);
return 0;
}
-static int hal_core_initialized(const struct nfc_nci_device *dev,
- uint8_t* p_core_init_rsp_params) {
+static int hal_core_initialized(
+ const struct nfc_nci_device *dev UNUSED_ARGUMENT,
+ uint8_t* p_core_init_rsp_params UNUSED_ARGUMENT) {
ALOGE("NFC-NCI HAL: %s", __FUNCTION__);
return 0;
}
-static int hal_pre_discover(const struct nfc_nci_device *dev) {
+static int hal_pre_discover(
+ const struct nfc_nci_device *dev UNUSED_ARGUMENT) {
ALOGE("NFC-NCI HAL: %s", __FUNCTION__);
return 0;
}
-static int hal_close(const struct nfc_nci_device *dev) {
+static int hal_close(const struct nfc_nci_device *dev UNUSED_ARGUMENT) {
ALOGE("NFC-NCI HAL: %s", __FUNCTION__);
return 0;
}
-static int hal_control_granted (const struct nfc_nci_device *p_dev)
+static int hal_control_granted (
+ const struct nfc_nci_device *p_dev UNUSED_ARGUMENT)
{
ALOGE("NFC-NCI HAL: %s", __FUNCTION__);
return 0;
}
-static int hal_power_cycle (const struct nfc_nci_device *p_dev)
+static int hal_power_cycle (
+ const struct nfc_nci_device *p_dev UNUSED_ARGUMENT)
{
ALOGE("NFC-NCI HAL: %s", __FUNCTION__);
return 0;
diff --git a/modules/sensors/tests/SensorEventQueue_test.cpp b/modules/sensors/tests/SensorEventQueue_test.cpp
index 3218bb9..d3d75ee 100644
--- a/modules/sensors/tests/SensorEventQueue_test.cpp
+++ b/modules/sensors/tests/SensorEventQueue_test.cpp
@@ -32,7 +32,7 @@
return true;
}
-bool checkInt(char* msg, int expected, int actual) {
+bool checkInt(const char* msg, int expected, int actual) {
if (actual != expected) {
printf("%s; expected %d; actual was %d\n", msg, expected, actual);
return false;
@@ -187,7 +187,7 @@
}
-int main(int argc, char **argv) {
+int main(int argc __attribute((unused)), char **argv __attribute((unused))) {
if (testSimpleWriteSizeCounts() &&
testWrappingWriteSizeCounts() &&
testFullQueueIo()) {
diff --git a/modules/tv_input/tv_input.cpp b/modules/tv_input/tv_input.cpp
index 114e80e..ddace28 100644
--- a/modules/tv_input/tv_input.cpp
+++ b/modules/tv_input/tv_input.cpp
@@ -37,18 +37,18 @@
const char* name, struct hw_device_t** device);
static struct hw_module_methods_t tv_input_module_methods = {
- open: tv_input_device_open
+ .open = tv_input_device_open
};
tv_input_module_t HAL_MODULE_INFO_SYM = {
- common: {
- tag: HARDWARE_MODULE_TAG,
- version_major: 0,
- version_minor: 1,
- id: TV_INPUT_HARDWARE_MODULE_ID,
- name: "Sample TV input module",
- author: "The Android Open Source Project",
- methods: &tv_input_module_methods,
+ .common = {
+ .tag = HARDWARE_MODULE_TAG,
+ .version_major = 0,
+ .version_minor = 1,
+ .id = TV_INPUT_HARDWARE_MODULE_ID,
+ .name = "Sample TV input module",
+ .author = "The Android Open Source Project",
+ .methods = &tv_input_module_methods,
}
};
diff --git a/modules/usbcamera/Camera.cpp b/modules/usbcamera/Camera.cpp
index cf62f7f..b396291 100644
--- a/modules/usbcamera/Camera.cpp
+++ b/modules/usbcamera/Camera.cpp
@@ -484,9 +484,9 @@
// TODO: dump all settings
dprintf(fd, "Most Recent Settings: (%p)\n", mSettings);
- dprintf(fd, "Number of streams: %d\n", mStreams.size());
+ dprintf(fd, "Number of streams: %zu\n", mStreams.size());
for (size_t i = 0; i < mStreams.size(); i++) {
- dprintf(fd, "Stream %d/%d:\n", i, mStreams.size());
+ dprintf(fd, "Stream %zu/%zu:\n", i, mStreams.size());
mStreams[i]->dump(fd);
}
}
diff --git a/modules/usbcamera/CameraHAL.cpp b/modules/usbcamera/CameraHAL.cpp
index 652e937..c54283b 100644
--- a/modules/usbcamera/CameraHAL.cpp
+++ b/modules/usbcamera/CameraHAL.cpp
@@ -65,7 +65,7 @@
int CameraHAL::getNumberOfCameras() {
android::Mutex::Autolock al(mModuleLock);
- ALOGV("%s: %d", __func__, mCameras.size());
+ ALOGV("%s: %zu", __func__, mCameras.size());
return static_cast<int>(mCameras.size());
}
@@ -126,29 +126,29 @@
}
static hw_module_methods_t gCameraModuleMethods = {
- open : open_dev
+ .open = open_dev
};
camera_module_t HAL_MODULE_INFO_SYM __attribute__ ((visibility("default"))) = {
- common : {
- tag : HARDWARE_MODULE_TAG,
- module_api_version : CAMERA_MODULE_API_VERSION_2_4,
- hal_api_version : HARDWARE_HAL_API_VERSION,
- id : CAMERA_HARDWARE_MODULE_ID,
- name : "Default USB Camera HAL",
- author : "The Android Open Source Project",
- methods : &gCameraModuleMethods,
- dso : NULL,
- reserved : {0},
+ .common = {
+ .tag = HARDWARE_MODULE_TAG,
+ .module_api_version = CAMERA_MODULE_API_VERSION_2_4,
+ .hal_api_version = HARDWARE_HAL_API_VERSION,
+ .id = CAMERA_HARDWARE_MODULE_ID,
+ .name = "Default USB Camera HAL",
+ .author = "The Android Open Source Project",
+ .methods = &gCameraModuleMethods,
+ .dso = NULL,
+ .reserved = {0},
},
- get_number_of_cameras : get_number_of_cameras,
- get_camera_info : get_camera_info,
- set_callbacks : set_callbacks,
- get_vendor_tag_ops : NULL,
- open_legacy : NULL,
- set_torch_mode : NULL,
- init : NULL,
- reserved : {0},
+ .get_number_of_cameras = get_number_of_cameras,
+ .get_camera_info = get_camera_info,
+ .set_callbacks = set_callbacks,
+ .get_vendor_tag_ops = NULL,
+ .open_legacy = NULL,
+ .set_torch_mode = NULL,
+ .init = NULL,
+ .reserved = {0},
};
} // extern "C"
diff --git a/modules/usbcamera/HotplugThread.cpp b/modules/usbcamera/HotplugThread.cpp
index 6c65086..02e7167 100644
--- a/modules/usbcamera/HotplugThread.cpp
+++ b/modules/usbcamera/HotplugThread.cpp
@@ -39,6 +39,7 @@
}
bool HotplugThread::threadLoop() {
+ (void)mModule; // silence warning about unused member.
/**
* Check camera connection status change, if connected, do below:
diff --git a/modules/usbcamera/Stream.cpp b/modules/usbcamera/Stream.cpp
index f56866e..2b83421 100644
--- a/modules/usbcamera/Stream.cpp
+++ b/modules/usbcamera/Stream.cpp
@@ -170,10 +170,9 @@
// ToDo: prettyprint usage mask flags
dprintf(fd, "Gralloc Usage Mask: %#" PRIx32 "\n", mStream->usage);
dprintf(fd, "Max Buffer Count: %" PRIu32 "\n", mStream->max_buffers);
- dprintf(fd, "Number of Buffers in use by HAL: %" PRIu32 "\n", mBuffers.size());
+ dprintf(fd, "Number of Buffers in use by HAL: %zu\n", mBuffers.size());
for (size_t i = 0; i < mBuffers.size(); i++) {
- dprintf(fd, "Buffer %" PRIu32 "/%" PRIu32 ": %p\n", i, mBuffers.size(),
- mBuffers[i]);
+ dprintf(fd, "Buffer %zu/%zu: %p\n", i, mBuffers.size(), mBuffers[i]);
}
}
diff --git a/modules/usbcamera/UsbCamera.cpp b/modules/usbcamera/UsbCamera.cpp
index d0aaded..9d53fc6 100644
--- a/modules/usbcamera/UsbCamera.cpp
+++ b/modules/usbcamera/UsbCamera.cpp
@@ -313,7 +313,7 @@
return setTemplate(CAMERA3_TEMPLATE_MANUAL, m.get());
}
-bool UsbCamera::isValidCaptureSettings(const camera_metadata_t* settings) {
+bool UsbCamera::isValidCaptureSettings(const camera_metadata_t* /*settings*/) {
// TODO: reject settings that cannot be captured
return true;
}
diff --git a/modules/vehicle/vehicle.c b/modules/vehicle/vehicle.c
index a26f27c..2d945fd 100644
--- a/modules/vehicle/vehicle.c
+++ b/modules/vehicle/vehicle.c
@@ -279,10 +279,10 @@
ALOGD("Value type: FLOAT\nValue: %f\n", data->value.float_value);
break;
case VEHICLE_VALUE_TYPE_INT32:
- ALOGD("Value type: INT32\nValue: %d\n", data->value.int32_value);
+ ALOGD("Value type: INT32\nValue: %" PRId32 "\n", data->value.int32_value);
break;
case VEHICLE_VALUE_TYPE_INT64:
- ALOGD("Value type: INT64\nValue: %lld\n", data->value.int64_value);
+ ALOGD("Value type: INT64\nValue: %" PRId64 "\n", data->value.int64_value);
break;
case VEHICLE_VALUE_TYPE_BOOLEAN:
ALOGD("Value type: BOOLEAN\nValue: %d\n", data->value.boolean_value);
@@ -331,22 +331,6 @@
event.prop = sub->prop;
event.timestamp = elapsedRealtimeNano();
switch (sub->prop) {
- case VEHICLE_PROPERTY_DRIVING_STATUS:
- event.value_type = VEHICLE_VALUE_TYPE_INT32;
- switch ((event.timestamp & 0x30000000)>>28) {
- case 0:
- event.value.driving_status = VEHICLE_DRIVING_STATUS_UNRESTRICTED;
- break;
- case 1:
- event.value.driving_status = VEHICLE_DRIVING_STATUS_NO_VIDEO;
- break;
- case 2:
- event.value.driving_status = VEHICLE_DRIVING_STATUS_NO_KEYBOARD_INPUT;
- break;
- default:
- event.value.driving_status = VEHICLE_DRIVING_STATUS_NO_CONFIG;
- }
- break;
case VEHICLE_PROPERTY_GEAR_SELECTION:
event.value_type = VEHICLE_VALUE_TYPE_INT32;
switch ((event.timestamp & 0x30000000)>>28) {
diff --git a/tests/hardware/Android.bp b/tests/hardware/Android.bp
deleted file mode 100644
index 668e28f..0000000
--- a/tests/hardware/Android.bp
+++ /dev/null
@@ -1,15 +0,0 @@
-cc_library_static {
- name: "static-hal-check",
- srcs: [
- "struct-size.cpp",
- "struct-offset.cpp",
- "struct-last.cpp",
- ],
- shared_libs: ["libhardware"],
- cflags: [
- "-std=gnu++11",
- "-O0",
- ],
-
- include_dirs: ["system/media/camera/include"],
-}
diff --git a/tests/hardware/Android.mk b/tests/hardware/Android.mk
new file mode 100644
index 0000000..02540c9
--- /dev/null
+++ b/tests/hardware/Android.mk
@@ -0,0 +1,12 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := static-hal-check
+LOCAL_SRC_FILES := struct-size.cpp struct-offset.cpp struct-last.cpp
+LOCAL_SHARED_LIBRARIES := libhardware
+LOCAL_CFLAGS := -std=gnu++11 -O0
+
+LOCAL_C_INCLUDES += \
+ system/media/camera/include
+
+include $(BUILD_STATIC_LIBRARY)