Merge "Add TURN_SIGNAL_STATE to enum VehicleProperty"
diff --git a/audio/common/2.0/vts/types.vts b/audio/common/2.0/vts/types.vts
new file mode 100644
index 0000000..42b97f3
--- /dev/null
+++ b/audio/common/2.0/vts/types.vts
@@ -0,0 +1,1667 @@
+component_class: HAL_HIDL
+component_type_version: 2.0
+component_name: "types"
+
+package: "android.hardware.audio.common"
+
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioHandleConsts"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "int32_t"
+
+        enumerator: "AUDIO_IO_HANDLE_NONE"
+        scalar_value: {
+            int32_t: 0
+        }
+        enumerator: "AUDIO_MODULE_HANDLE_NONE"
+        scalar_value: {
+            int32_t: 0
+        }
+        enumerator: "AUDIO_PORT_HANDLE_NONE"
+        scalar_value: {
+            int32_t: 0
+        }
+        enumerator: "AUDIO_PATCH_HANDLE_NONE"
+        scalar_value: {
+            int32_t: 0
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::Uuid"
+    type: TYPE_STRUCT
+    struct_value: {
+        name: "timeLow"
+        type: TYPE_SCALAR
+        scalar_type: "uint32_t"
+    }
+    struct_value: {
+        name: "timeMid"
+        type: TYPE_SCALAR
+        scalar_type: "uint16_t"
+    }
+    struct_value: {
+        name: "versionAndTimeHigh"
+        type: TYPE_SCALAR
+        scalar_type: "uint16_t"
+    }
+    struct_value: {
+        name: "variantAndClockSeqHigh"
+        type: TYPE_SCALAR
+        scalar_type: "uint16_t"
+    }
+    struct_value: {
+        name: "node"
+        type: TYPE_ARRAY
+        vector_value: {
+            vector_size: 6
+            type: TYPE_SCALAR
+            scalar_type: "uint8_t"
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioStreamType"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "int32_t"
+
+        enumerator: "DEFAULT"
+        scalar_value: {
+            int32_t: -1
+        }
+        enumerator: "MIN"
+        scalar_value: {
+            int32_t: 0
+        }
+        enumerator: "VOICE_CALL"
+        scalar_value: {
+            int32_t: 0
+        }
+        enumerator: "SYSTEM"
+        scalar_value: {
+            int32_t: 1
+        }
+        enumerator: "RING"
+        scalar_value: {
+            int32_t: 2
+        }
+        enumerator: "MUSIC"
+        scalar_value: {
+            int32_t: 3
+        }
+        enumerator: "ALARM"
+        scalar_value: {
+            int32_t: 4
+        }
+        enumerator: "NOTIFICATION"
+        scalar_value: {
+            int32_t: 5
+        }
+        enumerator: "BLUETOOTH_SCO"
+        scalar_value: {
+            int32_t: 6
+        }
+        enumerator: "ENFORCED_AUDIBLE"
+        scalar_value: {
+            int32_t: 7
+        }
+        enumerator: "DTMF"
+        scalar_value: {
+            int32_t: 8
+        }
+        enumerator: "TTS"
+        scalar_value: {
+            int32_t: 9
+        }
+        enumerator: "ACCESSIBILITY"
+        scalar_value: {
+            int32_t: 10
+        }
+        enumerator: "REROUTING"
+        scalar_value: {
+            int32_t: 11
+        }
+        enumerator: "PATCH"
+        scalar_value: {
+            int32_t: 12
+        }
+        enumerator: "PUBLIC_CNT"
+        scalar_value: {
+            int32_t: 10
+        }
+        enumerator: "FOR_POLICY_CNT"
+        scalar_value: {
+            int32_t: 12
+        }
+        enumerator: "CNT"
+        scalar_value: {
+            int32_t: 13
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioSource"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "int32_t"
+
+        enumerator: "DEFAULT"
+        scalar_value: {
+            int32_t: 0
+        }
+        enumerator: "MIC"
+        scalar_value: {
+            int32_t: 1
+        }
+        enumerator: "VOICE_UPLINK"
+        scalar_value: {
+            int32_t: 2
+        }
+        enumerator: "VOICE_DOWNLINK"
+        scalar_value: {
+            int32_t: 3
+        }
+        enumerator: "VOICE_CALL"
+        scalar_value: {
+            int32_t: 4
+        }
+        enumerator: "CAMCORDER"
+        scalar_value: {
+            int32_t: 5
+        }
+        enumerator: "VOICE_RECOGNITION"
+        scalar_value: {
+            int32_t: 6
+        }
+        enumerator: "VOICE_COMMUNICATION"
+        scalar_value: {
+            int32_t: 7
+        }
+        enumerator: "REMOTE_SUBMIX"
+        scalar_value: {
+            int32_t: 8
+        }
+        enumerator: "UNPROCESSED"
+        scalar_value: {
+            int32_t: 9
+        }
+        enumerator: "CNT"
+        scalar_value: {
+        }
+        enumerator: "MAX"
+        scalar_value: {
+            int32_t: 9
+        }
+        enumerator: "FM_TUNER"
+        scalar_value: {
+            int32_t: 1998
+        }
+        enumerator: "HOTWORD"
+        scalar_value: {
+            int32_t: 1999
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioSessionConsts"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "int32_t"
+
+        enumerator: "OUTPUT_STAGE"
+        scalar_value: {
+            int32_t: -1
+        }
+        enumerator: "OUTPUT_MIX"
+        scalar_value: {
+            int32_t: 0
+        }
+        enumerator: "ALLOCATE"
+        scalar_value: {
+            int32_t: 0
+        }
+        enumerator: "NONE"
+        scalar_value: {
+            int32_t: 0
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioFormat"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "uint32_t"
+
+        enumerator: "INVALID"
+        scalar_value: {
+            uint32_t: 4294967295
+        }
+        enumerator: "DEFAULT"
+        scalar_value: {
+            uint32_t: 0
+        }
+        enumerator: "PCM"
+        scalar_value: {
+            uint32_t: 0
+        }
+        enumerator: "MP3"
+        scalar_value: {
+            uint32_t: 16777216
+        }
+        enumerator: "AMR_NB"
+        scalar_value: {
+            uint32_t: 33554432
+        }
+        enumerator: "AMR_WB"
+        scalar_value: {
+            uint32_t: 50331648
+        }
+        enumerator: "AAC"
+        scalar_value: {
+            uint32_t: 67108864
+        }
+        enumerator: "HE_AAC_V1"
+        scalar_value: {
+            uint32_t: 83886080
+        }
+        enumerator: "HE_AAC_V2"
+        scalar_value: {
+            uint32_t: 100663296
+        }
+        enumerator: "VORBIS"
+        scalar_value: {
+            uint32_t: 117440512
+        }
+        enumerator: "OPUS"
+        scalar_value: {
+            uint32_t: 134217728
+        }
+        enumerator: "AC3"
+        scalar_value: {
+            uint32_t: 150994944
+        }
+        enumerator: "E_AC3"
+        scalar_value: {
+            uint32_t: 167772160
+        }
+        enumerator: "DTS"
+        scalar_value: {
+            uint32_t: 184549376
+        }
+        enumerator: "DTS_HD"
+        scalar_value: {
+            uint32_t: 201326592
+        }
+        enumerator: "IEC61937"
+        scalar_value: {
+            uint32_t: 218103808
+        }
+        enumerator: "DOLBY_TRUEHD"
+        scalar_value: {
+            uint32_t: 234881024
+        }
+        enumerator: "MAIN_MASK"
+        scalar_value: {
+            uint32_t: 4278190080
+        }
+        enumerator: "SUB_MASK"
+        scalar_value: {
+            uint32_t: 16777215
+        }
+        enumerator: "PCM_SUB_16_BIT"
+        scalar_value: {
+            uint32_t: 1
+        }
+        enumerator: "PCM_SUB_8_BIT"
+        scalar_value: {
+            uint32_t: 2
+        }
+        enumerator: "PCM_SUB_32_BIT"
+        scalar_value: {
+            uint32_t: 3
+        }
+        enumerator: "PCM_SUB_8_24_BIT"
+        scalar_value: {
+            uint32_t: 4
+        }
+        enumerator: "PCM_SUB_FLOAT"
+        scalar_value: {
+            uint32_t: 5
+        }
+        enumerator: "PCM_SUB_24_BIT_PACKED"
+        scalar_value: {
+            uint32_t: 6
+        }
+        enumerator: "MP3_SUB_NONE"
+        scalar_value: {
+            uint32_t: 0
+        }
+        enumerator: "AMR_SUB_NONE"
+        scalar_value: {
+            uint32_t: 0
+        }
+        enumerator: "AAC_SUB_MAIN"
+        scalar_value: {
+            uint32_t: 1
+        }
+        enumerator: "AAC_SUB_LC"
+        scalar_value: {
+            uint32_t: 2
+        }
+        enumerator: "AAC_SUB_SSR"
+        scalar_value: {
+            uint32_t: 4
+        }
+        enumerator: "AAC_SUB_LTP"
+        scalar_value: {
+            uint32_t: 8
+        }
+        enumerator: "AAC_SUB_HE_V1"
+        scalar_value: {
+            uint32_t: 16
+        }
+        enumerator: "AAC_SUB_SCALABLE"
+        scalar_value: {
+            uint32_t: 32
+        }
+        enumerator: "AAC_SUB_ERLC"
+        scalar_value: {
+            uint32_t: 64
+        }
+        enumerator: "AAC_SUB_LD"
+        scalar_value: {
+            uint32_t: 128
+        }
+        enumerator: "AAC_SUB_HE_V2"
+        scalar_value: {
+            uint32_t: 256
+        }
+        enumerator: "AAC_SUB_ELD"
+        scalar_value: {
+            uint32_t: 512
+        }
+        enumerator: "VORBIS_SUB_NONE"
+        scalar_value: {
+            uint32_t: 0
+        }
+        enumerator: "PCM_16_BIT"
+        scalar_value: {
+            uint32_t: 1
+        }
+        enumerator: "PCM_8_BIT"
+        scalar_value: {
+            uint32_t: 2
+        }
+        enumerator: "PCM_32_BIT"
+        scalar_value: {
+            uint32_t: 3
+        }
+        enumerator: "PCM_8_24_BIT"
+        scalar_value: {
+            uint32_t: 4
+        }
+        enumerator: "PCM_FLOAT"
+        scalar_value: {
+            uint32_t: 5
+        }
+        enumerator: "PCM_24_BIT_PACKED"
+        scalar_value: {
+            uint32_t: 6
+        }
+        enumerator: "AAC_MAIN"
+        scalar_value: {
+            uint32_t: 67108865
+        }
+        enumerator: "AAC_LC"
+        scalar_value: {
+            uint32_t: 67108866
+        }
+        enumerator: "AAC_SSR"
+        scalar_value: {
+            uint32_t: 67108868
+        }
+        enumerator: "AAC_LTP"
+        scalar_value: {
+            uint32_t: 67108872
+        }
+        enumerator: "AAC_HE_V1"
+        scalar_value: {
+            uint32_t: 67108880
+        }
+        enumerator: "AAC_SCALABLE"
+        scalar_value: {
+            uint32_t: 67108896
+        }
+        enumerator: "AAC_ERLC"
+        scalar_value: {
+            uint32_t: 67108928
+        }
+        enumerator: "AAC_LD"
+        scalar_value: {
+            uint32_t: 67108992
+        }
+        enumerator: "AAC_HE_V2"
+        scalar_value: {
+            uint32_t: 67109120
+        }
+        enumerator: "AAC_ELD"
+        scalar_value: {
+            uint32_t: 67109376
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::FixedChannelCount"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "int32_t"
+
+        enumerator: "FCC_2"
+        scalar_value: {
+            int32_t: 2
+        }
+        enumerator: "FCC_8"
+        scalar_value: {
+            int32_t: 8
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioChannelMask"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "uint32_t"
+
+        enumerator: "REPRESENTATION_POSITION"
+        scalar_value: {
+            uint32_t: 0
+        }
+        enumerator: "REPRESENTATION_INDEX"
+        scalar_value: {
+            uint32_t: 2
+        }
+        enumerator: "NONE"
+        scalar_value: {
+            uint32_t: 0
+        }
+        enumerator: "INVALID"
+        scalar_value: {
+            uint32_t: 3221225472
+        }
+        enumerator: "OUT_FRONT_LEFT"
+        scalar_value: {
+            uint32_t: 1
+        }
+        enumerator: "OUT_FRONT_RIGHT"
+        scalar_value: {
+            uint32_t: 2
+        }
+        enumerator: "OUT_FRONT_CENTER"
+        scalar_value: {
+            uint32_t: 4
+        }
+        enumerator: "OUT_LOW_FREQUENCY"
+        scalar_value: {
+            uint32_t: 8
+        }
+        enumerator: "OUT_BACK_LEFT"
+        scalar_value: {
+            uint32_t: 16
+        }
+        enumerator: "OUT_BACK_RIGHT"
+        scalar_value: {
+            uint32_t: 32
+        }
+        enumerator: "OUT_FRONT_LEFT_OF_CENTER"
+        scalar_value: {
+            uint32_t: 64
+        }
+        enumerator: "OUT_FRONT_RIGHT_OF_CENTER"
+        scalar_value: {
+            uint32_t: 128
+        }
+        enumerator: "OUT_BACK_CENTER"
+        scalar_value: {
+            uint32_t: 256
+        }
+        enumerator: "OUT_SIDE_LEFT"
+        scalar_value: {
+            uint32_t: 512
+        }
+        enumerator: "OUT_SIDE_RIGHT"
+        scalar_value: {
+            uint32_t: 1024
+        }
+        enumerator: "OUT_TOP_CENTER"
+        scalar_value: {
+            uint32_t: 2048
+        }
+        enumerator: "OUT_TOP_FRONT_LEFT"
+        scalar_value: {
+            uint32_t: 4096
+        }
+        enumerator: "OUT_TOP_FRONT_CENTER"
+        scalar_value: {
+            uint32_t: 8192
+        }
+        enumerator: "OUT_TOP_FRONT_RIGHT"
+        scalar_value: {
+            uint32_t: 16384
+        }
+        enumerator: "OUT_TOP_BACK_LEFT"
+        scalar_value: {
+            uint32_t: 32768
+        }
+        enumerator: "OUT_TOP_BACK_CENTER"
+        scalar_value: {
+            uint32_t: 65536
+        }
+        enumerator: "OUT_TOP_BACK_RIGHT"
+        scalar_value: {
+            uint32_t: 131072
+        }
+        enumerator: "OUT_MONO"
+        scalar_value: {
+            uint32_t: 1
+        }
+        enumerator: "OUT_STEREO"
+        scalar_value: {
+            uint32_t: 3
+        }
+        enumerator: "OUT_QUAD"
+        scalar_value: {
+            uint32_t: 51
+        }
+        enumerator: "OUT_QUAD_BACK"
+        scalar_value: {
+            uint32_t: 51
+        }
+        enumerator: "OUT_QUAD_SIDE"
+        scalar_value: {
+            uint32_t: 1539
+        }
+        enumerator: "OUT_5POINT1"
+        scalar_value: {
+            uint32_t: 63
+        }
+        enumerator: "OUT_5POINT1_BACK"
+        scalar_value: {
+            uint32_t: 63
+        }
+        enumerator: "OUT_5POINT1_SIDE"
+        scalar_value: {
+            uint32_t: 1551
+        }
+        enumerator: "OUT_7POINT1"
+        scalar_value: {
+            uint32_t: 1599
+        }
+        enumerator: "OUT_ALL"
+        scalar_value: {
+            uint32_t: 262143
+        }
+        enumerator: "IN_LEFT"
+        scalar_value: {
+            uint32_t: 4
+        }
+        enumerator: "IN_RIGHT"
+        scalar_value: {
+            uint32_t: 8
+        }
+        enumerator: "IN_FRONT"
+        scalar_value: {
+            uint32_t: 16
+        }
+        enumerator: "IN_BACK"
+        scalar_value: {
+            uint32_t: 32
+        }
+        enumerator: "IN_LEFT_PROCESSED"
+        scalar_value: {
+            uint32_t: 64
+        }
+        enumerator: "IN_RIGHT_PROCESSED"
+        scalar_value: {
+            uint32_t: 128
+        }
+        enumerator: "IN_FRONT_PROCESSED"
+        scalar_value: {
+            uint32_t: 256
+        }
+        enumerator: "IN_BACK_PROCESSED"
+        scalar_value: {
+            uint32_t: 512
+        }
+        enumerator: "IN_PRESSURE"
+        scalar_value: {
+            uint32_t: 1024
+        }
+        enumerator: "IN_X_AXIS"
+        scalar_value: {
+            uint32_t: 2048
+        }
+        enumerator: "IN_Y_AXIS"
+        scalar_value: {
+            uint32_t: 4096
+        }
+        enumerator: "IN_Z_AXIS"
+        scalar_value: {
+            uint32_t: 8192
+        }
+        enumerator: "IN_VOICE_UPLINK"
+        scalar_value: {
+            uint32_t: 16384
+        }
+        enumerator: "IN_VOICE_DNLINK"
+        scalar_value: {
+            uint32_t: 32768
+        }
+        enumerator: "IN_MONO"
+        scalar_value: {
+            uint32_t: 16
+        }
+        enumerator: "IN_STEREO"
+        scalar_value: {
+            uint32_t: 12
+        }
+        enumerator: "IN_FRONT_BACK"
+        scalar_value: {
+            uint32_t: 48
+        }
+        enumerator: "IN_ALL"
+        scalar_value: {
+            uint32_t: 65532
+        }
+        enumerator: "COUNT_MAX"
+        scalar_value: {
+            uint32_t: 30
+        }
+        enumerator: "INDEX_HDR"
+        scalar_value: {
+            uint32_t: -2147483648
+        }
+        enumerator: "INDEX_MASK_1"
+        scalar_value: {
+            uint32_t: -2147483647
+        }
+        enumerator: "INDEX_MASK_2"
+        scalar_value: {
+            uint32_t: -2147483645
+        }
+        enumerator: "INDEX_MASK_3"
+        scalar_value: {
+            uint32_t: -2147483641
+        }
+        enumerator: "INDEX_MASK_4"
+        scalar_value: {
+            uint32_t: -2147483633
+        }
+        enumerator: "INDEX_MASK_5"
+        scalar_value: {
+            uint32_t: -2147483617
+        }
+        enumerator: "INDEX_MASK_6"
+        scalar_value: {
+            uint32_t: -2147483585
+        }
+        enumerator: "INDEX_MASK_7"
+        scalar_value: {
+            uint32_t: -2147483521
+        }
+        enumerator: "INDEX_MASK_8"
+        scalar_value: {
+            uint32_t: -2147483393
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioInterleave"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "int32_t"
+
+        enumerator: "LEFT"
+        scalar_value: {
+            int32_t: 0
+        }
+        enumerator: "RIGHT"
+        scalar_value: {
+            int32_t: 1
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioMode"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "int32_t"
+
+        enumerator: "INVALID"
+        scalar_value: {
+            int32_t: -2
+        }
+        enumerator: "CURRENT"
+        scalar_value: {
+            int32_t: -1
+        }
+        enumerator: "NORMAL"
+        scalar_value: {
+            int32_t: 0
+        }
+        enumerator: "RINGTONE"
+        scalar_value: {
+            int32_t: 1
+        }
+        enumerator: "IN_CALL"
+        scalar_value: {
+            int32_t: 2
+        }
+        enumerator: "IN_COMMUNICATION"
+        scalar_value: {
+            int32_t: 3
+        }
+        enumerator: "CNT"
+        scalar_value: {
+        }
+        enumerator: "MAX"
+        scalar_value: {
+            int32_t: 3
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioDevice"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "uint32_t"
+
+        enumerator: "NONE"
+        scalar_value: {
+            uint32_t: 0
+        }
+        enumerator: "BIT_IN"
+        scalar_value: {
+            uint32_t: 2147483648
+        }
+        enumerator: "BIT_DEFAULT"
+        scalar_value: {
+            uint32_t: 1073741824
+        }
+        enumerator: "OUT_EARPIECE"
+        scalar_value: {
+            uint32_t: 1
+        }
+        enumerator: "OUT_SPEAKER"
+        scalar_value: {
+            uint32_t: 2
+        }
+        enumerator: "OUT_WIRED_HEADSET"
+        scalar_value: {
+            uint32_t: 4
+        }
+        enumerator: "OUT_WIRED_HEADPHONE"
+        scalar_value: {
+            uint32_t: 8
+        }
+        enumerator: "OUT_BLUETOOTH_SCO"
+        scalar_value: {
+            uint32_t: 16
+        }
+        enumerator: "OUT_BLUETOOTH_SCO_HEADSET"
+        scalar_value: {
+            uint32_t: 32
+        }
+        enumerator: "OUT_BLUETOOTH_SCO_CARKIT"
+        scalar_value: {
+            uint32_t: 64
+        }
+        enumerator: "OUT_BLUETOOTH_A2DP"
+        scalar_value: {
+            uint32_t: 128
+        }
+        enumerator: "OUT_BLUETOOTH_A2DP_HEADPHONES"
+        scalar_value: {
+            uint32_t: 256
+        }
+        enumerator: "OUT_BLUETOOTH_A2DP_SPEAKER"
+        scalar_value: {
+            uint32_t: 512
+        }
+        enumerator: "OUT_AUX_DIGITAL"
+        scalar_value: {
+            uint32_t: 1024
+        }
+        enumerator: "OUT_HDMI"
+        scalar_value: {
+            uint32_t: 1024
+        }
+        enumerator: "OUT_ANLG_DOCK_HEADSET"
+        scalar_value: {
+            uint32_t: 2048
+        }
+        enumerator: "OUT_DGTL_DOCK_HEADSET"
+        scalar_value: {
+            uint32_t: 4096
+        }
+        enumerator: "OUT_USB_ACCESSORY"
+        scalar_value: {
+            uint32_t: 8192
+        }
+        enumerator: "OUT_USB_DEVICE"
+        scalar_value: {
+            uint32_t: 16384
+        }
+        enumerator: "OUT_REMOTE_SUBMIX"
+        scalar_value: {
+            uint32_t: 32768
+        }
+        enumerator: "OUT_TELEPHONY_TX"
+        scalar_value: {
+            uint32_t: 65536
+        }
+        enumerator: "OUT_LINE"
+        scalar_value: {
+            uint32_t: 131072
+        }
+        enumerator: "OUT_HDMI_ARC"
+        scalar_value: {
+            uint32_t: 262144
+        }
+        enumerator: "OUT_SPDIF"
+        scalar_value: {
+            uint32_t: 524288
+        }
+        enumerator: "OUT_FM"
+        scalar_value: {
+            uint32_t: 1048576
+        }
+        enumerator: "OUT_AUX_LINE"
+        scalar_value: {
+            uint32_t: 2097152
+        }
+        enumerator: "OUT_SPEAKER_SAFE"
+        scalar_value: {
+            uint32_t: 4194304
+        }
+        enumerator: "OUT_IP"
+        scalar_value: {
+            uint32_t: 8388608
+        }
+        enumerator: "OUT_BUS"
+        scalar_value: {
+            uint32_t: 16777216
+        }
+        enumerator: "OUT_DEFAULT"
+        scalar_value: {
+            uint32_t: 1073741824
+        }
+        enumerator: "OUT_ALL"
+        scalar_value: {
+            uint32_t: 1107296255
+        }
+        enumerator: "OUT_ALL_A2DP"
+        scalar_value: {
+            uint32_t: 896
+        }
+        enumerator: "OUT_ALL_SCO"
+        scalar_value: {
+            uint32_t: 112
+        }
+        enumerator: "OUT_ALL_USB"
+        scalar_value: {
+            uint32_t: 24576
+        }
+        enumerator: "IN_COMMUNICATION"
+        scalar_value: {
+            uint32_t: 2147483649
+        }
+        enumerator: "IN_AMBIENT"
+        scalar_value: {
+            uint32_t: 2147483650
+        }
+        enumerator: "IN_BUILTIN_MIC"
+        scalar_value: {
+            uint32_t: 2147483652
+        }
+        enumerator: "IN_BLUETOOTH_SCO_HEADSET"
+        scalar_value: {
+            uint32_t: 2147483656
+        }
+        enumerator: "IN_WIRED_HEADSET"
+        scalar_value: {
+            uint32_t: 2147483664
+        }
+        enumerator: "IN_AUX_DIGITAL"
+        scalar_value: {
+            uint32_t: 2147483680
+        }
+        enumerator: "IN_HDMI"
+        scalar_value: {
+            uint32_t: 2147483680
+        }
+        enumerator: "IN_VOICE_CALL"
+        scalar_value: {
+            uint32_t: 2147483712
+        }
+        enumerator: "IN_TELEPHONY_RX"
+        scalar_value: {
+            uint32_t: 2147483712
+        }
+        enumerator: "IN_BACK_MIC"
+        scalar_value: {
+            uint32_t: 2147483776
+        }
+        enumerator: "IN_REMOTE_SUBMIX"
+        scalar_value: {
+            uint32_t: 2147483904
+        }
+        enumerator: "IN_ANLG_DOCK_HEADSET"
+        scalar_value: {
+            uint32_t: 2147484160
+        }
+        enumerator: "IN_DGTL_DOCK_HEADSET"
+        scalar_value: {
+            uint32_t: 2147484672
+        }
+        enumerator: "IN_USB_ACCESSORY"
+        scalar_value: {
+            uint32_t: 2147485696
+        }
+        enumerator: "IN_USB_DEVICE"
+        scalar_value: {
+            uint32_t: 2147487744
+        }
+        enumerator: "IN_FM_TUNER"
+        scalar_value: {
+            uint32_t: 2147491840
+        }
+        enumerator: "IN_TV_TUNER"
+        scalar_value: {
+            uint32_t: 2147500032
+        }
+        enumerator: "IN_LINE"
+        scalar_value: {
+            uint32_t: 2147516416
+        }
+        enumerator: "IN_SPDIF"
+        scalar_value: {
+            uint32_t: 2147549184
+        }
+        enumerator: "IN_BLUETOOTH_A2DP"
+        scalar_value: {
+            uint32_t: 2147614720
+        }
+        enumerator: "IN_LOOPBACK"
+        scalar_value: {
+            uint32_t: 2147745792
+        }
+        enumerator: "IN_IP"
+        scalar_value: {
+            uint32_t: 2148007936
+        }
+        enumerator: "IN_BUS"
+        scalar_value: {
+            uint32_t: 2148532224
+        }
+        enumerator: "IN_DEFAULT"
+        scalar_value: {
+            uint32_t: 3221225472
+        }
+        enumerator: "IN_ALL"
+        scalar_value: {
+            uint32_t: 3223322623
+        }
+        enumerator: "IN_ALL_SCO"
+        scalar_value: {
+            uint32_t: 2147483656
+        }
+        enumerator: "IN_ALL_USB"
+        scalar_value: {
+            uint32_t: 2147489792
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioOutputFlag"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "int32_t"
+
+        enumerator: "NONE"
+        scalar_value: {
+            int32_t: 0
+        }
+        enumerator: "DIRECT"
+        scalar_value: {
+            int32_t: 1
+        }
+        enumerator: "PRIMARY"
+        scalar_value: {
+            int32_t: 2
+        }
+        enumerator: "FAST"
+        scalar_value: {
+            int32_t: 4
+        }
+        enumerator: "DEEP_BUFFER"
+        scalar_value: {
+            int32_t: 8
+        }
+        enumerator: "COMPRESS_OFFLOAD"
+        scalar_value: {
+            int32_t: 16
+        }
+        enumerator: "NON_BLOCKING"
+        scalar_value: {
+            int32_t: 32
+        }
+        enumerator: "HW_AV_SYNC"
+        scalar_value: {
+            int32_t: 64
+        }
+        enumerator: "TTS"
+        scalar_value: {
+            int32_t: 128
+        }
+        enumerator: "RAW"
+        scalar_value: {
+            int32_t: 256
+        }
+        enumerator: "SYNC"
+        scalar_value: {
+            int32_t: 512
+        }
+        enumerator: "IEC958_NONAUDIO"
+        scalar_value: {
+            int32_t: 1024
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioInputFlag"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "int32_t"
+
+        enumerator: "NONE"
+        scalar_value: {
+            int32_t: 0
+        }
+        enumerator: "FAST"
+        scalar_value: {
+            int32_t: 1
+        }
+        enumerator: "HW_HOTWORD"
+        scalar_value: {
+            int32_t: 2
+        }
+        enumerator: "RAW"
+        scalar_value: {
+            int32_t: 4
+        }
+        enumerator: "SYNC"
+        scalar_value: {
+            int32_t: 8
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioOffloadInfo"
+    type: TYPE_STRUCT
+    struct_value: {
+        name: "sampleRateHz"
+        type: TYPE_SCALAR
+        scalar_type: "uint32_t"
+    }
+    struct_value: {
+        name: "channelMask"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioChannelMask"
+    }
+    struct_value: {
+        name: "format"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioFormat"
+    }
+    struct_value: {
+        name: "streamType"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioStreamType"
+    }
+    struct_value: {
+        name: "bitRatePerSecond"
+        type: TYPE_SCALAR
+        scalar_type: "uint32_t"
+    }
+    struct_value: {
+        name: "durationMicroseconds"
+        type: TYPE_SCALAR
+        scalar_type: "int64_t"
+    }
+    struct_value: {
+        name: "hasVideo"
+        type: TYPE_SCALAR
+        scalar_type: "bool_t"
+    }
+    struct_value: {
+        name: "isStreaming"
+        type: TYPE_SCALAR
+        scalar_type: "bool_t"
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioConfig"
+    type: TYPE_STRUCT
+    struct_value: {
+        name: "sampleRateHz"
+        type: TYPE_SCALAR
+        scalar_type: "uint32_t"
+    }
+    struct_value: {
+        name: "channelMask"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioChannelMask"
+    }
+    struct_value: {
+        name: "format"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioFormat"
+    }
+    struct_value: {
+        name: "offloadInfo"
+        type: TYPE_STRUCT
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioOffloadInfo"
+    }
+    struct_value: {
+        name: "frameCount"
+        type: TYPE_SCALAR
+        scalar_type: "uint64_t"
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioGainMode"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "uint32_t"
+
+        enumerator: "JOINT"
+        scalar_value: {
+            uint32_t: 1
+        }
+        enumerator: "CHANNELS"
+        scalar_value: {
+            uint32_t: 2
+        }
+        enumerator: "RAMP"
+        scalar_value: {
+            uint32_t: 4
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioGain"
+    type: TYPE_STRUCT
+    struct_value: {
+        name: "mode"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioGainMode"
+    }
+    struct_value: {
+        name: "channelMask"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioChannelMask"
+    }
+    struct_value: {
+        name: "minValue"
+        type: TYPE_SCALAR
+        scalar_type: "int32_t"
+    }
+    struct_value: {
+        name: "maxValue"
+        type: TYPE_SCALAR
+        scalar_type: "int32_t"
+    }
+    struct_value: {
+        name: "defaultValue"
+        type: TYPE_SCALAR
+        scalar_type: "int32_t"
+    }
+    struct_value: {
+        name: "stepValue"
+        type: TYPE_SCALAR
+        scalar_type: "uint32_t"
+    }
+    struct_value: {
+        name: "minRampMs"
+        type: TYPE_SCALAR
+        scalar_type: "uint32_t"
+    }
+    struct_value: {
+        name: "maxRampMs"
+        type: TYPE_SCALAR
+        scalar_type: "uint32_t"
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioGainConfig"
+    type: TYPE_STRUCT
+    struct_value: {
+        name: "index"
+        type: TYPE_SCALAR
+        scalar_type: "int32_t"
+    }
+    struct_value: {
+        name: "mode"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioGainMode"
+    }
+    struct_value: {
+        name: "channelMask"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioChannelMask"
+    }
+    struct_value: {
+        name: "values"
+        type: TYPE_ARRAY
+        vector_value: {
+            vector_size: 32
+            type: TYPE_SCALAR
+            scalar_type: "int32_t"
+        }
+    }
+    struct_value: {
+        name: "rampDurationMs"
+        type: TYPE_SCALAR
+        scalar_type: "uint32_t"
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioPortRole"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "int32_t"
+
+        enumerator: "NONE"
+        scalar_value: {
+        }
+        enumerator: "SOURCE"
+        scalar_value: {
+        }
+        enumerator: "SINK"
+        scalar_value: {
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioPortType"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "int32_t"
+
+        enumerator: "NONE"
+        scalar_value: {
+        }
+        enumerator: "DEVICE"
+        scalar_value: {
+        }
+        enumerator: "MIX"
+        scalar_value: {
+        }
+        enumerator: "SESSION"
+        scalar_value: {
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioPortConfigDeviceExt"
+    type: TYPE_STRUCT
+    struct_value: {
+        name: "hwModule"
+        type: TYPE_SCALAR
+        scalar_type: "int32_t"
+    }
+    struct_value: {
+        name: "type"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioDevice"
+    }
+    struct_value: {
+        name: "address"
+        type: TYPE_ARRAY
+        vector_value: {
+            vector_size: 32
+            type: TYPE_SCALAR
+            scalar_type: "uint8_t"
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioPortConfigSessionExt"
+    type: TYPE_STRUCT
+    struct_value: {
+        name: "session"
+        type: TYPE_SCALAR
+        scalar_type: "int32_t"
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioPortConfigMask"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "uint32_t"
+
+        enumerator: "SAMPLE_RATE"
+        scalar_value: {
+            uint32_t: 1
+        }
+        enumerator: "CHANNEL_MASK"
+        scalar_value: {
+            uint32_t: 2
+        }
+        enumerator: "FORMAT"
+        scalar_value: {
+            uint32_t: 4
+        }
+        enumerator: "GAIN"
+        scalar_value: {
+            uint32_t: 8
+        }
+        enumerator: "ALL"
+        scalar_value: {
+            uint32_t: 15
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioPortConfig"
+    type: TYPE_STRUCT
+    sub_struct: {
+        name: "::android::hardware::audio::common::V2_0::AudioPortConfig::Ext"
+        type: TYPE_UNION
+        sub_union: {
+            name: "::android::hardware::audio::common::V2_0::AudioPortConfig::Ext::AudioPortConfigMixExt"
+            type: TYPE_STRUCT
+            sub_struct: {
+                name: "::android::hardware::audio::common::V2_0::AudioPortConfig::Ext::AudioPortConfigMixExt::UseCase"
+                type: TYPE_UNION
+                union_value: {
+                    name: "stream"
+                    type: TYPE_ENUM
+                    predefined_type: "::android::hardware::audio::common::V2_0::AudioStreamType"
+                }
+                union_value: {
+                    name: "source"
+                    type: TYPE_ENUM
+                    predefined_type: "::android::hardware::audio::common::V2_0::AudioSource"
+                }
+            }
+            struct_value: {
+                name: "hwModule"
+                type: TYPE_SCALAR
+                scalar_type: "int32_t"
+            }
+            struct_value: {
+                name: "ioHandle"
+                type: TYPE_SCALAR
+                scalar_type: "int32_t"
+            }
+        }
+        union_value: {
+            name: "device"
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::audio::common::V2_0::AudioPortConfigDeviceExt"
+        }
+        union_value: {
+            name: "mix"
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::audio::common::V2_0::AudioPortConfig::Ext::AudioPortConfigMixExt"
+        }
+        union_value: {
+            name: "session"
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::audio::common::V2_0::AudioPortConfigSessionExt"
+        }
+    }
+    struct_value: {
+        name: "id"
+        type: TYPE_SCALAR
+        scalar_type: "int32_t"
+    }
+    struct_value: {
+        name: "configMask"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioPortConfigMask"
+    }
+    struct_value: {
+        name: "sampleRateHz"
+        type: TYPE_SCALAR
+        scalar_type: "uint32_t"
+    }
+    struct_value: {
+        name: "channelMask"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioChannelMask"
+    }
+    struct_value: {
+        name: "format"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioFormat"
+    }
+    struct_value: {
+        name: "gain"
+        type: TYPE_STRUCT
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioGainConfig"
+    }
+    struct_value: {
+        name: "type"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioPortType"
+    }
+    struct_value: {
+        name: "role"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioPortRole"
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioPortDeviceExt"
+    type: TYPE_STRUCT
+    struct_value: {
+        name: "hwModule"
+        type: TYPE_SCALAR
+        scalar_type: "int32_t"
+    }
+    struct_value: {
+        name: "type"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioDevice"
+    }
+    struct_value: {
+        name: "address"
+        type: TYPE_ARRAY
+        vector_value: {
+            vector_size: 32
+            type: TYPE_SCALAR
+            scalar_type: "uint8_t"
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioMixLatencyClass"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "int32_t"
+
+        enumerator: "LOW"
+        scalar_value: {
+        }
+        enumerator: "NORMAL"
+        scalar_value: {
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioPortMixExt"
+    type: TYPE_STRUCT
+    struct_value: {
+        name: "hwModule"
+        type: TYPE_SCALAR
+        scalar_type: "int32_t"
+    }
+    struct_value: {
+        name: "ioHandle"
+        type: TYPE_SCALAR
+        scalar_type: "int32_t"
+    }
+    struct_value: {
+        name: "latencyClass"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioMixLatencyClass"
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioPortSessionExt"
+    type: TYPE_STRUCT
+    struct_value: {
+        name: "session"
+        type: TYPE_SCALAR
+        scalar_type: "int32_t"
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioPort"
+    type: TYPE_STRUCT
+    sub_struct: {
+        name: "::android::hardware::audio::common::V2_0::AudioPort::Ext"
+        type: TYPE_UNION
+        union_value: {
+            name: "device"
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::audio::common::V2_0::AudioPortDeviceExt"
+        }
+        union_value: {
+            name: "mix"
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::audio::common::V2_0::AudioPortMixExt"
+        }
+        union_value: {
+            name: "session"
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::audio::common::V2_0::AudioPortSessionExt"
+        }
+    }
+    struct_value: {
+        name: "id"
+        type: TYPE_SCALAR
+        scalar_type: "int32_t"
+    }
+    struct_value: {
+        name: "role"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioPortRole"
+    }
+    struct_value: {
+        name: "name"
+        type: TYPE_STRING
+    }
+    struct_value: {
+        name: "sampleRates"
+        type: TYPE_VECTOR
+        vector_value: {
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+    }
+    struct_value: {
+        name: "channelMasks"
+        type: TYPE_VECTOR
+        vector_value: {
+            type: TYPE_ENUM
+            predefined_type: "::android::hardware::audio::common::V2_0::AudioChannelMask"
+        }
+    }
+    struct_value: {
+        name: "formats"
+        type: TYPE_VECTOR
+        vector_value: {
+            type: TYPE_ENUM
+            predefined_type: "::android::hardware::audio::common::V2_0::AudioFormat"
+        }
+    }
+    struct_value: {
+        name: "gains"
+        type: TYPE_VECTOR
+        vector_value: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::audio::common::V2_0::AudioGain"
+        }
+    }
+    struct_value: {
+        name: "activeConfig"
+        type: TYPE_STRUCT
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioPortConfig"
+    }
+    struct_value: {
+        name: "type"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::audio::common::V2_0::AudioPortType"
+    }
+}
+
+attribute: {
+    name: "::android::hardware::audio::common::V2_0::AudioPatch"
+    type: TYPE_STRUCT
+    struct_value: {
+        name: "id"
+        type: TYPE_SCALAR
+        scalar_type: "int32_t"
+    }
+    struct_value: {
+        name: "sources"
+        type: TYPE_VECTOR
+        vector_value: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::audio::common::V2_0::AudioPortConfig"
+        }
+    }
+    struct_value: {
+        name: "sinks"
+        type: TYPE_VECTOR
+        vector_value: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::audio::common::V2_0::AudioPortConfig"
+        }
+    }
+}
+
diff --git a/biometrics/fingerprint/2.1/IBiometricsFingerprint.hal b/biometrics/fingerprint/2.1/IBiometricsFingerprint.hal
index 7494c58..b7f8d88 100644
--- a/biometrics/fingerprint/2.1/IBiometricsFingerprint.hal
+++ b/biometrics/fingerprint/2.1/IBiometricsFingerprint.hal
@@ -16,8 +16,24 @@
 
 package android.hardware.biometrics.fingerprint@2.1;
 
+import IBiometricsFingerprintClientCallback;
+
 interface IBiometricsFingerprint {
   /*
+   * Set notification callback:
+   * Registers a user function that must receive notifications from the HAL
+   * This call must block if the HAL state machine is in busy state until HAL
+   * leaves the busy state.
+   *
+   * @return isOk indicates if the request is accepted.
+   * @return debugErrno is a value the framework logs in case isOk == false.
+   */
+  @callflow(next={"setActiveGroup"})
+  @entry
+  setNotify(IBiometricsFingerprintClientCallback clientCallback)
+      generates (bool isOk, int32_t debugErrno);
+
+  /*
    * Fingerprint pre-enroll enroll request:
    * Generates a unique token to upper layers to indicate the start of
    * an enrollment transaction. pre-enroll and post-enroll specify
@@ -138,7 +154,6 @@
    * @return debugErrno is a value the framework logs in case isOk == false.
    */
   @callflow(next={"authenticate", "preEnroll", "enumerate", "remove"})
-  @entry
   setActiveGroup(uint32_t gid, string storePath)
       generates (bool isOk, int32_t debugErrno);
 
diff --git a/biometrics/fingerprint/2.1/default/Android.mk b/biometrics/fingerprint/2.1/default/Android.mk
new file mode 100644
index 0000000..be8bae6
--- /dev/null
+++ b/biometrics/fingerprint/2.1/default/Android.mk
@@ -0,0 +1,17 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.biometrics.fingerprint@2.1-impl
+LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_SRC_FILES := \
+    BiometricsFingerprint.cpp \
+
+LOCAL_SHARED_LIBRARIES := \
+    liblog \
+    libhidl \
+    libhardware \
+    libhwbinder \
+    libutils \
+    android.hardware.biometrics.fingerprint@2.1 \
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/biometrics/fingerprint/2.1/default/BiometricsFingerprint.cpp b/biometrics/fingerprint/2.1/default/BiometricsFingerprint.cpp
new file mode 100644
index 0000000..3ee7836
--- /dev/null
+++ b/biometrics/fingerprint/2.1/default/BiometricsFingerprint.cpp
@@ -0,0 +1,153 @@
+/*
+ * 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.
+ * 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.
+ */
+
+#include <hardware/hardware.h>
+#include <hardware/fingerprint.h>
+#include "BiometricsFingerprint.h"
+
+namespace android {
+namespace hardware {
+namespace biometrics {
+namespace fingerprint {
+namespace V2_1 {
+namespace implementation {
+
+sp<IBiometricsFingerprintClientCallback>
+    BiometricsFingerprint::mClientCallback = nullptr;
+
+BiometricsFingerprint::BiometricsFingerprint(fingerprint_device_t *device)
+    : mDevice(device) {}
+
+BiometricsFingerprint::~BiometricsFingerprint() {
+    ALOG(LOG_VERBOSE, LOG_TAG, "nativeCloseHal()\n");
+    if (mDevice == NULL) {
+        ALOGE("No valid device");
+        return;
+    }
+    int err;
+    if (0 != (err = mDevice->common.close(
+            reinterpret_cast<hw_device_t*>(mDevice)))) {
+        ALOGE("Can't close fingerprint module, error: %d", err);
+        return;
+    }
+    mDevice = NULL;
+}
+
+Return<void> BiometricsFingerprint::setNotify(
+        const sp<IBiometricsFingerprintClientCallback>& clientCallback,
+        setNotify_cb cb)  {
+    mClientCallback = clientCallback;
+    int32_t debugErrno = mDevice->set_notify(mDevice, notify);
+    cb(debugErrno == 0, debugErrno);
+    return Void();
+}
+
+Return<uint64_t> BiometricsFingerprint::preEnroll()  {
+    return mDevice->pre_enroll(mDevice);
+}
+
+Return<void> BiometricsFingerprint::enroll(const HwAuthToken& hat, uint32_t gid,
+        uint32_t timeoutSec, enroll_cb cb)  {
+    const hw_auth_token_t* authToken =
+        reinterpret_cast<const hw_auth_token_t*>(&hat);
+    int32_t debugErrno = mDevice->enroll(mDevice, authToken, gid, timeoutSec);
+    cb(debugErrno == 0, debugErrno);
+    return Void();
+}
+
+Return<void> BiometricsFingerprint::postEnroll(postEnroll_cb cb) {
+    int32_t debugErrno = mDevice->post_enroll(mDevice);
+    cb(debugErrno == 0, debugErrno);
+    return Void();
+}
+
+Return<uint64_t> BiometricsFingerprint::getAuthenticatorId() {
+    return mDevice->get_authenticator_id(mDevice);
+}
+
+Return<void> BiometricsFingerprint::cancel(cancel_cb cb) {
+    int32_t debugErrno = mDevice->cancel(mDevice);
+    cb(debugErrno == 0, debugErrno);
+    return Void();
+}
+
+Return<void> BiometricsFingerprint::enumerate(enumerate_cb cb)  {
+    int32_t debugErrno = mDevice->enumerate(mDevice);
+    cb(debugErrno == 0, debugErrno);
+    return Void();
+}
+
+Return<void> BiometricsFingerprint::remove(uint32_t gid, uint32_t fid,
+        remove_cb cb)  {
+    int32_t debugErrno = mDevice->remove(mDevice, gid, fid);
+    cb(debugErrno == 0, debugErrno);
+    return Void();
+}
+
+Return<void> BiometricsFingerprint::setActiveGroup(uint32_t gid,
+        const hidl_string& storePath, setActiveGroup_cb cb)  {
+    if (storePath.size() >= PATH_MAX || storePath.size() <= 0) {
+        ALOGE("Bad path length: %zd", storePath.size());
+    }
+    int32_t debugErrno = mDevice->set_active_group(mDevice, gid,
+        storePath.c_str());
+    cb(debugErrno == 0, debugErrno);
+    return Void();
+}
+
+Return<void> BiometricsFingerprint::authenticate(uint64_t operationId,
+        uint32_t gid, authenticate_cb cb)  {
+    int32_t debugErrno = mDevice->authenticate(mDevice, operationId, gid);
+    cb(debugErrno == 0, debugErrno);
+    return Void();
+}
+
+IBiometricsFingerprint* HIDL_FETCH_IBiometricsFingerprint(const char*) {
+    int err;
+    const hw_module_t *hw_mdl = NULL;
+    if (0 != (err = hw_get_module(FINGERPRINT_HARDWARE_MODULE_ID, &hw_mdl))) {
+        ALOGE("Can't open fingerprint HW Module, error: %d", err);
+        return nullptr;
+    }
+    if (hw_mdl == NULL) {
+        ALOGE("No valid fingerprint module");
+        return nullptr;
+    }
+
+    fingerprint_module_t const *module =
+        reinterpret_cast<const fingerprint_module_t*>(hw_mdl);
+    if (module->common.methods->open == NULL) {
+        ALOGE("No valid open method");
+        return nullptr;
+    }
+
+    hw_device_t *device = NULL;
+
+    if (0 != (err = module->common.methods->open(hw_mdl, NULL, &device))) {
+        ALOGE("Can't open fingerprint methods, error: %d", err);
+        return nullptr;
+    }
+
+    return new BiometricsFingerprint(
+        reinterpret_cast<fingerprint_device_t*>(device));
+}
+
+} // namespace implementation
+}  // namespace V2_1
+}  // namespace fingerprint
+}  // namespace biometrics
+}  // namespace hardware
+}  // namespace android
diff --git a/biometrics/fingerprint/2.1/default/BiometricsFingerprint.h b/biometrics/fingerprint/2.1/default/BiometricsFingerprint.h
new file mode 100644
index 0000000..4fdc328
--- /dev/null
+++ b/biometrics/fingerprint/2.1/default/BiometricsFingerprint.h
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ * 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.
+ */
+
+#ifndef HIDL_GENERATED_android_hardware_biometrics_fingerprint_V2_1_BiometricsFingerprint_H_
+#define HIDL_GENERATED_android_hardware_biometrics_fingerprint_V2_1_BiometricsFingerprint_H_
+
+#include <utils/Log.h>
+#include <android/hardware/biometrics/fingerprint/2.1/IBiometricsFingerprint.h>
+#include <hidl/Status.h>
+
+#include <hidl/MQDescriptor.h>
+namespace android {
+namespace hardware {
+namespace biometrics {
+namespace fingerprint {
+namespace V2_1 {
+namespace implementation {
+
+using ::android::hardware::biometrics::fingerprint::V2_1::HwAuthToken;
+using ::android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprint;
+using ::android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprintClientCallback;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::hidl_string;
+using ::android::sp;
+
+struct BiometricsFingerprint : public IBiometricsFingerprint {
+public:
+    BiometricsFingerprint(fingerprint_device_t *device);
+    ~BiometricsFingerprint();
+    // Methods from ::android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprint follow.
+    Return<void> setNotify(const sp<IBiometricsFingerprintClientCallback>& clientCallback, setNotify_cb _hidl_cb)  override;
+    Return<uint64_t> preEnroll()  override;
+    Return<void> enroll(const HwAuthToken& hat, uint32_t gid, uint32_t timeoutSec, enroll_cb _hidl_cb)  override;
+    Return<void> postEnroll(postEnroll_cb _hidl_cb)  override;
+    Return<uint64_t> getAuthenticatorId()  override;
+    Return<void> cancel(cancel_cb _hidl_cb)  override;
+    Return<void> enumerate(enumerate_cb _hidl_cb)  override;
+    Return<void> remove(uint32_t gid, uint32_t fid, remove_cb _hidl_cb)  override;
+    Return<void> setActiveGroup(uint32_t gid, const hidl_string& storePath, setActiveGroup_cb _hidl_cb)  override;
+    Return<void> authenticate(uint64_t operationId, uint32_t gid, authenticate_cb _hidl_cb)  override;
+    static void notify(const fingerprint_msg_t *notify_msg) {
+        if (mClientCallback == nullptr) {
+            ALOGE("Receiving callbacks before the client callback is registered.");
+            return;
+        }
+        FingerprintMsg msg = {};
+        memcpy(&msg, notify_msg, sizeof(msg));
+        mClientCallback->notify(msg);
+    }
+private:
+    static sp<IBiometricsFingerprintClientCallback> mClientCallback;
+    fingerprint_device_t *mDevice;
+};
+
+extern "C" IBiometricsFingerprint* HIDL_FETCH_IBiometricsFingerprint(const char* name);
+
+}  // namespace implementation
+}  // namespace V2_1
+}  // namespace fingerprint
+}  // namespace biometrics
+}  // namespace hardware
+}  // namespace android
+
+#endif  // HIDL_GENERATED_android_hardware_biometrics_fingerprint_V2_1_BiometricsFingerprint_H_
diff --git a/biometrics/fingerprint/2.1/default/android.hardware.biometrics.fingerprint@2.1-service.rc b/biometrics/fingerprint/2.1/default/android.hardware.biometrics.fingerprint@2.1-service.rc
new file mode 100644
index 0000000..741024d
--- /dev/null
+++ b/biometrics/fingerprint/2.1/default/android.hardware.biometrics.fingerprint@2.1-service.rc
@@ -0,0 +1,4 @@
+service fingerprint@2.1 /system/bin/hw/android.hardware.biometrics.fingerprint@2.1-service
+    class hal
+    user system
+    group system
\ No newline at end of file
diff --git a/biometrics/fingerprint/2.1/default/service.cpp b/biometrics/fingerprint/2.1/default/service.cpp
new file mode 100644
index 0000000..9867039
--- /dev/null
+++ b/biometrics/fingerprint/2.1/default/service.cpp
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ * 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.
+ */
+
+#define LOG_TAG "android.hardware.biometrics.fingerprint@2.1-service"
+
+#include <android/hardware/biometrics/fingerprint/2.1/IBiometricsFingerprint.h>
+
+#include <hidl/LegacySupport.h>
+
+using android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprint;
+using android::hardware::defaultPassthroughServiceImplementation;
+
+int main() {
+    return defaultPassthroughServiceImplementation<IBiometricsFingerprint>("fingerprint");
+}
diff --git a/sensors/1.0/default/Android.bp b/sensors/1.0/default/Android.bp
index d454cdb..d8d0c82 100644
--- a/sensors/1.0/default/Android.bp
+++ b/sensors/1.0/default/Android.bp
@@ -16,6 +16,7 @@
     static_libs: [
         "android.hardware.sensors@1.0-convert",
     ],
+    local_include_dirs: ["include/sensors"],
 }
 
 cc_library_static {
@@ -33,6 +34,7 @@
         "libhidl",
         "android.hardware.sensors@1.0",
     ],
+    local_include_dirs: ["include/sensors"],
 }
 
 
diff --git a/sensors/1.0/default/convert.cpp b/sensors/1.0/default/convert.cpp
index f4e1841..18725e7 100644
--- a/sensors/1.0/default/convert.cpp
+++ b/sensors/1.0/default/convert.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "include/convert.h"
+#include "convert.h"
 
 #include <android-base/logging.h>
 
diff --git a/sensors/1.0/default/include/convert.h b/sensors/1.0/default/include/sensors/convert.h
similarity index 100%
rename from sensors/1.0/default/include/convert.h
rename to sensors/1.0/default/include/sensors/convert.h
diff --git a/tv/cec/1.0/default/HdmiCec.cpp b/tv/cec/1.0/default/HdmiCec.cpp
index c4bae41..ebe2681 100644
--- a/tv/cec/1.0/default/HdmiCec.cpp
+++ b/tv/cec/1.0/default/HdmiCec.cpp
@@ -389,7 +389,7 @@
     int ret = 0;
     const hw_module_t* hw_module = nullptr;
 
-    ret = hw_get_module (hal, &hw_module);
+    ret = hw_get_module (HDMI_CEC_HARDWARE_MODULE_ID, &hw_module);
     if (ret == 0) {
         ret = hdmi_cec_open (hw_module, &hdmi_cec_device);
         if (ret != 0) {
diff --git a/tv/cec/1.0/default/HdmiCec.h b/tv/cec/1.0/default/HdmiCec.h
index 3e80cb1..49237d5 100644
--- a/tv/cec/1.0/default/HdmiCec.h
+++ b/tv/cec/1.0/default/HdmiCec.h
@@ -34,6 +34,7 @@
 
 using ::android::hardware::tv::cec::V1_0::CecLogicalAddress;
 using ::android::hardware::tv::cec::V1_0::CecMessage;
+using ::android::hardware::tv::cec::V1_0::MaxLength;
 using ::android::hardware::tv::cec::V1_0::HdmiPortInfo;
 using ::android::hardware::tv::cec::V1_0::IHdmiCec;
 using ::android::hardware::tv::cec::V1_0::IHdmiCecCallback;
@@ -65,7 +66,8 @@
     static void eventCallback(const hdmi_event_t* event, void* arg) {
         if (mCallback != nullptr && event != nullptr) {
             if (event->type == HDMI_EVENT_CEC_MESSAGE) {
-                size_t length = std::min(event->cec.length, static_cast<size_t>(15));
+                size_t length = std::min(event->cec.length,
+                        static_cast<size_t>(MaxLength::MESSAGE_BODY));
                 CecMessage cecMessage {
                     .initiator = static_cast<CecLogicalAddress>(event->cec.initiator),
                     .destination = static_cast<CecLogicalAddress>(event->cec.destination),
diff --git a/tv/cec/1.0/types.hal b/tv/cec/1.0/types.hal
index 421fe9c..ec2e373 100644
--- a/tv/cec/1.0/types.hal
+++ b/tv/cec/1.0/types.hal
@@ -16,6 +16,10 @@
 
 package android.hardware.tv.cec@1.0;
 
+enum MaxLength : int32_t {
+    MESSAGE_BODY = 15,
+};
+
 enum CecDeviceType : int32_t {
     INACTIVE = -1,
     TV = 0,
@@ -196,8 +200,8 @@
     /* logical address of receiver */
     CecLogicalAddress destination;
 
-    /* The maximum size of body is 15 as specified in the section 6 of the CEC
-     * Spec 1.4b. Overflowed data must be ignored. */
+    /* The maximum size of body is 15 (MaxLength::MESSAGE_BODY) as specified in
+     * the section 6 of the CEC Spec 1.4b. Overflowed data must be ignored. */
     vec<uint8_t> body;
 };