summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmds/statsd/src/atoms.proto107
1 files changed, 107 insertions, 0 deletions
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index 8ba35b76435f..298f49457f38 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -110,6 +110,11 @@ message Atom {
BluetoothEnabledStateChanged bluetooth_enabled_state_changed = 67;
BluetoothConnectionStateChanged bluetooth_connection_state_changed = 68;
BluetoothA2dpAudioStateChanged bluetooth_a2dp_audio_state_changed = 69;
+ UsbConnectorStateChanged usb_connector_changed = 70;
+ SpeakerImpedanceReported speaker_impedance_reported = 71;
+ HardwareFailed hardware_failed = 72;
+ PhysicalDropDetected physical_drop_detected = 73;
+ ChargeCyclesReported charge_cycles_reported = 74;
// TODO: Reorder the numbering so that the most frequent occur events occur in the first 15.
}
@@ -965,6 +970,108 @@ message BluetoothA2dpAudioStateChanged {
}
/**
+ * Logs when something is plugged into or removed from the USB-C connector.
+ *
+ * Logged from:
+ * Vendor USB HAL.
+ */
+message UsbConnectorStateChanged {
+ enum State {
+ DISCONNECTED = 0;
+ CONNECTED = 1;
+ }
+ optional State state = 1;
+}
+
+/**
+ * Logs the reported speaker impedance.
+ *
+ * Logged from:
+ * Vendor audio implementation.
+ */
+message SpeakerImpedanceReported {
+ optional int32 speaker_location = 1;
+ optional int32 impedance = 2;
+}
+
+/**
+ * Logs the report of a failed hardware.
+ *
+ * Logged from:
+ * Vendor HALs.
+ *
+ */
+message HardwareFailed {
+ enum HardwareType {
+ HARDWARE_FAILED_UNKNOWN = 0;
+ HARDWARE_FAILED_MICROPHONE = 1;
+ HARDWARE_FAILED_CODEC = 2;
+ HARDWARE_FAILED_SPEAKER = 3;
+ HARDWARE_FAILED_FINGERPRINT = 4;
+ }
+ optional HardwareType hardware_type = 1;
+
+ /* hardware_location allows vendors to differentiate between multiple instances of
+ * the same hardware_type. The specific locations are vendor defined integers,
+ * referring to board-specific numbering schemes.
+ */
+ optional int32 hardware_location = 2;
+
+ /* failure_code is specific to the HardwareType of the failed hardware.
+ * It should use the enum values defined below.
+ */
+ enum MicrophoneFailureCode {
+ MICROPHONE_FAILURE_COMPLETE = 0;
+ }
+ enum CodecFailureCode {
+ CODEC_FAILURE_COMPLETE = 0;
+ }
+ enum SpeakerFailureCode {
+ SPEAKER_FAILURE_COMPLETE = 0;
+ SPEAKER_FAILURE_HIGH_Z = 1;
+ SPEAKER_FAILURE_SHORT = 2;
+ }
+ enum FingerprintFailureCode {
+ FINGERPRINT_FAILURE_COMPLETE = 0;
+ FINGERPRINT_SENSOR_BROKEN = 1;
+ FINGERPRINT_TOO_MANY_DEAD_PIXELS = 2;
+ }
+ optional int32 failure_code = 3;
+}
+
+/**
+ * Log an event when the device has been physically dropped.
+ * Reported from the /vendor partition.
+ */
+message PhysicalDropDetected {
+ // Confidence that the event was actually a drop, 0 -> 100
+ optional int32 confidence_pctg = 1;
+ // Peak acceleration of the drop, in 1/1000s of a g.
+ optional int32 accel_peak_thousandths_g = 2;
+}
+
+/**
+ * Log bucketed battery charge cycles.
+ *
+ * Each bucket represents cycles of the battery past
+ * a given charge point. For example, bucket 1 is the
+ * lowest 1/8th of the battery, and bucket 8 is 100%.
+ *
+ * Logged from:
+ * /sys/class/power_supply/bms/cycle_count, via Vendor.
+ */
+message ChargeCyclesReported {
+ optional int32 cycle_bucket_1 = 1;
+ optional int32 cycle_bucket_2 = 2;
+ optional int32 cycle_bucket_3 = 3;
+ optional int32 cycle_bucket_4 = 4;
+ optional int32 cycle_bucket_5 = 5;
+ optional int32 cycle_bucket_6 = 6;
+ optional int32 cycle_bucket_7 = 7;
+ optional int32 cycle_bucket_8 = 8;
+}
+
+/**
* Logs the duration of a davey (jank of >=700ms) when it occurs
*
* Logged from: