1/* 2 * Copyright (C) 2018 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17syntax = "proto2"; 18 19// C++ namespace: android::hardware::google::pixel::PixelAtoms 20package android.hardware.google.pixel.PixelAtoms; 21 22option optimize_for = LITE_RUNTIME; 23 24option java_package = "android.hardware.google.pixel"; 25option java_outer_classname = "PixelAtoms"; 26 27import "frameworks/proto_logging/stats/atom_field_options.proto"; 28import "frameworks/proto_logging/stats/enums/app_shared/app_enums.proto"; 29 30/* 31 * Please note that the following features are not currently supported by 32 * the IStats->reportVendorAtom implementation: 33 * - types outside of int, long, float, bool and string (ex. uint) 34 * - submessages within an atom 35 * - field # 1 - this will be occupied by the vendor namespace 36 */ 37 38/* Allocated atom IDs. */ 39message Atom { 40 oneof pushed { 41 // AOSP atom ID range starts at 105000 42 ChargeStats charge_stats = 105000; 43 VoltageTierStats voltage_tier_stats = 105001; 44 BatteryCapacity battery_capacity = 105002; 45 StorageUfsHealth storage_ufs_health = 105003; 46 F2fsStatsInfo f2fs_stats = 105004; 47 ZramMmStat zram_mm_stat = 105005; 48 ZramBdStat zram_bd_stat = 105006; 49 BootStatsInfo boot_stats = 105007; 50 // 105008 - 105009 is available. 51 BatteryCapacityFG fg_capacity = 105010; 52 PdVidPid pd_vid_pid = 105011; 53 BatteryEEPROM battery_eeprom = 105012; 54 VendorSpeakerImpedance vendor_speaker_impedance = 105013; // moved from atoms.proto 55 StorageUfsResetCount ufs_reset_count = 105014; 56 PixelMmMetricsPerHour pixel_mm_metrics_per_hour = 105015; 57 PixelMmMetricsPerDay pixel_mm_metrics_per_day = 105016; 58 F2fsCompressionInfo f2fs_compression_info = 105017; 59 VendorChargeCycles vendor_charge_cycles = 105018; // moved from atoms.proto 60 VendorHardwareFailed vendor_hardware_failed = 105019 [(android.os.statsd.module) = "pixelaudio"]; // moved from atoms.proto 61 VendorSlowIo vendor_slow_io = 105020; // moved from atoms.proto 62 VendorSpeechDspStat vendor_speech_dsp_stat = 105021; // moved from atoms.proto 63 VendorPhysicalDropDetected vendor_physical_drop_detected = 64 105022 [(android.os.statsd.module) = "pixelstats"]; // moved from atoms.proto 65 VendorUsbPortOverheat vendor_usb_port_overheat = 105023; // moved from atoms.proto 66 CmaStatus cma_status = 105024; 67 CmaStatusExt cma_status_ext = 105025; 68 VendorBatteryHealthSnapshot vendor_battery_health_snapshot = 69 105026 [(android.os.statsd.module) = "pixelhealth"]; // moved from atoms.proto 70 VendorBatteryCausedShutdown vendor_battery_caused_shutdown = 71 105027 [(android.os.statsd.module) = "pixelhealth"]; // moved from atoms.proto 72 F2fsGcSegmentInfo f2fs_gc_segment_info = 105028; 73 PowerMitigationStats mitigation_stats = 105029; // moved from atoms.proto 74 75 CitadelVersion citadel_version = 100018; // moved from vendor proprietary 76 CitadelEvent citadel_event = 100019; // moved from vendor proprietary 77 VendorSpeakerStatsReported vendor_speaker_stats_reported = 105030 [(android.os.statsd.module) = "pixelaudio"]; 78 79 ChreHalNanoappLoadFailed chre_hal_nanoapp_load_failed = 80 105031 [(android.os.statsd.module) = "chre"]; 81 ChrePalOpenFailed chre_pal_open_failed = 105032 [(android.os.statsd.module) = "chre"]; 82 ChreApiErrorCodeDistributionTaken chre_api_error_code_distribution_taken = 83 105033 [(android.os.statsd.module) = "chre"]; 84 ChreDynamicMemorySnapshotReported chre_dynamic_memory_snapshot_reported = 85 105034 [(android.os.statsd.module) = "chre"]; 86 ChreEventQueueSnapshotReported chre_event_queue_snapshot_reported = 87 105035 [(android.os.statsd.module) = "chre"]; 88 ChreApWakeUpOccurred chre_ap_wake_up_occurred = 105036 [(android.os.statsd.module) = "chre"]; 89 90 BatteryHealthStatus battery_health_status = 105037; 91 BatteryHealthUsage battery_health_usage = 105038; 92 F2fsSmartIdleMaintEnabledStateChanged f2fs_smart_idle_maint_enabled_state_changed = 105039; 93 BlockStatsReported block_stats_reported = 105040; 94 VendorAudioHardwareStatsReported vendor_audio_hardware_stats_reported = 105041 [(android.os.statsd.module) = "pixelaudio"]; 95 96 ThermalDfsStats thermal_dfs_stats = 105042; 97 VendorLongIRQStatsReported vendor_long_irq_stats_reported = 105043; 98 VendorResumeLatencyStats vendor_resume_latency_stats = 105044; 99 VendorTempResidencyStats vendor_temp_residency_stats = 105045; 100 BrownoutDetected brownout_detected = 105046; 101 PcieLinkStatsReported pcie_link_stats = 105047; 102 VendorSensorCoolingDeviceStats vendor_sensor_cooling_device_stats = 105048; 103 104 VibratorPlaycountReported vibrator_playcount_reported = 105049 [(android.os.statsd.module) = "vibrator"]; 105 VibratorLatencyReported vibrator_latency_reported = 105050 [(android.os.statsd.module) = "vibrator"]; 106 VibratorErrorsReported vibrator_errors_reported = 105051 [(android.os.statsd.module) = "vibrator"]; 107 F2fsAtomicWriteInfo f2fs_atomic_write_info = 105052; 108 PartitionsUsedSpaceReported partition_used_space_reported = 105053; 109 PowerMitigationDurationCounts mitigation_duration = 105054; // moved from atoms.proto 110 DisplayPanelErrorStats display_panel_error_stats = 105055; 111 VendorAudioPdmStatsReported vendor_audio_pdm_stats_reported = 105056; 112 VendorAudioThirdPartyEffectStatsReported vendor_audio_third_party_effect_stats_reported = 105057 [(android.os.statsd.module) = "pixelaudio"]; 113 VendorAudioAdaptedInfoStatsReported vendor_audio_adapted_info_stats_reported = 105058; 114 GpuEvent gpu_event = 105059; 115 VendorAudioPcmStatsReported vendor_audio_pcm_stats_reported = 105060 [(android.os.statsd.module) = "pixelaudio"]; 116 VendorUsbDataSessionEvent vendor_usb_data_session_event = 105061; 117 ThermalSensorAbnormalityDetected thermal_sensor_abnormality_detected = 105062; 118 VendorAudioOffloadedEffectStatsReported vendor_audio_offloaded_effect_stats_reported = 105063; 119 VendorAudioBtMediaStatsReported vendor_audio_bt_media_stats_reported = 105064 [(android.os.statsd.module) = "pixelaudio"]; 120 PixelImpulseUsageReported pixel_impulse_usage_reported = 105065; 121 DisplayPortErrorStats display_port_error_stats = 105066; 122 HDCPAuthTypeStats hdcp_auth_type_stats = 105067; 123 DisplayPortUsage display_port_usage = 105068; 124 FuelGaugeAbnormalityReported fuel_gauge_abnormality_reported = 105069; 125 MmProcessUsageByOomGroupSnapshot mm_process_usage_by_oom_group_snapshot = 105070; 126 MmGcmaSnapshot mm_gcma_snapshot = 105071; 127 MmGcmaStats mm_gcma_stats = 105072; 128 VendorAudioUsbDeviceCapabilityStats vendor_audio_usb_device_capability_stats = 105073 [(android.os.statsd.module) = "pixelaudio"]; 129 BatteryTimeToFullStatsReported battery_time_to_full_stats_reported = 105074; 130 VendorAudioDirectUsbAccessUsageStats vendor_audio_direct_usb_access_usage_stats = 105075 [(android.os.statsd.module) = "pixelaudio"]; 131 VendorAudioUsbConfigStats vendor_audio_usb_config_stats = 105076 [(android.os.statsd.module) = "pixelaudio"]; 132 GpuFrozenAppsMemoryPerUid gpu_frozen_apps_memory_per_uid = 105078; 133 RepairModeEntered repair_mode_entered = 105079; 134 RepairModeExited repair_mode_exited = 105080; 135 RepairModeLowStorageReported repair_mode_low_storage_reported = 105081; 136 RepairModeErrorReported repair_mode_error_reported = 105082; 137 DisplayPortDSCSupportCountStatsReported display_port_dsc_support_stats = 105083; 138 DisplayPortMaxResolutionCountStatsReported display_port_max_resolution_stats = 105084; 139 VendorAudioDspRecordUsageStatsReported vendor_audio_dsp_record_usage_stats_reported = 105085 [(android.os.statsd.module) = "pixelaudio"]; 140 VendorAudioUsbConnectionState vendor_audio_usb_connection_state = 105086 [(android.os.statsd.module) = "pixelaudio"]; 141 VendorAudioSpeakerPowerStatsReported vendor_audio_speaker_power_stats_reported = 105087 [(android.os.statsd.module) = "pixelaudio"]; 142 DmVerityPartitionReadAmountReported dm_verity_partition_read_amount_reported = 105088; 143 WaterEventReported water_event_reported = 105089; 144 MediaPlaybackUsageStatsReported media_playback_usage_stats_reported = 105090 [(android.os.statsd.module) = "pixelaudio"]; 145 CallUsageStatsReported call_usage_stats_reported = 105091 [(android.os.statsd.module) = "pixelaudio"]; 146 } 147 // AOSP atom ID range ends at 109999 148 reserved 109997; // reserved for VtsVendorAtomJavaTest test atom 149 reserved 109998; // reserved for VtsVendorAtomJavaTest test atom 150 reserved 109999; // reserved for VtsVendorAtomJavaTest test atom 151} 152 153/* Supported reverse domain names. */ 154message ReverseDomainNames { 155 optional string pixel = 1 [default = "com.google.pixel"]; 156} 157 158/* A message containing detailed statistics and debug information about a charge session. */ 159message ChargeStats { 160 /* Charge Adapter stats. */ 161 enum AdapterType { 162 ADAPTER_TYPE_UNKNOWN = 0; 163 ADAPTER_TYPE_USB = 1; 164 ADAPTER_TYPE_USB_SDP = 2; 165 ADAPTER_TYPE_USB_DCP = 3; 166 ADAPTER_TYPE_USB_CDP = 4; 167 ADAPTER_TYPE_USB_ACA = 5; 168 ADAPTER_TYPE_USB_C = 6; 169 ADAPTER_TYPE_USB_PD = 7; 170 ADAPTER_TYPE_USB_PD_DRP = 8; 171 ADAPTER_TYPE_USB_PD_PPS = 9; 172 ADAPTER_TYPE_USB_PD_BRICKID = 10; 173 ADAPTER_TYPE_HVDCP = 11; 174 ADAPTER_TYPE_HVDCP3 = 12; 175 ADAPTER_TYPE_FLOAT = 13; 176 ADAPTER_TYPE_WLC = 14; 177 ADAPTER_TYPE_WLC_EPP = 15; 178 ADAPTER_TYPE_WLC_SPP = 16; 179 ADAPTER_TYPE_GPP = 17; 180 ADAPTER_TYPE_10W = 18; 181 ADAPTER_TYPE_L7 = 19; 182 ADAPTER_TYPE_DL = 20; 183 ADAPTER_TYPE_WPC_EPP = 21; 184 ADAPTER_TYPE_WPC_GPP = 22; 185 ADAPTER_TYPE_WPC_10W = 23; 186 ADAPTER_TYPE_WPC_BPP = 24; 187 ADAPTER_TYPE_WPC_L7 = 25; 188 ADAPTER_TYPE_EXT = 26; 189 ADAPTER_TYPE_EXT1 = 27; 190 ADAPTER_TYPE_EXT2 = 28; 191 ADAPTER_TYPE_EXT_UNKNOWN = 29; 192 ADAPTER_TYPE_USB_UNKNOWN = 30; 193 ADAPTER_TYPE_WLC_UNKNOWN = 31; 194 } 195 optional string reverse_domain_name = 1; 196 /* Type of charge adapter, enumerated above. */ 197 optional AdapterType adapter_type = 2; 198 /* Max negotiated voltage by charge adapter, in mV. */ 199 optional int32 adapter_voltage = 3; 200 /* Max negotiated current by charge adapter current, in mA. */ 201 optional int32 adapter_amperage = 4; 202 203 /* Stats at beginning of charge session. */ 204 /* System State of Charge, in percent. */ 205 optional int32 ssoc_in = 5; 206 /* Voltage in mV. */ 207 optional int32 voltage_in = 6; 208 209 /* Stats at end of charge session. */ 210 /* System State of Charge, in percent. */ 211 optional int32 ssoc_out = 7; 212 /* Voltage in mV. */ 213 optional int32 voltage_out = 8; 214 215 /** 216 * These values are meant to represent status of the charging device, used 217 * to validate the charging algorithm and explain charging performances. 218 * Examples of the content of the register: 219 * - APDO, PDO (power capabilities of the device, eg. 5V3A, 9V2A, 20V2A) for wired charging 220 * - Wireless charging MFG code. This is the value of a register of the WLC integrated 221 * circuit to identify the vendor and type of WLC pad 222 * - Receiver operating frequency 223 * - Register status 224 */ 225 optional int32 adapter_capabilities0 = 9; 226 optional int32 adapter_capabilities1 = 10; 227 optional int32 adapter_capabilities2 = 11; 228 optional int32 adapter_capabilities3 = 12; 229 optional int32 adapter_capabilities4 = 13; 230 231 /** 232 * These are values which reports the state of the wireless receiver, which will help in 233 * debugging charging issues and alternate configurations. 234 */ 235 optional int32 receiver_state0 = 14; 236 optional int32 receiver_state1 = 15; 237 238 /* AACR feature to record capacity */ 239 optional int32 charge_capacity = 16; 240 241 /* Charging Speed Indicator(CSI) status and type */ 242 optional int32 csi_aggregate_status = 17; 243 optional int32 csi_aggregate_type = 18; 244 245 optional int32 aacr_algo = 19; 246 optional int32 aacp_version = 20; 247 optional int32 aacc = 21; 248} 249 250/* A message containing stats from each charge voltage tier. */ 251message VoltageTierStats { 252 optional string reverse_domain_name = 1; 253 /* Voltage tier number, custom to implementation, should be <= 3. */ 254 optional int32 voltage_tier = 2; 255 256 /* Stats when entering voltage tier. */ 257 /* State of charge, in percent. */ 258 optional float soc_in = 3; 259 /* Coulomb count, in mAh. */ 260 optional int32 cc_in = 4; 261 /* Battery temperature, in deciC. */ 262 optional int32 temp_in = 5; 263 264 /* Time spent at various charge speeds, in seconds. */ 265 optional int32 time_fast_secs = 6; 266 optional int32 time_taper_secs = 7; 267 optional int32 time_other_secs = 8; 268 269 /* Battery temperature stats, in deciC. */ 270 optional int32 temp_min = 9; 271 optional int32 temp_avg = 10; 272 optional int32 temp_max = 11; 273 274 /* Battery current stats, in mA. */ 275 optional int32 ibatt_min = 12; 276 optional int32 ibatt_avg = 13; 277 optional int32 ibatt_max = 14; 278 279 /* Input current limit stats, in mA. */ 280 optional int32 icl_min = 15; 281 optional int32 icl_avg = 16; 282 optional int32 icl_max = 17; 283 284 /** 285 * Efficiency number, receiver operating frequency in kHz for wireless charging 286 * (alignment) 287 */ 288 optional int32 charging_operating_point = 18; 289 /* The minimum power out of the adapter at the given charging tier */ 290 optional int32 min_adapter_power_out = 19; 291 /* The time-averaged power out of the adapter at the given charging tier */ 292 optional int32 time_avg_adapter_power_out = 20; 293 /* The maximum power out of the adapter at the given charging tier */ 294 optional int32 max_adapter_power_out = 21; 295} 296 297/* A message containing an alternate proprietary full battery capacity estimate. */ 298message BatteryCapacity { 299 optional string reverse_domain_name = 1; 300 /* Sum of the change in coulomb count. */ 301 optional int32 delta_cc_sum = 2; 302 /* Sum of the change in state of charge (battery level). */ 303 optional int32 delta_vfsoc_sum = 3; 304} 305 306/* A message containing health values of UFS */ 307message StorageUfsHealth { 308 optional string reverse_domain_name = 1; 309 /* The value of lifetimeA for UFS health */ 310 optional int32 lifetime_a = 2; 311 /* The value of lifetimeB for UFS health */ 312 optional int32 lifetime_b = 3; 313 /* The value of lifetimeC for UFS health */ 314 optional int32 lifetime_c = 4; 315} 316 317/* A message containing filesystem stats of F2FS */ 318message F2fsStatsInfo { 319 optional string reverse_domain_name = 1; 320 /* The value of dirty segments of f2fs */ 321 optional int32 dirty_segments = 2; 322 /* The value of free segments of f2fs */ 323 optional int32 free_segments = 3; 324 /* The times of checkpoint function called in foreground*/ 325 optional int32 cp_calls_fg = 4; 326 /* The times of checkpoint function called in background */ 327 optional int32 cp_calls_bg = 5; 328 /* The times of garbage collection function called in foreground */ 329 optional int32 gc_calls_fg = 6; 330 /* The times of garbage collection function called in background */ 331 optional int32 gc_calls_bg = 7; 332 /* The amount of blocks been moved by garbage collection in foreground */ 333 optional int32 moved_blocks_fg = 8; 334 /* The amount of blocks been moved by garbage collection in background */ 335 optional int32 moved_blocks_bg = 9; 336 /* The average of how many valid blocks is in a segment */ 337 optional int32 valid_blocks = 10; 338} 339 340message ZramMmStat { 341 optional string reverse_domain_name = 1; 342 /* The value of original memory size */ 343 optional int64 orig_data_size = 2; 344 /* The value of compressed memory size */ 345 optional int64 compr_data_size = 3; 346 /* The value of consumed memory size to store compressed memory */ 347 optional int64 mem_used_total = 4; 348 /* The value of number of page filled with same elements data */ 349 optional int64 same_pages = 5; 350 /* The value of number of incompressible page */ 351 optional int64 huge_pages = 6; 352 /* The value of number of incompressible pages since boot */ 353 optional int64 huge_pages_since_boot = 7; 354} 355 356message ZramBdStat { 357 optional string reverse_domain_name = 1; 358 /* the number of pages in backing device */ 359 optional int64 bd_count = 2; 360 /* The number of pages readed from backing device */ 361 optional int64 bd_reads = 3; 362 /* The number of pages written to backing device */ 363 optional int64 bd_writes = 4; 364} 365 366/* A message containing boot times */ 367message BootStatsInfo { 368 optional string reverse_domain_name = 1; 369 /* The F2FS fsck time in secs */ 370 optional int32 fsck_time_sec = 2; 371 /* The F2FS mounted time in secs */ 372 optional int32 mounted_time_sec = 3; 373 /* The F2FS checkpoint=disable time in secs */ 374 optional int32 checkpoint_time_sec = 4; 375} 376 377/* A message containing wireless charging health info. */ 378message WirelessChargingStats { 379 /* Captures if a google charger used when start wireless charging */ 380 enum ChargerVendor { 381 VENDOR_UNKNOWN = 0; 382 VENDOR_GOOGLE = 1; 383 } 384 385 optional string reverse_domain_name = 1; 386 optional ChargerVendor charger_vendor = 2; 387} 388 389/* Current device Orientation */ 390message DeviceOrientation { 391 enum Orientation { 392 ORIENTATION_UNKNOWN = 0; 393 ORIENTATION_0 = 1; 394 ORIENTATION_90 = 2; 395 ORIENTATION_180 = 3; 396 ORIENTATION_270 = 4; 397 } 398 399 optional string reverse_domain_name = 1; 400 /* Device orientation. */ 401 optional Orientation orientation = 2; 402} 403 404/* Raw battery capacity stats */ 405message BatteryCapacityFG { 406 enum LogReason { 407 LOG_REASON_UNKNOWN = 0; 408 LOG_REASON_CONNECTED = 1; 409 LOG_REASON_DISCONNECTED = 2; 410 LOG_REASON_FULL_CHARGE = 3; 411 LOG_REASON_PERCENT_SKIP = 4; 412 LOG_REASON_DIVERGING_FG = 5; 413 } 414 415 optional string reverse_domain_name = 1; 416 /* Uevent logging reason, enumerated above. */ 417 optional LogReason capacity_log_reason = 2; 418 419 /* The battery capacity reported from the FG (fuel gauge) hardware */ 420 optional float capacity_gdf = 3; 421 /* The filtered system battery capacity reported to the UI */ 422 optional float capacity_ssoc = 4; 423 /* The fuel gauge capacity curve midpoint FG (fuel gauge) value */ 424 optional float capacity_gdf_curve = 5; 425 /* The fuel gauge capacity curve midpoint UI value */ 426 optional float capacity_ssoc_curve = 6; 427} 428 429message PdVidPid { 430 optional string reverse_domain_name = 1; 431 /* Vendor ID of wired charger */ 432 optional int32 vid = 2; 433 /* Product ID of wired charger */ 434 optional int32 pid = 3; 435} 436 437message BatteryEEPROM { 438 optional string reverse_domain_name = 1; 439 /* The cycle count number; record of charge/discharge times */ 440 optional int32 cycle_cnt = 2; 441 /* The current full capacity of the battery under nominal conditions */ 442 optional int32 full_cap = 3; 443 /* The battery equivalent series resistance */ 444 optional int32 esr = 4; 445 /* Battery resistance related to temperature change */ 446 optional int32 rslow = 5; 447 /* Battery health indicator reflecting the battery age state */ 448 optional int32 soh = 6; 449 /* The battery temperature */ 450 optional int32 batt_temp = 7; 451 452 /* Battery state of charge (SOC) shutdown point */ 453 optional int32 cutoff_soc = 8; 454 /* Raw battery state of charge (SOC), based on battery current (CC = Coulomb Counter) */ 455 optional int32 cc_soc = 9; 456 /* Estimated battery state of charge (SOC) from batt_soc with endpoint limiting (0% and 100%) */ 457 optional int32 sys_soc = 10; 458 /* Filtered monotonic SOC, handles situations where the cutoff_soc is increased and 459 * then decreased from the battery physical properties 460 */ 461 optional int32 msoc = 11; 462 /* Estimated SOC derived from cc_soc that provides voltage loop feedback correction using 463 * battery voltage, current, and status values 464 */ 465 optional int32 batt_soc = 12; 466 467 /* Field used for data padding in the EEPROM data */ 468 optional int32 reserve = 13; 469 470 /* The maximum battery temperature ever seen */ 471 optional int32 max_temp = 14; 472 /* The minimum battery temperature ever seen */ 473 optional int32 min_temp = 15; 474 /* The maximum battery voltage ever seen */ 475 optional int32 max_vbatt = 16; 476 /* The minimum battery voltage ever seen */ 477 optional int32 min_vbatt = 17; 478 /* The maximum battery current ever seen */ 479 optional int32 max_ibatt = 18; 480 /* The minimum battery current ever seen */ 481 optional int32 min_ibatt = 19; 482 /* Field used to verify the integrity of the EEPROM data */ 483 optional int32 checksum = 20; 484 485 /* Extend data for P21 */ 486 /* Temperature compensation information */ 487 optional int32 tempco = 21; 488 /* Learned characterization related to the voltage gauge */ 489 optional int32 rcomp0 = 22; 490 /* For time to monitor the life of cell */ 491 optional int32 timer_h = 23; 492 /* The full capacity of the battery learning at the end of every charge cycle */ 493 optional int32 full_rep = 24; 494 495 enum BattPairingEvent { 496 WRITE_ERROR = -4; 497 READ_ERROR = -3; 498 MISMATCH = -2; 499 DISABLED = -1; 500 ENABLED = 0; 501 PAIRED = 1; 502 RESET = 2; 503 }; 504 505 optional BattPairingEvent battery_pairing = 25; 506} 507 508/* A message containing an exceptional event from citadel. */ 509message CitadelEvent { 510 enum Event { 511 ALERT = 1; 512 REBOOTED = 2; 513 UPGRADED = 3; 514 ALERT_V2 = 4; 515 SEC_CH_STATE = 5; 516 }; 517 optional string reverse_domain_name = 1; 518 optional Event event = 2; 519 optional int32 reset_count = 3; 520 optional int64 uptime_micros = 4; 521 enum Priority { 522 LOW = 0; 523 MEDIUM = 1; 524 HIGH = 2; 525 }; 526 optional Priority priority = 5; 527 528 // ALERT-specific fields. These fields correspond to the interrupt status 529 // bits for alerts within citadel. When alerts fire one or more of these 530 // bits are set to indicate the alert source. 531 optional int32 intr_sts_0 = 6; 532 optional int32 intr_sts_1 = 7; 533 optional int32 intr_sts_2 = 8; 534 535 // REBOOTED-specific fields. These fields correspond to the details of how 536 // the hardware reboot occurred. A reboot is a noteworthy event for citadel, 537 // as it can be triggered by events like stack overflow or other software 538 // bugs. 539 optional int32 rstsrc = 9; 540 optional int32 exitpd = 10; 541 optional int32 which0 = 11; 542 optional int32 which1 = 12; 543 544 // UPGRADED-specific field. This field corresponds to the result of FW 545 // upgrade for citadel. 546 optional int32 upgrade_state = 13; 547 548 // ALERT_V2-specific field. This field corresponds to the GLOBALSEC Log 549 // which contains normal globalsec, camo, temp and buserr. 550 optional int32 alert_grp_0 = 14; 551 optional int32 alert_grp_1 = 15; 552 optional int32 alert_grp_2 = 16; 553 optional int32 alert_grp_3 = 17; 554 optional int32 camo_breaches_0 = 18; 555 optional int32 camo_breaches_1 = 19; 556 optional int32 temp_min = 20; 557 optional int32 temp_max = 21; 558 optional int32 bus_err = 22; 559 560 // SEC_CH_STATE-specific filed. This field corresponds to the state 561 // of GSA-GSC secure channel. 562 optional int32 sec_ch_state = 23; 563} 564 565/* A message containing the citadel firmware version. */ 566message CitadelVersion { 567 optional string reverse_domain_name = 1; 568 optional string version = 2; 569} 570 571/* A message containing the speaker impedance. */ 572 message VendorSpeakerImpedance { 573 optional string reverse_domain_name = 1; 574 optional int32 speaker_location = 2; 575 optional int32 impedance = 3; 576} 577 578/** 579 * Logs the reported vendor speaker health stats. 580 * Logged from: hardware/google/pixel/pixelstats/SysfsCollector.cpp 581 */ 582message VendorSpeakerStatsReported { 583 /* Vendor reverse domain name (expecting "com.google.pixel") */ 584 optional string reverse_domain_name = 1; 585 /* The location of speaker; 0 = left , 1 = right */ 586 optional int32 speaker_location = 2; 587 /* The speaker's impedance value (milliOhm) */ 588 optional int32 impedance = 3; 589 /* The speaker's maximum temperature (milliDegree C) */ 590 optional int32 max_temperature = 4; 591 /* The speaker's execursion length (micrometer) */ 592 optional int32 excursion = 5; 593 /* The speaker's heart beat count */ 594 optional int32 heartbeat = 6; 595 /* The speaker's version */ 596 optional int32 version = 7; 597} 598 599/* A message containing how many times of ufs host reset */ 600message StorageUfsResetCount { 601 optional string reverse_domain_name = 1; 602 /* How many UFS error reset are triggered */ 603 optional int32 host_reset_count = 2; 604} 605 606/* A message containing Pixel memory metrics collected hourly. */ 607message PixelMmMetricsPerHour { 608 optional string reverse_domain_name = 1; 609 optional int64 free_pages = 2; 610 optional int64 anon_pages = 3; 611 optional int64 file_pages = 4; 612 optional int64 slab_reclaimable = 5; 613 optional int64 zspages = 6; 614 optional int64 unevictable = 7; 615 optional int64 ion_total_pools = 8; 616 optional int64 gpu_memory = 9; 617 optional int64 slab_unreclaimable = 10; 618 optional int64 psi_cpu_some_total = 11; 619 optional int64 psi_io_full_total = 12; 620 optional int64 psi_io_some_total = 13; 621 optional int64 psi_mem_full_total = 14; 622 optional int64 psi_mem_some_total = 15; 623 optional int32 psi_cpu_some_avg10_min = 16; 624 optional int32 psi_cpu_some_avg10_max = 17; 625 optional int32 psi_cpu_some_avg10_avg = 18; 626 optional int32 psi_cpu_some_avg60_min = 19; 627 optional int32 psi_cpu_some_avg60_max = 20; 628 optional int32 psi_cpu_some_avg60_avg = 21; 629 optional int32 psi_cpu_some_avg300_min = 22; 630 optional int32 psi_cpu_some_avg300_max = 23; 631 optional int32 psi_cpu_some_avg300_avg = 24; 632 optional int32 psi_io_full_avg10_min = 25; 633 optional int32 psi_io_full_avg10_max = 26; 634 optional int32 psi_io_full_avg10_avg = 27; 635 optional int32 psi_io_full_avg60_min = 28; 636 optional int32 psi_io_full_avg60_max = 29; 637 optional int32 psi_io_full_avg60_avg = 30; 638 optional int32 psi_io_full_avg300_min = 31; 639 optional int32 psi_io_full_avg300_max = 32; 640 optional int32 psi_io_full_avg300_avg = 33; 641 optional int32 psi_io_some_avg10_min = 34; 642 optional int32 psi_io_some_avg10_max = 35; 643 optional int32 psi_io_some_avg10_avg = 36; 644 optional int32 psi_io_some_avg60_min = 37; 645 optional int32 psi_io_some_avg60_max = 38; 646 optional int32 psi_io_some_avg60_avg = 39; 647 optional int32 psi_io_some_avg300_min = 40; 648 optional int32 psi_io_some_avg300_max = 41; 649 optional int32 psi_io_some_avg300_avg = 42; 650 optional int32 psi_mem_full_avg10_min = 43; 651 optional int32 psi_mem_full_avg10_max = 44; 652 optional int32 psi_mem_full_avg10_avg = 45; 653 optional int32 psi_mem_full_avg60_min = 46; 654 optional int32 psi_mem_full_avg60_max = 47; 655 optional int32 psi_mem_full_avg60_avg = 48; 656 optional int32 psi_mem_full_avg300_min = 49; 657 optional int32 psi_mem_full_avg300_max = 50; 658 optional int32 psi_mem_full_avg300_avg = 51; 659 optional int32 psi_mem_some_avg10_min = 52; 660 optional int32 psi_mem_some_avg10_max = 53; 661 optional int32 psi_mem_some_avg10_avg = 54; 662 optional int32 psi_mem_some_avg60_min = 55; 663 optional int32 psi_mem_some_avg60_max = 56; 664 optional int32 psi_mem_some_avg60_avg = 57; 665 optional int32 psi_mem_some_avg300_min = 58; 666 optional int32 psi_mem_some_avg300_max = 59; 667 optional int32 psi_mem_some_avg300_avg = 60; 668 optional int32 version = 61 [deprecated = true]; 669 optional int64 shmem_pages = 62; 670 optional int64 page_table_pages = 63; 671 optional int64 dmabuf_kb = 64; 672} 673 674/* A message containing Pixel memory metrics collected daily. */ 675message PixelMmMetricsPerDay { 676 optional string reverse_domain_name = 1; 677 optional int64 workingset_refault = 2; /* refault_file */ 678 optional int64 pswpin = 3; 679 optional int64 pswpout = 4; 680 optional int64 allocstall_dma = 5; 681 optional int64 allocstall_dma32 = 6; 682 optional int64 allocstall_normal = 7; 683 optional int64 allocstall_movable = 8; 684 optional int64 pgalloc_dma = 9; 685 optional int64 pgalloc_dma32 = 10; 686 optional int64 pgalloc_normal = 11; 687 optional int64 pgalloc_movable = 12; 688 optional int64 pgsteal_kswapd = 13; 689 optional int64 pgsteal_direct = 14; 690 optional int64 pgscan_kswapd = 15; 691 optional int64 pgscan_direct = 16; 692 optional int64 oom_kill = 17; 693 optional int64 pgalloc_high = 18; 694 optional int64 pgcache_hit = 19; 695 optional int64 pgcache_miss = 20; 696 optional int64 kswapd_stime_clks = 21; 697 optional int64 kcompactd_stime_clks = 22; 698 optional int64 direct_reclaim_native_latency_total_time = 23; 699 optional int64 direct_reclaim_native_latency0 = 24; 700 optional int64 direct_reclaim_native_latency1 = 25; 701 optional int64 direct_reclaim_native_latency2 = 26; 702 optional int64 direct_reclaim_native_latency3 = 27; 703 optional int64 direct_reclaim_visible_latency_total_time = 28; 704 optional int64 direct_reclaim_visible_latency0 = 29; 705 optional int64 direct_reclaim_visible_latency1 = 30; 706 optional int64 direct_reclaim_visible_latency2 = 31; 707 optional int64 direct_reclaim_visible_latency3 = 32; 708 optional int64 direct_reclaim_top_latency_total_time = 33; 709 optional int64 direct_reclaim_top_latency0 = 34; 710 optional int64 direct_reclaim_top_latency1 = 35; 711 optional int64 direct_reclaim_top_latency2 = 36; 712 optional int64 direct_reclaim_top_latency3 = 37; 713 optional int64 direct_reclaim_other_latency_total_time = 38; 714 optional int64 direct_reclaim_other_latency0 = 39; 715 optional int64 direct_reclaim_other_latency1 = 40; 716 optional int64 direct_reclaim_other_latency2 = 41; 717 optional int64 direct_reclaim_other_latency3 = 42; 718 optional int64 compaction_total_time = 43; 719 optional int64 compaction_ev_count0 = 44; 720 optional int64 compaction_ev_count1 = 45; 721 optional int64 compaction_ev_count2 = 46; 722 optional int64 compaction_ev_count3 = 47; 723 optional int64 compaction_ev_count4 = 48; 724 optional int64 workingset_refault_anon = 49; 725 optional int64 workingset_refault_file = 50; 726 optional int64 compact_success = 51; 727 optional int64 compact_fail = 52; 728 optional int64 kswapd_low_wmark_hq = 53; 729 optional int64 kswapd_high_wmark_hq = 54; 730 optional int64 thp_file_alloc = 55; 731 optional int64 thp_zero_page_alloc = 56; 732 optional int64 thp_split_page = 57; 733 optional int64 thp_migration_split = 58; 734 optional int64 thp_deferred_split_page = 59; 735 optional int64 version = 60 [deprecated = true]; 736 optional int64 cpu_total_time_cs = 61; 737 optional int64 cpu_idle_time_cs = 62; 738 optional int64 cpu_io_wait_time_cs = 63; 739 optional int64 kswapd_pageout_run = 64; 740} 741 742/* A message containing CMA metrics collected from dogfooding only. */ 743message CmaStatus { 744 optional string reverse_domain_name = 1; 745 optional int32 type = 2; 746 optional int64 cma_alloc_pages_attempts = 3; 747 optional int64 cma_alloc_pages_soft_attempts = 4; 748 optional int64 cma_fail_pages = 5; 749 optional int64 cma_fail_soft_pages = 6; 750 optional int64 migrated_pages = 7; 751 optional string cma_heap_name = 8; 752} 753 754/* A message containing CMA metrics (External). */ 755message CmaStatusExt { 756 optional string reverse_domain_name = 1; 757 optional int32 type = 2; 758 optional int64 cma_alloc_latency_low = 3; 759 optional int64 cma_alloc_latency_mid = 4; 760 optional int64 cma_alloc_latency_high = 5; 761 optional string cma_heap_name = 6; 762} 763 764message F2fsCompressionInfo { 765 optional string reverse_domain_name = 1; 766 /* Show the block count written after compression since mount */ 767 optional int32 compr_written_blocks = 2; 768 /* Show the saved block count with compression since mount */ 769 optional int32 compr_saved_blocks = 3; 770 /* Show the count of inode newly enabled for compression since mount */ 771 optional int32 compr_new_inodes = 4; 772} 773 774/** 775 * Log bucketed battery charge cycles. 776 * 777 * Each bucket represents cycles of the battery past 778 * a given charge point. For example, bucket 1 is the 779 * lowest 1/8th of the battery, and bucket 8 is 100%. 780 * 781 * Logged from: 782 * /sys/class/power_supply/bms/cycle_count, via Vendor. 783 */ 784message VendorChargeCycles { 785 optional string reverse_domain_name = 1; 786 optional int32 cycle_bucket_1 = 2; 787 optional int32 cycle_bucket_2 = 3; 788 optional int32 cycle_bucket_3 = 4; 789 optional int32 cycle_bucket_4 = 5; 790 optional int32 cycle_bucket_5 = 6; 791 optional int32 cycle_bucket_6 = 7; 792 optional int32 cycle_bucket_7 = 8; 793 optional int32 cycle_bucket_8 = 9; 794 optional int32 cycle_bucket_9 = 10; 795 optional int32 cycle_bucket_10 = 11; 796} 797 798/** 799 * Logs the report of a failed hardware. 800 * 801 * Logged from: 802 * Vendor HALs. 803 * 804 */ 805message VendorHardwareFailed { 806 enum HardwareType { 807 HARDWARE_FAILED_UNKNOWN = 0; 808 HARDWARE_FAILED_MICROPHONE = 1; 809 HARDWARE_FAILED_CODEC = 2; 810 HARDWARE_FAILED_SPEAKER = 3; 811 HARDWARE_FAILED_FINGERPRINT = 4; 812 } 813 optional string reverse_domain_name = 1; 814 optional HardwareType hardware_type = 2; 815 816 /** 817 * hardware_location allows vendors to differentiate between multiple 818 * instances of the same hardware_type. The specific locations are vendor 819 * defined integers, referring to board-specific numbering schemes. 820 */ 821 optional int32 hardware_location = 3; 822 /** 823 * failure_code is specific to the HardwareType of the failed hardware. 824 * It should use one of the enum values defined below. 825 */ 826 enum HardwareErrorCode { 827 UNKNOWN = 0; 828 COMPLETE = 1; 829 SPEAKER_HIGH_Z = 2; 830 SPEAKER_SHORT = 3; 831 FINGERPRINT_SENSOR_BROKEN = 4; 832 FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5; 833 DEGRADE = 6; 834 } 835 optional HardwareErrorCode failure_code = 4; 836 837 enum EventType { 838 UNKNOWN_EVENT = 0; 839 VOICE_CALL = 1; 840 VOIP_CALL = 2; 841 } 842 optional EventType event_type = 5; 843} 844 845/** 846 * Log slow I/O operations on the primary storage. 847 */ 848message VendorSlowIo { 849 // Classifications of IO Operations. 850 enum IoOperation { 851 UNKNOWN = 0; 852 READ = 1; 853 WRITE = 2; 854 UNMAP = 3; 855 SYNC = 4; 856 } 857 optional string reverse_domain_name = 1; 858 optional IoOperation operation = 2; 859 860 // The number of slow IO operations of this type over 24 hours. 861 optional int32 count = 3; 862} 863 864/* 865 * Logs the reported speech DSP status. 866 * Logged from: Vendor audio implementation. 867 */ 868message VendorSpeechDspStat { 869 optional string reverse_domain_name = 1; 870 // The total Speech DSP uptime in milliseconds. 871 optional int32 total_uptime_millis = 2; 872 // The total Speech DSP downtime in milliseconds. 873 optional int32 total_downtime_millis = 3; 874 optional int32 total_crash_count = 4; 875 optional int32 total_recover_count = 5; 876} 877 878/** 879 * Log an event when the device has been physically dropped. 880 * Reported from the /vendor partition. 881 */ 882message VendorPhysicalDropDetected { 883 optional string reverse_domain_name = 1; 884 // Confidence that the event was actually a drop, 0 -> 100 885 optional int32 confidence_pctg = 2; 886 // Peak acceleration of the drop, in 1/1000s of a g. 887 optional int32 accel_peak_thousandths_g = 3; 888 // Duration of freefall in ms 889 optional int32 freefall_time_millis = 4; 890} 891 892/** Represents USB port overheat event. */ 893message VendorUsbPortOverheat { 894 optional string reverse_domain_name = 1; 895 /* Temperature of USB port at USB plug event, in 1/10ths of degree C. */ 896 optional int32 plug_temperature_deci_c = 2; 897 /* Maximum temperature of USB port during overheat event, in 1/10ths of degree 898 * C. */ 899 optional int32 max_temperature_deci_c = 3; 900 /* Time between USB plug event and overheat threshold trip, in seconds. */ 901 optional int32 time_to_overheat_secs = 4; 902 /* Time between overheat threshold trip and hysteresis, in seconds. */ 903 optional int32 time_to_hysteresis_secs = 5; 904 /* Time between hysteresis and active mitigation ending, in seconds. */ 905 optional int32 time_to_inactive_secs = 6; 906} 907 908/** 909 * Log battery health snapshot. 910 * 911 * Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level 912 * are snapshotted periodically over 24hrs. 913 */ 914message VendorBatteryHealthSnapshot { 915 enum BatterySnapshotType { 916 BATTERY_SNAPSHOT_TYPE_UNKNOWN = 0; 917 BATTERY_SNAPSHOT_TYPE_MIN_TEMP = 1; // Snapshot at min batt temp over 24hrs. 918 BATTERY_SNAPSHOT_TYPE_MAX_TEMP = 2; // Snapshot at max batt temp over 24hrs. 919 BATTERY_SNAPSHOT_TYPE_MIN_RESISTANCE = 3; // Snapshot at min batt resistance over 24hrs. 920 BATTERY_SNAPSHOT_TYPE_MAX_RESISTANCE = 4; // Snapshot at max batt resistance over 24hrs. 921 BATTERY_SNAPSHOT_TYPE_MIN_VOLTAGE = 5; // Snapshot at min batt voltage over 24hrs. 922 BATTERY_SNAPSHOT_TYPE_MAX_VOLTAGE = 6; // Snapshot at max batt voltage over 24hrs. 923 BATTERY_SNAPSHOT_TYPE_MIN_CURRENT = 7; // Snapshot at min batt current over 24hrs. 924 BATTERY_SNAPSHOT_TYPE_MAX_CURRENT = 8; // Snapshot at max batt current over 24hrs. 925 BATTERY_SNAPSHOT_TYPE_MIN_BATT_LEVEL = 9; // Snapshot at min battery level (SoC) over 24hrs. 926 BATTERY_SNAPSHOT_TYPE_MAX_BATT_LEVEL = 10; // Snapshot at max battery level (SoC) over 24hrs. 927 BATTERY_SNAPSHOT_TYPE_AVG_RESISTANCE = 11; // Snapshot at average battery resistance over 24hrs. 928 } 929 optional string reverse_domain_name = 1; 930 optional BatterySnapshotType type = 2; 931 // Temperature, in 1/10ths of degree C. 932 optional int32 temperature_deci_celsius = 3; 933 // Voltage Battery Voltage, in microVolts. 934 optional int32 voltage_micro_volt = 4; 935 // Current Battery current, in microAmps. 936 optional int32 current_micro_amps = 5; 937 // OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts. 938 optional int32 open_circuit_micro_volt = 6; 939 // Resistance Battery Resistance, in microOhms. 940 optional int32 resistance_micro_ohm = 7; 941 // Level Battery Level, as % of full. 942 optional int32 level_percent = 8; 943} 944 945/** 946 * Log battery caused shutdown with the last recorded voltage. 947 */ 948message VendorBatteryCausedShutdown { 949 optional string reverse_domain_name = 1; 950 // The last recorded battery voltage prior to shutdown. 951 optional int32 last_recorded_micro_volt = 2; 952} 953 954/** 955 * Log mitigation statistics. 956 */ 957message PowerMitigationStats { 958 optional string reverse_domain_name = 1; 959 // The last triggered count: batoilo. 960 optional int32 batoilo_count = 2; 961 // The last triggered count: vdroop1. 962 optional int32 vdroop1_count = 3; 963 // The last triggered count: vdroop2. 964 optional int32 vdroop2_count = 4; 965 // The last triggered count: smpl_warn. 966 optional int32 smpl_warn_count = 5; 967 // The last triggered count: ocp_cpu1. 968 optional int32 ocp_cpu1_count = 6; 969 // The last triggered count: ocp_cpu2. 970 optional int32 ocp_cpu2_count = 7; 971 // The last triggered count: ocp_gpu. 972 optional int32 ocp_gpu_count = 8; 973 // The last triggered count: ocp_tpu. 974 optional int32 ocp_tpu_count = 9; 975 // The last triggered count: soft_ocp_cpu1. 976 optional int32 soft_ocp_cpu1_count = 10; 977 // The last triggered count: soft_ocp_cpu2. 978 optional int32 soft_ocp_cpu2_count = 11; 979 // The last triggered count: soft_ocp_gpu. 980 optional int32 soft_ocp_gpu_count = 12; 981 // The last triggered count: soft_ocp_tpu. 982 optional int32 soft_ocp_tpu_count = 13; 983 // The last triggered capacity: batoilo. 984 optional int32 batoilo_cap = 14; 985 // The last triggered capacity: vdroop1. 986 optional int32 vdroop1_cap = 15; 987 // The last triggered capacity: vdroop2. 988 optional int32 vdroop2_cap = 16; 989 // The last triggered capacity: smpl_warn. 990 optional int32 smpl_warn_cap = 17; 991 // The last triggered capacity: ocp_cpu1. 992 optional int32 ocp_cpu1_cap = 18; 993 // The last triggered capacity: ocp_cpu2. 994 optional int32 ocp_cpu2_cap = 19; 995 // The last triggered capacity: ocp_gpu. 996 optional int32 ocp_gpu_cap = 20; 997 // The last triggered capacity: ocp_tpu. 998 optional int32 ocp_tpu_cap = 21; 999 // The last triggered capacity: soft_ocp_cpu1. 1000 optional int32 soft_ocp_cpu1_cap = 22; 1001 // The last triggered capacity: soft_ocp_cpu2. 1002 optional int32 soft_ocp_cpu2_cap = 23; 1003 // The last triggered capacity: soft_ocp_gpu. 1004 optional int32 soft_ocp_gpu_cap = 24; 1005 // The last triggered capacity: soft_ocp_tpu. 1006 optional int32 soft_ocp_tpu_cap = 25; 1007 // The last triggered count: batoilo2. 1008 optional int32 batoilo2_count = 26; 1009 // The last triggered capacity: batoilo2. 1010 optional int32 batoilo2_cap = 27; 1011} 1012 1013/** 1014 * Log thermal statistics. 1015 */ 1016message ThermalDfsStats { 1017 optional string reverse_domain_name = 1; 1018 // The last count of BIG cluster dfs triggers 1019 optional int32 big_dfs_count = 2; 1020 // The last count of MID cluster dfs triggers 1021 optional int32 mid_dfs_count = 3; 1022 // The last count of LITTLE cluster dfs triggers 1023 optional int32 little_dfs_count = 4; 1024 // The last count of GPU dfs triggers 1025 optional int32 gpu_dfs_count = 5; 1026 // The last count of TPU dfs triggers 1027 optional int32 tpu_dfs_count = 6; 1028 // The last count of DSP dfs triggers 1029 optional int32 aur_dfs_count = 7; 1030} 1031 1032/** 1033 * Log Display Panel error statistics. 1034 */ 1035message DisplayPanelErrorStats { 1036 optional string reverse_domain_name = 1; 1037 // The error count due to Tear Effect on primary display panel. 1038 optional int32 primary_error_count_te = 2; 1039 // The error count due to unknown reason on primary display panel. 1040 optional int32 primary_error_count_unknown = 3; 1041 // The error count due to Tear Effect on primary display panel. 1042 optional int32 secondary_error_count_te = 4; 1043 // The error count due to unknown reason on secondary display panel. 1044 optional int32 secondary_error_count_unknown = 5; 1045} 1046 1047/** 1048 * Log how many segments have been reclaimed in a specific GC mode. 1049 */ 1050message F2fsGcSegmentInfo { 1051 optional string reverse_domain_name = 1; 1052 /* Reclaimed segments in GC normal mode */ 1053 optional int32 reclaimed_segments_normal = 2; 1054 /* Reclaimed segments in GC urgent high mode */ 1055 optional int32 reclaimed_segments_urgent_high = 3; 1056 /* Reclaimed segments in GC urgent low mode */ 1057 optional int32 reclaimed_segments_urgent_low = 4; 1058 /* Reclaimed segments in GC urgent mid mode */ 1059 optional int32 reclaimed_segments_urgent_mid = 5; 1060} 1061 1062/** 1063 * Logs an event indicating that a nanoapp loading has failed at the HAL. 1064 */ 1065message ChreHalNanoappLoadFailed { 1066 // Vendor reverse domain name (expecting "com.google.pixel"). 1067 optional string reverse_domain_name = 1; 1068 1069 enum Type { 1070 TYPE_UNKNOWN = 0; 1071 // Corresponds to preloaded nanoapps on the device. 1072 TYPE_PRELOADED = 1; 1073 // Dynamic loading of a nanoapp (e.g. code download). 1074 TYPE_DYNAMIC = 2; 1075 } 1076 1077 enum Reason { 1078 REASON_UNKNOWN = 0; 1079 // A generic error code that does not match any of the others. 1080 REASON_ERROR_GENERIC = 1; 1081 // Failure at the connection between HAL<->CHRE. 1082 REASON_CONNECTION_ERROR = 2; 1083 // System ran out of memory. 1084 REASON_OOM = 3; 1085 // Nanoapp did not have the right signing for loading. 1086 REASON_SIGNATURE_MISMATCH = 4; 1087 } 1088 1089 // The 64-bit unique nanoapp identifier of the nanoapp that failed. 1090 optional int64 nanoapp_id = 2; 1091 1092 // The type of the load event. 1093 optional Type type = 3; 1094 1095 // The reason for the failure. 1096 optional Reason reason = 4; 1097} 1098 1099/** 1100 * An enum describing a module within CHRE. 1101 */ 1102enum ChreModuleType { 1103 CHRE_MODULE_TYPE_UNKNOWN = 0; 1104 CHRE_MODULE_TYPE_CHRE = 1; // Core CHRE framework 1105 CHRE_MODULE_TYPE_PAL = 2; // PAL module (could be CHPP) 1106 CHRE_MODULE_TYPE_NANOAPP = 3; 1107} 1108 1109/** 1110 * An enum describing the CHRE PAL type. 1111 */ 1112enum ChrePalType { 1113 CHRE_PAL_TYPE_UNKNOWN = 0; 1114 CHRE_PAL_TYPE_SENSOR = 1; 1115 CHRE_PAL_TYPE_WIFI = 2; 1116 CHRE_PAL_TYPE_GNSS = 3; 1117 CHRE_PAL_TYPE_WWAN = 4; 1118 CHRE_PAL_TYPE_AUDIO = 5; 1119 CHRE_PAL_TYPE_BLE = 6; 1120} 1121 1122/** 1123 * Logs an event indicating that a CHRE PAL open has failed. 1124 */ 1125message ChrePalOpenFailed { 1126 // Vendor reverse domain name (expecting "com.google.pixel"). 1127 optional string reverse_domain_name = 1; 1128 1129 enum Type { 1130 TYPE_UNKNOWN = 0; 1131 // Initial open when CHRE starts. 1132 INITIAL_OPEN = 1; 1133 // Any form of "reopen" event internally in the PAL. 1134 REOPEN = 2; 1135 } 1136 1137 // The PAL this failure event is for. 1138 optional ChrePalType pal = 2; 1139 1140 // The type of failure observed. 1141 optional Type type = 3; 1142} 1143 1144/** 1145 * The type of CHRE API request. 1146 */ 1147enum ChreApiType { 1148 CHRE_API_TYPE_UNKNOWN = 0; 1149 CHRE_API_TYPE_WIFI_SCAN_MONITOR = 1; 1150 CHRE_API_TYPE_WIFI_ACTIVE_SCAN = 2; 1151 CHRE_API_TYPE_WIFI_RTT_RANGING = 3; 1152} 1153 1154/** 1155 * The type of CHRE API error. 1156 */ 1157enum ChreError { 1158 CHRE_ERROR_UNKNOWN = 0; 1159 1160 // No error occurred. 1161 CHRE_ERROR_NONE = 1; 1162 1163 // An unspecified failure occurred. 1164 CHRE_ERROR = 2; 1165 1166 // One or more supplied arguments are invalid. 1167 CHRE_ERROR_INVALID_ARGUMENT = 3; 1168 1169 // Unable to satisfy request because the system is busy. 1170 CHRE_ERROR_BUSY = 4; 1171 1172 // Unable to allocate memory. 1173 CHRE_ERROR_NO_MEMORY = 5; 1174 1175 // The requested feature is not supported. 1176 CHRE_ERROR_NOT_SUPPORTED = 6; 1177 1178 // A timeout occurred while processing the request. 1179 CHRE_ERROR_TIMEOUT = 7; 1180 1181 // The relevant capability is disabled, for example due to a user 1182 // configuration that takes precedence over this request. 1183 CHRE_ERROR_FUNCTION_DISABLED = 8; 1184} 1185 1186/** 1187 * Distribution of CHRE API error codes. 1188 */ 1189message ChreApiErrorCodeDistributionTaken { 1190 // Vendor reverse domain name (expecting "com.google.pixel"). 1191 optional string reverse_domain_name = 1; 1192 1193 // The chreGetTime() value when this snapshot was taken, in milliseconds. 1194 optional int32 snapshot_chre_get_time_ms = 2; 1195 1196 // The CHRE API type. 1197 optional ChreApiType api_type = 3; 1198 1199 // Corresponds to the CHRE error code that occurred, as defined in the 1200 // "enum chreError" field in chre_api/chre/common.h. 1201 optional ChreError error_code = 4; 1202 optional int32 num_errors = 5; 1203} 1204 1205/** 1206 * Snapshot of the dynamic memory allocated in CHRE. 1207 */ 1208message ChreDynamicMemorySnapshotReported { 1209 // Vendor reverse domain name (expecting "com.google.pixel"). 1210 optional string reverse_domain_name = 1; 1211 1212 // The chreGetTime() value when this snapshot was taken, in milliseconds. 1213 optional int32 snapshot_chre_get_time_ms = 2; 1214 1215 // The type of the module. 1216 optional ChreModuleType module_type = 3; 1217 1218 // The unique 64-bit ID for a nanoapp, only used if the module_type is NANOAPP. 1219 // If module_type is PAL, then it represents the ChrePalType enum. If the module_type 1220 // is CHRE, then a zero value should be used. 1221 optional int64 pal_type_or_nanoapp_id = 4; 1222 1223 // The max allocation amount of this module in bytes. 1224 optional int32 max_allocation_bytes = 5; 1225 1226 // The current allocation amount of this module in bytes. 1227 optional int32 current_allocation_bytes = 6; 1228} 1229 1230/** 1231 * Snapshot of the event queue stats in CHRE. 1232 */ 1233message ChreEventQueueSnapshotReported { 1234 // Vendor reverse domain name (expecting "com.google.pixel"). 1235 optional string reverse_domain_name = 1; 1236 1237 // The chreGetTime() value when this snapshot was taken, in milliseconds. 1238 optional int32 snapshot_chre_get_time_ms = 2; 1239 1240 // The maximum size the event queue got to (i.e. num pending events). 1241 optional int32 max_event_queue_size = 3; 1242 1243 // The average size the event queue got to (i.e. num pending events). 1244 optional int32 mean_event_queue_size = 4; 1245 1246 // The number of events that were dropped due to capacity limits. 1247 optional int32 num_dropped_events = 5; 1248 1249 // The maximum amount of time it took for an event, from when it was received, 1250 // to when it was delivered to all interested modules. This value represents 1251 // the total delay within the CHRE subsystem. 1252 optional int64 max_queue_delay_us = 6; 1253 1254 // The mean value of the delay in microseconds. 1255 optional int64 mean_queue_delay_us = 7; 1256} 1257 1258/** 1259 * Indicates that a nanoapp has woken up the AP. 1260 */ 1261message ChreApWakeUpOccurred { 1262 // Vendor reverse domain name (expecting "com.google.pixel"). 1263 optional string reverse_domain_name = 1; 1264 1265 // The 64-bit unique nanoapp identifier that describes the entity that has caused an AP wake-up 1266 // from CHRE. Whenever this event occurs, this means that the nanoapp sent a message to 1267 // the AP causing a transition between suspend/wake-up. 1268 optional int64 nanoapp_id = 2; 1269} 1270 1271/** 1272 * Snapshot of the current battery health of the device. 1273 */ 1274message BatteryHealthStatus { 1275 // Vendor reverse domain name (expecting "com.google.pixel"). 1276 optional string reverse_domain_name = 1; 1277 1278 // The algorithm that computes how the health status and health indexes are calculated. 1279 optional int32 health_algorithm = 2; 1280 1281 enum HealthStatus { 1282 UNKNOWN = -1; // The health status is unknown due to a SW limitation or issue 1283 NOMINAL = 0; // The battery is operating as expected 1284 MARGINAL = 1; // The battery may need replacement soon 1285 NEEDS_REPLACEMENT = 2; // The battery needs replacement 1286 FAILED = 3; // The battery has failed and no longer operates as expected 1287 NOT_AVAILABLE = 4; // This is a temporary state when cycle count is insufficient 1288 INCONSISTENT = 5; // The battery recalibration is pending 1289 } 1290 1291 // HealthStatus calculated using health_index, health_perf_index. 1292 optional HealthStatus health_status = 3; 1293 1294 // A percentage measure of the health of the battery with 100% being perfectly healthy. 1295 optional int32 health_index = 4; 1296 1297 // A percentage measure of the battery capacity of the device, affected by cycle life degradation. 1298 optional int32 health_capacity_index = 5; 1299 1300 // A percentage measure of the max performance of the device, affected by impedance growth with 100% being perfectly healthy. 1301 optional int32 health_impedance_index = 6; 1302 1303 // An index that expresses the likelihood of swelling given the SOC residency stats. 1304 optional int32 swelling_cumulative = 7; 1305 1306 // The battery capacity used to determine the health index. This is the reference value from b/223759710. 1307 optional int32 health_full_capacity = 8; 1308 1309 // This is the Rslow (resistance) value used (in part) to determine the Perf Index. The activation impedance (b/223545817) can be calculated from it using the perf index. 1310 optional int32 current_impedance = 9; 1311 1312 // The (hours) value of TimeH (0xb3), a register value, multiplied by 3.2 hours. 1313 optional int32 battery_age = 10; 1314 1315 // The cycle count at the time of the log event. 1316 optional int32 cycle_count = 11; 1317 1318 enum BattDisconnectStatus { 1319 BPST_BATT_UNKNOWN = 0; 1320 BPST_BATT_CONNECT = 1; 1321 BPST_BATT_DISCONNECT = 2; // Result of single battery disconnect detection 1322 BPST_BATT_CELL_FAULT = 3; // Result of cell fault detection which means actual disconnection 1323 } 1324 1325 // Battery disconnect detection stats. 1326 optional BattDisconnectStatus battery_disconnect_status = 12; 1327} 1328 1329/** 1330 * Log battery SOC/temperature usage data. 1331 * 1332 * Each data represents cumulative time of the battery 1333 * spent over a specific SOC and over a specific temperature 1334 * while charging and while discharging in seconds. 1335 * 1336 * Logged from: 1337 * /sys/class/power_supply/battery/swelling_data, via Vendor. 1338 */ 1339message BatteryHealthUsage { 1340 // Vendor reverse domain name (expecting "com.google.pixel"). 1341 optional string reverse_domain_name = 1; 1342 1343 // The temperature limit (deg C) used to accumulate the time above this value. 1344 optional int32 temperature_limit_deci_c = 2; 1345 1346 // The SOC limit (%) used to accumulate the time above this value. 1347 optional int32 soc_limit = 3; 1348 1349 // Time (s) accumulated only during charge at the given thresholds. 1350 optional int32 charge_time_secs = 4; 1351 1352 // Time (s) accumulated only during discharge at the given thresholds. 1353 optional int32 discharge_time_secs = 5; 1354} 1355 1356/* 1357 * A Value of F2FS smart idle maintenance feature enabled 1358 */ 1359message F2fsSmartIdleMaintEnabledStateChanged { 1360 optional string reverse_domain_name = 1; 1361 /* Smart idle maint is enabled */ 1362 optional bool enabled = 2; 1363} 1364 1365/* 1366 * Snapshot of the block layer read write stats 1367 */ 1368message BlockStatsReported { 1369 optional string reverse_domain_name = 1; 1370 /* number of read I/Os processed */ 1371 optional int64 read_io = 2; 1372 /* number of sectors read */ 1373 optional int64 read_sectors = 3; 1374 /* total wait time for read requests */ 1375 optional int64 read_ticks = 4; 1376 /* number of write I/Os processed */ 1377 optional int64 write_io = 5; 1378 /* number of sectors written */ 1379 optional int64 write_sectors = 6; 1380 /* total wait time for write requests */ 1381 optional int64 write_ticks = 7; 1382} 1383 1384/** 1385 * Logs the reported vendor audio hardware stats. 1386 */ 1387message VendorAudioHardwareStatsReported { 1388 optional string reverse_domain_name = 1; 1389 /* The number of calls in a day where CCA is active. 1390 * CCA can only be applied under some radio bands. 1391 */ 1392 optional int32 milli_rate_of_ams_per_day = 2; 1393 1394 // cca_active: obsoleted UI enable & algorithm is active (C1) 1395 // replaced by cca_active_count_per_day 1396 optional int32 rate_of_cca_active_per_day = 3 [deprecated = true]; 1397 1398 // cca_enable: obsoleted UI enable & algorithm is inactive field (C2) 1399 // replaced by cca_enable_count_per_day 1400 optional int32 rate_of_cca_enable_per_day = 4 [deprecated = true]; 1401 1402 enum Source { 1403 VOIP = 0; 1404 VOICE = 1; 1405 } 1406 1407 /* source: identify whether this atom is for voice or voip case. */ 1408 optional Source source = 5; 1409 1410 /* total_call_count_per_day: count total number of call per day. */ 1411 optional int32 total_call_count_per_day = 6; 1412 1413 /* cca_active: UI enable & algorithm is active (C1 or C3) */ 1414 optional int32 cca_active_count_per_day = 7; 1415 1416 /* cca_enable: UI enable & algorithm is inactive (C2 or C4) */ 1417 optional int32 cca_enable_count_per_day = 8; 1418 1419 /* version: version of the data. */ 1420 optional int32 version = 9; 1421 1422 /* duration: duration in second of the voice/voip call. */ 1423 optional int32 duration_second = 10; 1424 1425 /* band: band value. */ 1426 optional int32 band = 11; 1427} 1428 1429/** 1430 * Logs the reported vendor audio PDM stats. 1431 * PDM stats are used to show background noise level during voice/voip calling. 1432 * Each of the atom will show only one type of background noises. There are at most 4 types. 1433 * Thus, this atoms will be reported at most 4 times to show all types. 1434 */ 1435message VendorAudioPdmStatsReported { 1436 optional string reverse_domain_name = 1; 1437 1438 /* index of the pdm to report. There are 4 pdm instances. So, the value is in the range 1-4 */ 1439 optional int32 pdm_index = 2; 1440 1441 /* State of the pdm to report. There is only two value 1 for good and 0 for bad. */ 1442 optional int32 state = 3; 1443} 1444 1445/* 1446 * Logs vendor stats about long IRQs. 1447 * 1448 * IRQ is considered long when it exceeds a threshold (currently 1 ms). 1449 * Stats include top 5 slowest IRQs: their numbers and the worst latency. 1450 * Stats are reset after every report. 1451 */ 1452message VendorLongIRQStatsReported { 1453 optional string reverse_domain_name = 1; 1454 1455 // Count of long soft IRQ since last report. 1456 optional int64 long_softirq_count = 2; 1457 1458 optional int64 top1_softirq_num = 3; 1459 optional int64 top1_softirq_latency_us = 4; 1460 optional int64 top2_softirq_num = 5; 1461 optional int64 top2_softirq_latency_us = 6; 1462 optional int64 top3_softirq_num = 7; 1463 optional int64 top3_softirq_latency_us = 8; 1464 optional int64 top4_softirq_num = 9; 1465 optional int64 top4_softirq_latency_us = 10; 1466 optional int64 top5_softirq_num = 11; 1467 optional int64 top5_softirq_latency_us = 12; 1468 1469 // Count of long IRQ since last report. 1470 optional int64 long_irq_count = 13; 1471 1472 optional int64 top1_irq_num = 14; 1473 optional int64 top1_irq_latency_us = 15; 1474 optional int64 top2_irq_num = 16; 1475 optional int64 top2_irq_latency_us = 17; 1476 optional int64 top3_irq_num = 18; 1477 optional int64 top3_irq_latency_us = 19; 1478 optional int64 top4_irq_num = 20; 1479 optional int64 top4_irq_latency_us = 21; 1480 optional int64 top5_irq_num = 22; 1481 optional int64 top5_irq_latency_us = 23; 1482 1483 optional int64 storm_irq_top1_num = 24; 1484 optional int64 storm_irq_top1_count = 25; 1485 optional int64 storm_irq_top2_num = 26; 1486 optional int64 storm_irq_top2_count = 27; 1487 optional int64 storm_irq_top3_num = 28; 1488 optional int64 storm_irq_top3_count = 29; 1489 optional int64 storm_irq_top4_num = 30; 1490 optional int64 storm_irq_top4_count = 31; 1491 optional int64 storm_irq_top5_num= 32; 1492 optional int64 storm_irq_top5_count = 33; 1493} 1494 1495/** 1496 * Logs the Temperature residency stats per thermal zone. 1497 */ 1498message VendorTempResidencyStats { 1499 optional string reverse_domain_name = 1; 1500 // Thermal zone name 1501 optional string sensor_name = 2; 1502 1503 // Time since last collect of this thermal zone 1504 optional int64 since_last_update_ms = 3; 1505 1506 // Temperature residency stats is measured by time in ms that a temperature zone's temperature 1507 // lay within some temperature thresholds 1508 // e.g. 1509 // With temperature thresholds predefined as thresholds_i, thresholds_i+1, 1510 // temp_residency_ms_bucket_i measures how much time the sensor lay within this two thresholds 1511 optional int64 temp_residency_ms_bucket_1 = 4; 1512 optional int64 temp_residency_ms_bucket_2 = 5; 1513 optional int64 temp_residency_ms_bucket_3 = 6; 1514 optional int64 temp_residency_ms_bucket_4 = 7; 1515 optional int64 temp_residency_ms_bucket_5 = 8; 1516 optional int64 temp_residency_ms_bucket_6 = 9; 1517 optional int64 temp_residency_ms_bucket_7 = 10; 1518 optional int64 temp_residency_ms_bucket_8 = 11; 1519 optional int64 temp_residency_ms_bucket_9 = 12; 1520 optional int64 temp_residency_ms_bucket_10 = 13; 1521 optional int64 temp_residency_ms_bucket_11 = 14; 1522 optional int64 temp_residency_ms_bucket_12 = 15; 1523 optional int64 temp_residency_ms_bucket_13 = 16; 1524 optional int64 temp_residency_ms_bucket_14 = 17; 1525 optional int64 temp_residency_ms_bucket_15 = 18; 1526 optional int64 temp_residency_ms_bucket_16 = 19; 1527 optional int64 temp_residency_ms_bucket_17 = 20; 1528 optional int64 temp_residency_ms_bucket_18 = 21; 1529 optional int64 temp_residency_ms_bucket_19 = 22; 1530 optional int64 temp_residency_ms_bucket_20 = 23; 1531 1532 // The maximum and minimum temperature observed for the sensor along with the 1533 // timestamp of occurrence in terms of time_t. 1534 optional float max_temp = 24; 1535 optional int64 max_temp_timestamp = 25; 1536 optional float min_temp = 26; 1537 optional int64 min_temp_timestamp = 27; 1538} 1539 1540/** 1541 * Logs the Resume Latency stats. 1542 */ 1543message VendorResumeLatencyStats { 1544 optional string reverse_domain_name = 1; 1545 optional int64 max_latency_ms = 2; 1546 optional int64 avg_latency_ms = 3; 1547 1548 // Resume Latency stats is measured by count of resumes that lay within some latency thresholds 1549 // e.g. 1550 // With resume times thresholds predefined as thresholds_i, thresholds_i+1, 1551 // resume_count_bucket_i measures count of resumes that lay within this two thresholds 1552 optional int64 resume_count_bucket_1 = 4; 1553 optional int64 resume_count_bucket_2 = 5; 1554 optional int64 resume_count_bucket_3 = 6; 1555 optional int64 resume_count_bucket_4 = 7; 1556 optional int64 resume_count_bucket_5 = 8; 1557 optional int64 resume_count_bucket_6 = 9; 1558 optional int64 resume_count_bucket_7 = 10; 1559 optional int64 resume_count_bucket_8 = 11; 1560 optional int64 resume_count_bucket_9 = 12; 1561 optional int64 resume_count_bucket_10 = 13; 1562 optional int64 resume_count_bucket_11 = 14; 1563 optional int64 resume_count_bucket_12 = 15; 1564 optional int64 resume_count_bucket_13 = 16; 1565 optional int64 resume_count_bucket_14 = 17; 1566 optional int64 resume_count_bucket_15 = 18; 1567 optional int64 resume_count_bucket_16 = 19; 1568 optional int64 resume_count_bucket_17 = 20; 1569 optional int64 resume_count_bucket_18 = 21; 1570 optional int64 resume_count_bucket_19 = 22; 1571 optional int64 resume_count_bucket_20 = 23; 1572 optional int64 resume_count_bucket_21 = 24; 1573 optional int64 resume_count_bucket_22 = 25; 1574 optional int64 resume_count_bucket_23 = 26; 1575 optional int64 resume_count_bucket_24 = 27; 1576 optional int64 resume_count_bucket_25 = 28; 1577 optional int64 resume_count_bucket_26 = 29; 1578 optional int64 resume_count_bucket_27 = 30; 1579 optional int64 resume_count_bucket_28 = 31; 1580 optional int64 resume_count_bucket_29 = 32; 1581 optional int64 resume_count_bucket_30 = 33; 1582 optional int64 resume_count_bucket_31 = 34; 1583 optional int64 resume_count_bucket_32 = 35; 1584 optional int64 resume_count_bucket_33 = 36; 1585 optional int64 resume_count_bucket_34 = 37; 1586 optional int64 resume_count_bucket_35 = 38; 1587 optional int64 resume_count_bucket_36 = 39; 1588} 1589 1590/* 1591 * Log the Brownout events. 1592 */ 1593message BrownoutDetected { 1594 enum IRQType { 1595 UVLO1 = 0; 1596 SMPL_WARN = 1; 1597 UVLO2 = 2; 1598 BATOILO = 3; 1599 BATOILO2 = 4; 1600 } 1601 1602 enum BrownoutReason { 1603 UNKNOWN = 0; 1604 UVLO_IF = 1; 1605 OCP_IF = 2; 1606 UVLO_MAIN = 3; 1607 UVLO_SUB = 4; 1608 OCP_B1M = 5; 1609 OCP_B2M = 6; 1610 OCP_B3M = 7; 1611 OCP_B4M = 8; 1612 OCP_B5M = 9; 1613 OCP_B6M = 10; 1614 OCP_B7M = 11; 1615 OCP_B8M = 12; 1616 OCP_B9M = 13; 1617 OCP_B10M = 14; 1618 OCP_B1S = 15; 1619 OCP_B2S = 16; 1620 OCP_B3S = 17; 1621 OCP_B4S = 18; 1622 OCP_B5S = 19; 1623 OCP_B6S = 20; 1624 OCP_B7S = 21; 1625 OCP_B8S = 22; 1626 OCP_B9S = 23; 1627 OCP_B10S = 24; 1628 OCP_BAS = 25; 1629 OCP_BBS = 26; 1630 OCP_BCS = 27; 1631 OCP_BDS = 28; 1632 OCP2_IF = 29; 1633 } 1634 1635 // Reverse domain name. (e.g. Pixel) 1636 optional string reverse_domain_name = 1; 1637 // Triggered mitigation IRQ 1638 optional IRQType triggered_irq = 2; 1639 // Triggered timestamp 1640 optional int64 triggered_timestamp = 3; 1641 // Triggered battery temperature 1642 optional int32 battery_temp = 4; 1643 // Triggered battery age 1644 optional int32 battery_cycle = 5; 1645 // Triggered battery soc 1646 optional int32 battery_soc = 6; 1647 // Triggered FG Reading: Voltage Now 1648 optional int32 voltage_now = 7; 1649 // Triggered ODPM Reading: Channel 1 1650 optional int32 odpm_channel01 = 8; 1651 // Triggered ODPM Reading: Channel 2 1652 optional int32 odpm_channel02 = 9; 1653 // Triggered ODPM Reading: Channel 3 1654 optional int32 odpm_channel03 = 10; 1655 // Triggered ODPM Reading: Channel 4 1656 optional int32 odpm_channel04 = 11; 1657 // Triggered ODPM Reading: Channel 5 1658 optional int32 odpm_channel05 = 12; 1659 // Triggered ODPM Reading: Channel 6 1660 optional int32 odpm_channel06 = 13; 1661 // Triggered ODPM Reading: Channel 7 1662 optional int32 odpm_channel07 = 14; 1663 // Triggered ODPM Reading: Channel 8 1664 optional int32 odpm_channel08 = 15; 1665 // Triggered ODPM Reading: Channel 9 1666 optional int32 odpm_channel09 = 16; 1667 // Triggered ODPM Reading: Channel 10 1668 optional int32 odpm_channel10 = 17; 1669 // Triggered ODPM Reading: Channel 11 1670 optional int32 odpm_channel11 = 18; 1671 // Triggered ODPM Reading: Channel 12 1672 optional int32 odpm_channel12 = 19; 1673 // Triggered ODPM Reading: Channel 13 1674 optional int32 odpm_channel13 = 20; 1675 // Triggered ODPM Reading: Channel 14 1676 optional int32 odpm_channel14 = 21; 1677 // Triggered ODPM Reading: Channel 15 1678 optional int32 odpm_channel15 = 22; 1679 // Triggered ODPM Reading: Channel 16 1680 optional int32 odpm_channel16 = 23; 1681 // Triggered ODPM Reading: Channel 17 1682 optional int32 odpm_channel17 = 24; 1683 // Triggered ODPM Reading: Channel 18 1684 optional int32 odpm_channel18 = 25; 1685 // Triggered ODPM Reading: Channel 19 1686 optional int32 odpm_channel19 = 26; 1687 // Triggered ODPM Reading: Channel 20 1688 optional int32 odpm_channel20 = 27; 1689 // Triggered ODPM Reading: Channel 21 1690 optional int32 odpm_channel21 = 28; 1691 // Triggered ODPM Reading: Channel 22 1692 optional int32 odpm_channel22 = 29; 1693 // Triggered ODPM Reading: Channel 23 1694 optional int32 odpm_channel23 = 30; 1695 // Triggered ODPM Reading: Channel 24 1696 optional int32 odpm_channel24 = 31; 1697 // Triggered DVFS State: Channel 1 1698 optional int32 dvfs_channel1 = 32; 1699 // Triggered DVFS State: Channel 2 1700 optional int32 dvfs_channel2 = 33; 1701 // Triggered DVFS State: Channel 3 1702 optional int32 dvfs_channel3 = 34; 1703 // Triggered DVFS State: Channel 4 1704 optional int32 dvfs_channel4 = 35; 1705 // Triggered DVFS State: Channel 5 1706 optional int32 dvfs_channel5 = 36; 1707 // Triggered DVFS State: Channel 6 1708 optional int32 dvfs_channel6 = 37; 1709 // brownout reason 1710 optional BrownoutReason brownout_reason = 38; 1711 // max current 1712 optional int32 max_current = 39; 1713 // event counter uvlo1 1714 optional int32 evt_cnt_uvlo1 = 40; 1715 // event counter uvlo2 1716 optional int32 evt_cnt_uvlo2 = 41; 1717 // event counter oilo1 1718 optional int32 evt_cnt_oilo1 = 42; 1719 // event counter oilo2 1720 optional int32 evt_cnt_oilo2 = 43; 1721 // VIMON vbatt 1722 optional int32 vimon_vbatt = 44; 1723 // VIMON ibatt 1724 optional int32 vimon_ibatt = 45; 1725 // Mitigation Method 0 1726 optional int32 mitigation_method_0 = 46; 1727 // Mitigation Method 0 Entry Count 1728 optional int32 mitigation_method_0_count = 47; 1729 // Mitigation Method 0 Entry Time 1730 optional int64 mitigation_method_0_time_us = 48; 1731 // pre ocp cpu1 backup at brownout 1732 optional int32 pre_ocp_cpu1_bckup = 49; 1733 // pre ocp cpu2 backup at brownout 1734 optional int32 pre_ocp_cpu2_bckup = 50; 1735 // pre ocp tpu backup at brownout 1736 optional int32 pre_ocp_tpu_bckup = 51; 1737 // pre ocp gpu backup at brownout 1738 optional int32 pre_ocp_gpu_bckup = 52; 1739 // pre uvlo hit count for m pmic at brownout 1740 optional int32 pre_uvlo_hit_cnt_m = 53; 1741 // pre uvlo hit count for s pmic at brownout 1742 optional int32 pre_uvlo_hit_cnt_s = 54; 1743 // pre uvlo assertion duration at brownout 1744 optional int32 pre_uvlo_dur = 55; 1745 // odpm irq stat 0 main at brownout 1746 optional int32 odpm_irq_stat_0_sys_evt_main_bckup = 56; 1747 // odpm irq stat 1 main at brownout 1748 optional int32 odpm_irq_stat_1_sys_evt_main_bckup = 57; 1749 // odpm irq stat 2 main at brownout 1750 optional int32 odpm_irq_stat_2_sys_evt_main_bckup = 58; 1751 // odpm irq stat 3 main at brownout 1752 optional int32 odpm_irq_stat_3_sys_evt_main_bckup = 59; 1753 // odpm irq stat 4 main at brownout 1754 optional int32 odpm_irq_stat_4_sys_evt_main_bckup = 60; 1755 // odpm irq stat 5 main at brownout 1756 optional int32 odpm_irq_stat_5_sys_evt_main_bckup = 61; 1757 // odpm irq stat 6 main at brownout 1758 optional int32 odpm_irq_stat_6_sys_evt_main_bckup = 62; 1759 // odpm irq stat 7 main at brownout 1760 optional int32 odpm_irq_stat_7_sys_evt_main_bckup = 63; 1761 // odpm irq stat 8 main at brownout 1762 optional int32 odpm_irq_stat_8_sys_evt_main_bckup = 64; 1763 // odpm irq stat 9 main at brownout 1764 optional int32 odpm_irq_stat_9_sys_evt_main_bckup = 65; 1765 // odpm irq stat 10 main at brownout 1766 optional int32 odpm_irq_stat_10_sys_evt_main_bckup = 66; 1767 // odpm irq stat 11 main at brownout 1768 optional int32 odpm_irq_stat_11_sys_evt_main_bckup = 67; 1769 // odpm irq stat 0 sub at brownout 1770 optional int32 odpm_irq_stat_0_sys_evt_sub_bckup = 68; 1771 // odpm irq stat 1 sub at brownout 1772 optional int32 odpm_irq_stat_1_sys_evt_sub_bckup = 69; 1773 // odpm irq stat 2 sub at brownout 1774 optional int32 odpm_irq_stat_2_sys_evt_sub_bckup = 70; 1775 // odpm irq stat 3 sub at brownout 1776 optional int32 odpm_irq_stat_3_sys_evt_sub_bckup = 71; 1777 // odpm irq stat 4 sub at brownout 1778 optional int32 odpm_irq_stat_4_sys_evt_sub_bckup = 72; 1779 // odpm irq stat 5 sub at brownout 1780 optional int32 odpm_irq_stat_5_sys_evt_sub_bckup = 73; 1781 // odpm irq stat 6 sub at brownout 1782 optional int32 odpm_irq_stat_6_sys_evt_sub_bckup = 74; 1783 // odpm irq stat 7 sub at brownout 1784 optional int32 odpm_irq_stat_7_sys_evt_sub_bckup = 75; 1785 // odpm irq stat 8 sub at brownout 1786 optional int32 odpm_irq_stat_8_sys_evt_sub_bckup = 76; 1787 // odpm irq stat 9 sub at brownout 1788 optional int32 odpm_irq_stat_9_sys_evt_sub_bckup = 77; 1789 // odpm irq stat 10 sub at brownout 1790 optional int32 odpm_irq_stat_10_sys_evt_sub_bckup = 78; 1791 // odpm irq stat 11 sub at brownout 1792 optional int32 odpm_irq_stat_11_sys_evt_sub_bckup = 79; 1793 // odpm irq stat ext 0 main at brownout 1794 optional int32 odpm_irq_stat_ext_0_sys_evt_main_bckup = 80; 1795 // odpm irq stat ext 1 main at brownout 1796 optional int32 odpm_irq_stat_ext_1_sys_evt_main_bckup = 81; 1797 // odpm irq stat ext 2 main at brownout 1798 optional int32 odpm_irq_stat_ext_2_sys_evt_main_bckup = 82; 1799 // odpm irq stat ext 3 main at brownout 1800 optional int32 odpm_irq_stat_ext_3_sys_evt_main_bckup = 83; 1801 // odpm irq stat ext 0 sub at brownout 1802 optional int32 odpm_irq_stat_ext_0_sys_evt_sub_bckup = 84; 1803 // odpm irq stat ext 1 sub at brownout 1804 optional int32 odpm_irq_stat_ext_1_sys_evt_sub_bckup = 85; 1805 // odpm irq stat ext 2 sub at brownout 1806 optional int32 odpm_irq_stat_ext_2_sys_evt_sub_bckup = 86; 1807 // odpm irq stat ext 3 sub at brownout 1808 optional int32 odpm_irq_stat_ext_3_sys_evt_sub_bckup = 87; 1809 // odpm irq stat gpu at brownout 1810 optional int32 odpm_irq_stat_gpu_bckup = 88; 1811 // odpm irq stat tpu at brownout 1812 optional int32 odpm_irq_stat_tpu_bckup = 89; 1813 // odpm irq stat cpu1 at brownout 1814 optional int32 odpm_irq_stat_cpu1_bckup = 90; 1815 // odpm irq stat cpu2 at brownout 1816 optional int32 odpm_irq_stat_cpu2_bckup = 91; 1817} 1818 1819/* 1820 * PCIe Link Statistics 1821 */ 1822message PcieLinkStatsReported { 1823 /* Vendor reverse domain name (expecting "com.google.pixel"). */ 1824 optional string reverse_domain_name = 1; 1825 1826 /* Count of new PCIe Link Down events on the modem interface */ 1827 optional int32 modem_pcie_linkdowns = 2; 1828 /* Count of new PCIe Completion Timeout events on the modem interface */ 1829 optional int32 modem_pcie_completion_timeouts = 3; 1830 /* Count of new PCIe Link Up Failure events on the modem interface */ 1831 optional int32 modem_pcie_linkup_failures = 4; 1832 /* Average pll lock time (uS) during PCIe Link Up on modem interface */ 1833 optional int32 modem_pcie_pll_lock_avg = 5; 1834 /* Average time (uS) for successful PCIe Link Up on modem interface */ 1835 optional int32 modem_pcie_link_up_avg = 6; 1836 1837 /* Count of new PCIe Link Down events on the wifi interface */ 1838 optional int32 wifi_pcie_linkdowns = 7; 1839 /* Count of new PCIe Completion Timeout events on the wifi interface */ 1840 optional int32 wifi_pcie_completion_timeouts = 8; 1841 /* Count of new PCIe Link Up Failure events on the wifi interface */ 1842 optional int32 wifi_pcie_linkup_failures = 9; 1843 /* Average pll lock time (uS) during PCIe Link Up on wifi interface */ 1844 optional int32 wifi_pcie_pll_lock_avg = 10; 1845 /* Average time (uS) for successful PCIe Link Up on wifi interface */ 1846 optional int32 wifi_pcie_link_up_avg = 11; 1847 1848 /* Count of new PCIe Link Recovery Failure events on the modem interface */ 1849 optional int32 modem_pcie_link_recovery_failures = 12; 1850 /* Count of new PCIe Link Recovery Failure events on the wifi interface */ 1851 optional int32 wifi_pcie_link_recovery_failures = 13; 1852} 1853 1854/** 1855 * Log the CDEV request stats per sensor, binded cooling device. 1856 * Logged from: hardware/google/pixel/thermal/utils/thermal_stats_helper.cpp 1857 */ 1858message VendorSensorCoolingDeviceStats { 1859 optional string reverse_domain_name = 1; 1860 // Sensor name which is making the cooling device request 1861 optional string trigger_sensor_name = 2; 1862 1863 // Cooling device name for which request is being made 1864 optional string cooling_device_name = 3; 1865 1866 // Time duration for which stats are recorded 1867 optional int64 since_last_update_ms = 4; 1868 1869 // Sequence of values corresponding to time spent in each request state 1870 optional int64 time_in_state_ms_bucket_1 = 5; 1871 optional int64 time_in_state_ms_bucket_2 = 6; 1872 optional int64 time_in_state_ms_bucket_3 = 7; 1873 optional int64 time_in_state_ms_bucket_4 = 8; 1874 optional int64 time_in_state_ms_bucket_5 = 9; 1875 optional int64 time_in_state_ms_bucket_6 = 10; 1876 optional int64 time_in_state_ms_bucket_7 = 11; 1877 optional int64 time_in_state_ms_bucket_8 = 12; 1878 optional int64 time_in_state_ms_bucket_9 = 13; 1879 optional int64 time_in_state_ms_bucket_10 = 14; 1880 optional int64 time_in_state_ms_bucket_11 = 15; 1881 optional int64 time_in_state_ms_bucket_12 = 16; 1882 optional int64 time_in_state_ms_bucket_13 = 17; 1883 optional int64 time_in_state_ms_bucket_14 = 18; 1884 optional int64 time_in_state_ms_bucket_15 = 19; 1885 optional int64 time_in_state_ms_bucket_16 = 20; 1886 optional int64 time_in_state_ms_bucket_17 = 21; 1887 optional int64 time_in_state_ms_bucket_18 = 22; 1888 optional int64 time_in_state_ms_bucket_19 = 23; 1889 optional int64 time_in_state_ms_bucket_20 = 24; 1890} 1891 1892/* Log playcount of effects in Vibrator HAL 1893 * 1894 * Logged from: 1895 * hardware/google/pixel/vibrator/ 1896 */ 1897message VibratorPlaycountReported { 1898 // Vendor reverse domain name (expecting "com.google.pixel"). 1899 optional string reverse_domain_name = 1; 1900 1901 // Playcount for each primitive 1902 // Each index tracks the count for that index in the waveform 1903 repeated int32 waveform_counts = 2; 1904 1905 // Playcount for each 50ms range. 1906 // Each index tracks [50ms * i, 50ms * (i + 1)) 1907 repeated int32 duration_counts = 3; 1908} 1909 1910/* Log latency encountered in Vibrator HAL 1911 * 1912 * Logged from: 1913 * hardware/google/pixel/vibrator/ 1914 */ 1915message VibratorLatencyReported { 1916 // Vendor reverse domain name (expecting "com.google.pixel"). 1917 optional string reverse_domain_name = 1; 1918 1919 // Minimum latency seen 1920 // 0 Prebaked and primitives 1921 // 1 Composed effects 1922 // 2 PWLE effects 1923 repeated int32 min_latencies = 2; 1924 1925 // Maximum latency seen 1926 // 0 Prebaked and primitives 1927 // 1 Composed effects 1928 // 2 PWLE effects 1929 repeated int32 max_latencies = 3; 1930 1931 // Average latency seen 1932 // 0 Prebaked and primitives 1933 // 1 Composed effects 1934 // 2 PWLE effects 1935 repeated int32 avg_latencies = 4; 1936} 1937 1938/* Log errors encountered in Vibrator HAL 1939 * 1940 * Logged from: 1941 * hardware/google/pixel/vibrator/ 1942 */ 1943message VibratorErrorsReported { 1944 // Vendor reverse domain name (expecting "com.google.pixel"). 1945 optional string reverse_domain_name = 1; 1946 1947 // Count for each error 1948 // 0 HwAPI Error 1949 // 1 HwCAL Error 1950 // 2 Compose Fail Error 1951 // 3 ALSA Fail Error 1952 // 4 Async Fail Error 1953 // 5 Bad Timeout Error 1954 // 6 Bad Amplitude Error 1955 // 7 Bad Effect Error 1956 // 8 Bad Effect Strength Error 1957 // 9 Bad Primitive Error 1958 // 10 Bad Composite Error 1959 // 11 PWLE Construction Fail Error 1960 // 12 Unsupported Method Error 1961 repeated int32 error_counts = 2; 1962} 1963 1964/* A message containing F2FS Atomic Write information */ 1965message F2fsAtomicWriteInfo { 1966 /* Vendor reverse domain name (expecting "com.google.pixel"). */ 1967 optional string reverse_domain_name = 1; 1968 /* Show the peak value of total current atomic write block count after boot */ 1969 optional int32 peak_atomic_write = 2; 1970 /* Show the accumulated total committed atomic write block count after boot */ 1971 optional int32 committed_atomic_block = 3; 1972 /* Show the accumulated total revoked atomic write block count after boot */ 1973 optional int32 revoked_atomic_block = 4; 1974} 1975 1976/* A message containing Partition Used Spaced information */ 1977message PartitionsUsedSpaceReported { 1978 enum Directory { 1979 UNKNOWN = 0; 1980 PERSIST = 1; 1981 } 1982 /* Vendor reverse domain name (expecting "com.google.pixel"). */ 1983 optional string reverse_domain_name = 1; 1984 1985 /* used space of directory information */ 1986 optional Directory directory = 2; 1987 optional int64 free_bytes = 3; 1988 optional int64 total_bytes = 4; 1989} 1990 1991message GpuEvent { 1992 enum GpuEventType { 1993 MALI_TYPE_NONE = 0; 1994 MALI_KMD_ERROR = 1; 1995 MALI_GPU_RESET = 2; 1996 } 1997 enum GpuEventInfo { 1998 MALI_INFO_NONE = 0; 1999 MALI_CSG_REQ_STATUS_UPDATE = 1; 2000 MALI_CSG_SUSPEND = 2; 2001 MALI_CSG_SLOTS_SUSPEND = 3; 2002 MALI_CSG_GROUP_SUSPEND = 4; 2003 MALI_CSG_EP_CFG = 5; 2004 MALI_CSG_SLOTS_START = 6; 2005 MALI_GROUP_TERM = 7; 2006 MALI_QUEUE_START = 8; 2007 MALI_QUEUE_STOP = 9; 2008 MALI_QUEUE_STOP_ACK = 10; 2009 MALI_CSG_SLOT_READY = 11; 2010 MALI_L2_PM_TIMEOUT = 12; 2011 MALI_PM_TIMEOUT = 13; 2012 MALI_CSF_RESET_OK = 14; 2013 MALI_CSF_RESET_FAILED = 15; 2014 MALI_TILER_OOM = 16; 2015 MALI_PROGRESS_TIMER = 17; 2016 MALI_CS_ERROR = 18; 2017 MALI_FW_ERROR = 19; 2018 MALI_PMODE_EXIT_TIMEOUT = 20; 2019 MALI_PMODE_ENTRY_FAILURE = 21; 2020 MALI_GPU_PAGE_FAULT = 22; 2021 MALI_MMU_AS_ACTIVE_STUCK = 23; 2022 MALI_TRACE_BUF_INVALID_SLOT = 24; 2023 } 2024 2025 /* Vendor reverse domain name (expecting "com.google.pixel"). */ 2026 optional string reverse_domain_name = 1; 2027 /* 2028 * Type of the GPU event. Possible values depend on the platform GPU. 2029 * Eg, MALI_KMD_ERROR, MALI_GPU_RESET. 2030 */ 2031 optional GpuEventType gpu_event_type = 2; 2032 /* 2033 * Additional information about the GPU event. Possible values depend 2034 * on the platform GPU. 2035 * Eg, MALI_PM_TIMEOUT, MALI_CSF_RESET_OK. 2036 */ 2037 optional GpuEventInfo gpu_event_info = 3; 2038} 2039/** 2040 * Log mitigation duration. 2041 */ 2042message PowerMitigationDurationCounts { 2043 optional string reverse_domain_name = 1; 2044 // Count of UVLO1 greater than threshold without any other concurrent IRQs. 2045 optional int32 greater_than_thresh_uvlo1_none = 2; 2046 // Count of UVLO1 IRQ + MMWAVE IRQ with duration greater than threshold. 2047 optional int32 greater_than_thresh_uvlo1_mmwave = 3; 2048 // Count of UVLO1 IRQ + RFFE IRQ with duration greater than threshold. 2049 optional int32 greater_than_thresh_uvlo1_rffe = 4; 2050 // Count of UVLO2 greater than threshold without any other concurrent IRQs. 2051 optional int32 greater_than_thresh_uvlo2_none = 5; 2052 // Count of UVLO2 IRQ + MMWAVE IRQ with duration greater than threshold. 2053 optional int32 greater_than_thresh_uvlo2_mmwave = 6; 2054 // Count of UVLO2 IRQ + RFFE IRQ with duration greater than threshold. 2055 optional int32 greater_than_thresh_uvlo2_rffe = 7; 2056 // Count of BATOILO greater than threshold without any other concurrent IRQs. 2057 optional int32 greater_than_thresh_batoilo_none = 8; 2058 // Count of BATOILO IRQ + MMWAVE IRQ with duration greater than threshold. 2059 optional int32 greater_than_thresh_batoilo_mmwave = 9; 2060 // Count of BATOILO IRQ + RFFE IRQ with duration greater than threshold. 2061 optional int32 greater_than_thresh_batoilo_rffe = 10; 2062 2063 // IRQ duration of main regulator indices 0-11 greater than threshold. 2064 optional int32 greater_than_thresh_main_0 = 11; 2065 optional int32 greater_than_thresh_main_1 = 12; 2066 optional int32 greater_than_thresh_main_2 = 13; 2067 optional int32 greater_than_thresh_main_3 = 14; 2068 optional int32 greater_than_thresh_main_4 = 15; 2069 optional int32 greater_than_thresh_main_5 = 16; 2070 optional int32 greater_than_thresh_main_6 = 17; 2071 optional int32 greater_than_thresh_main_7 = 18; 2072 optional int32 greater_than_thresh_main_8 = 19; 2073 optional int32 greater_than_thresh_main_9 = 20; 2074 optional int32 greater_than_thresh_main_10 = 21; 2075 optional int32 greater_than_thresh_main_11 = 22; 2076 2077 // IRQ duration of sub regulator indices 0-11 greater than threshold. 2078 optional int32 greater_than_thresh_sub_0 = 23; 2079 optional int32 greater_than_thresh_sub_1 = 24; 2080 optional int32 greater_than_thresh_sub_2 = 25; 2081 optional int32 greater_than_thresh_sub_3 = 26; 2082 optional int32 greater_than_thresh_sub_4 = 27; 2083 optional int32 greater_than_thresh_sub_5 = 28; 2084 optional int32 greater_than_thresh_sub_6 = 29; 2085 optional int32 greater_than_thresh_sub_7 = 30; 2086 optional int32 greater_than_thresh_sub_8 = 31; 2087 optional int32 greater_than_thresh_sub_9 = 32; 2088 optional int32 greater_than_thresh_sub_10 = 33; 2089 optional int32 greater_than_thresh_sub_11 = 34; 2090} 2091 2092/* 2093 * Logs the third party audio effects stats. 2094 * Third party audio effects stats includes duration in milliseconds for each 2095 * instance of the effects (speaker, USB, etc.). 2096 */ 2097message VendorAudioThirdPartyEffectStatsReported { 2098 /* Vendor reverse domain name (expecting "com.google.pixel"). */ 2099 optional string reverse_domain_name = 1; 2100 2101 enum InstanceId { 2102 OTHER = 0; 2103 SPEAKER = 1; 2104 USB = 2; 2105 BT_A2DP = 3; 2106 BT_LE = 4; 2107 } 2108 /* Instance of the effect. */ 2109 optional InstanceId instance = 2; 2110 /* Active duration in milliseconds per day for volume range 0. */ 2111 optional int32 volume_range_0_active_ms_per_day = 3; 2112 /* Active duration in milliseconds per day for volume range 1. */ 2113 optional int32 volume_range_1_active_ms_per_day = 4; 2114 /* Active duration in milliseconds per day for volume range 2. */ 2115 optional int32 volume_range_2_active_ms_per_day = 5; 2116 /* Active duration in milliseconds per day for volume range 3. */ 2117 optional int32 volume_range_3_active_ms_per_day = 6; 2118 /* Active duration in milliseconds per day for volume range 4. */ 2119 optional int32 volume_range_4_active_ms_per_day = 7; 2120 /* Active duration in milliseconds per day for volume range 5. */ 2121 optional int32 volume_range_5_active_ms_per_day = 8; 2122 /* Active duration in milliseconds per day for volume range 6. */ 2123 optional int32 volume_range_6_active_ms_per_day = 9; 2124 /* Active duration in milliseconds per day for volume range 7. */ 2125 optional int32 volume_range_7_active_ms_per_day = 10; 2126 /* Active duration in milliseconds per day for volume range 8. */ 2127 optional int32 volume_range_8_active_ms_per_day = 11; 2128 /* Active duration in milliseconds per day for volume range 9. */ 2129 optional int32 volume_range_9_active_ms_per_day = 12; 2130} 2131 2132/* 2133 * Logs the Audio Adapted information stats. 2134 * Two stats are recorded, count and duration (in ms) per features. 2135 */ 2136message VendorAudioAdaptedInfoStatsReported { 2137 /* Vendor reverse domain name */ 2138 optional string reverse_domain_name = 1; 2139 2140 enum AdaptedInfoFeature { 2141 UNKNOWN = 0; 2142 BATTERY_ADAPTED_AUDIO_CONTROL = 1; 2143 MEDIA_PLAYBACK_THERMAL_THROTTLE = 2; 2144 TELEPHONY_THERMAL_THROTTLE = 3; 2145 ACOUSTIC_SHOCK = 4; 2146 SPATIAL_AUDIO = 5; 2147 }; 2148 /* Feature to record the stats */ 2149 optional AdaptedInfoFeature feature_id = 2; 2150 /* Number of time the feature is active */ 2151 optional int32 active_counts_per_day = 3; 2152 /* Duration the feature is active in milliseconds */ 2153 optional int32 active_duration_ms_per_day = 4; 2154} 2155 2156/* 2157 * Logs the audio PCM usage stats. 2158 * PCM usage includes average latency and total active count per day. 2159 */ 2160message VendorAudioPcmStatsReported { 2161 /* Vendor reverse domain name */ 2162 optional string reverse_domain_name = 1; 2163 2164 enum HalPcmType { 2165 UNKNOWN = 0; 2166 DEEPBUFFER = 1; 2167 LOWLATENCY = 2; 2168 MMAP_PLAY = 3; 2169 RAW_PLAY = 4; 2170 IMMERSIVE = 5; 2171 HAPTIC = 6; 2172 COMPRESS = 7; 2173 MMAP_REC = 8; 2174 RAW_REC = 9; 2175 AUDIO_REC = 10; 2176 HIFI_RX = 11; 2177 HIFI_TX = 12; 2178 IMMUTABLE_RX = 13; 2179 CUSTOM_PCM_1 = 14; 2180 CUSTOM_PCM_2 = 15; 2181 CUSTOM_PCM_3 = 16; 2182 CUSTOM_PCM_4 = 17; 2183 CUSTOM_PCM_5 = 18; 2184 }; 2185 /* Type of PCM */ 2186 optional HalPcmType type = 2; 2187 /* Average latency in millisecond of the pcm type per day. */ 2188 optional int32 pcm_open_latency_avg_ms_per_day = 3; 2189 /* Total active count of the pcm type per day. */ 2190 optional int32 pcm_active_counts_per_day = 4; 2191} 2192 2193/** 2194 * Keep track of information about a USB data session, which is defined 2195 * as the period when a port enters a data role (either host or device) to 2196 * when the port exits the data role. 2197 */ 2198message VendorUsbDataSessionEvent { 2199 /* Vendor reverse domain name (expecting "com.google.pixel") */ 2200 optional string reverse_domain_name = 1; 2201 2202 enum UsbDataRole { 2203 USB_ROLE_UNKNOWN = 0; 2204 USB_ROLE_DEVICE = 1; 2205 USB_ROLE_HOST = 2; 2206 } 2207 /** 2208 * USB device states are key milestones in a USB connection. 2209 * For device data role, a typical transition would be like: 2210 * not attached -> default -> addressed -> configured. 2211 * For host data role, a typical transition would be like 2212 * not attached -> powered -> default -> addressed -> configured. 2213 */ 2214 enum UsbDeviceState { 2215 USB_STATE_UNKNOWN = 0; 2216 USB_STATE_NOT_ATTACHED = 1; 2217 USB_STATE_ATTACHED = 2; 2218 USB_STATE_POWERED = 3; 2219 USB_STATE_DEFAULT = 4; 2220 USB_STATE_ADDRESSED = 5; 2221 USB_STATE_CONFIGURED = 6; 2222 USB_STATE_SUSPENDED = 7; 2223 } 2224 /* USB data role of the data session. */ 2225 optional UsbDataRole usb_role = 2; 2226 /* Usb device state transitions during the data session. */ 2227 repeated UsbDeviceState usb_states = 3; 2228 /** 2229 * Elapsed time from the start of the data session when entering the 2230 * state, mapped 1-1 to the usb_states field. 2231 */ 2232 repeated int64 elapsed_time_ms = 4; 2233 // Duration of the data session. 2234 optional int64 duration_ms = 5; 2235} 2236 2237/* 2238 * Logs the thermal sensor abnormal event when detected. 2239 * Logged from: 2240 * virtual sensors: hardware/google/pixel/thermal/utils/thermal_stats_helper.cpp 2241 * thermistors & SoC: hardware/google/pixel/pixelstats/UeventListener.cpp 2242 */ 2243message ThermalSensorAbnormalityDetected { 2244 enum AbnormalityType { 2245 UNKNOWN = 0; 2246 SENSOR_STUCK = 1; 2247 EXTREME_HIGH_TEMP = 2; 2248 EXTREME_LOW_TEMP = 3; 2249 HIGH_RISING_SPEED = 4; 2250 TEMP_READ_FAIL = 5; 2251 } 2252 2253 /* Vendor reverse domain name */ 2254 optional string reverse_domain_name = 1; 2255 /* Type of Thermal Sensor Abnormality */ 2256 optional AbnormalityType type = 2; 2257 /* Name of the problematic sensor */ 2258 optional string sensor = 3; 2259 /* Abnormal temp reading of sensor */ 2260 optional int32 temp = 4; 2261} 2262 2263/** 2264 * Logs the reported vendor audio offloaded effects usage stats. 2265 */ 2266message VendorAudioOffloadedEffectStatsReported { 2267 /* Vendor reverse domain name */ 2268 optional string reverse_domain_name = 1; 2269 2270 /* UUID most significant bit */ 2271 optional int64 effect_uuid_msb = 2; 2272 2273 /* UUID least significant bit */ 2274 optional int64 effect_uuid_lsb = 3; 2275 2276 /* Active seconds per day. */ 2277 optional int32 effect_active_seconds_per_day = 4; 2278} 2279 2280/* 2281 * Logs the Bluetooth Audio stats. 2282 * Two stats are recorded, count and duration (in ms) per features. 2283 */ 2284message VendorAudioBtMediaStatsReported { 2285 /* Vendor reverse domain name */ 2286 optional string reverse_domain_name = 1; 2287 2288 enum Codec { 2289 UNKNOWN = 0; 2290 SBC = 1; 2291 AAC = 2; 2292 OPUS = 3; 2293 LC3 = 4; 2294 } 2295 /* Codec to record. */ 2296 optional Codec bt_codec_type = 2; 2297 /* Total active seconds to record. */ 2298 optional int32 active_seconds_per_day = 3; 2299} 2300 2301/* 2302 * Logs the usage of APIs in Pixel Impulse. 2303 */ 2304message PixelImpulseUsageReported { 2305 /* Vendor reverse domain name */ 2306 optional string reverse_domain_name = 1; 2307 2308 /* UID of the caller package */ 2309 optional int32 caller_uid = 2 [(android.os.statsd.is_uid) = true]; 2310 2311 /* UID of the callee package */ 2312 optional int32 callee_uid = 3 [(android.os.statsd.is_uid) = true]; 2313 2314 enum ApiName { 2315 API_UNKNOWN = 0; 2316 /* Server side */ 2317 API_SERVICE_BIND = 1; 2318 API_SERVICE_UNBIND = 2; 2319 API_REGISTER = 3; 2320 API_UNREGISTER = 4; 2321 API_CLEAR_APP_DATA = 100; 2322 /* Client side */ 2323 API_SERVER_START = 1001; 2324 API_PIXEL_STATE_CHANGE = 1002; 2325 /* Internal */ 2326 INTERNAL_PLATFORM_CONNECTION_CONNECT = 10001; 2327 INTERNAL_PLATFORM_CONNECTION_DISCONNECT = 10002; 2328 INTERNAL_PLATFORM_CONNECTION_CHANGE = 10003; 2329 INTERNAL_CLIENT_LISTENER_ADD = 10004; 2330 INTERNAL_CLIENT_LISTENER_REMOVE = 10005; 2331 INTERNAL_WAIT = 10006; 2332 INTERNAL_COROUTINE_ENQUEUE = 10007; 2333 INTERNAL_COROUTINE_RUN = 10008; 2334 } 2335 /* Invoked API name */ 2336 optional ApiName api_name = 4; 2337 2338 enum Tag { 2339 TAG_UNKNOWN = 0; 2340 TAG_TEMPERATURE_READ_DELAY = 1; 2341 TAG_SKIN_TEMPERATURE = 2; 2342 TAG_BUSINESS_SCOPE = 3; 2343 TAG_NON_BUSINESS_SCOPE = 4; 2344 } 2345 /* Tag for debugging purpose */ 2346 optional Tag tag = 5; 2347 2348 /* Timestamp of the usage start in epoch time */ 2349 optional int64 usage_start_epoch_millis = 6; 2350 2351 /* Timestamp of the usage start since device boot */ 2352 optional int64 usage_start_uptime_millis = 7; 2353 2354 /* Duration of the usage */ 2355 optional int64 usage_duration_millis = 8; 2356 2357 /* Whether the invocation was successful */ 2358 optional bool success = 9; 2359 2360 enum FailReason { 2361 FAIL_REASON_UNKNOWN = 0; 2362 FAIL_REASON_INVALID_ARGUMENT = 1; 2363 FAIL_REASON_UNAUTHORIZED = 2; 2364 FAIL_REASON_TIMEOUT = 3; 2365 FAIL_REASON_NOT_FOUND = 4; 2366 FAIL_REASON_INVALID_STATE = 5; 2367 } 2368 /* Fail reason (if success == false) */ 2369 optional FailReason fail_reason = 10; 2370 2371 /* Size of the arguments */ 2372 optional int32 request_size = 11; 2373 2374 /* Platform connection usage */ 2375 /* Used when api_name == INTERNAL_PLATFORM_CONNECTION_CHANGE */ 2376 optional int32 internal_platform_connection_count = 12; 2377 2378 /* Client state source usage */ 2379 /* Used when api_name == INTERNAL_CLIENT_LISTENER_* */ 2380 optional int32 internal_client_listener_count = 13; 2381 2382 enum StateSource { 2383 STATE_SOURCE_UNKNOWN = 0; 2384 STATE_SOURCE_UID_IMPORTANCE = 1; 2385 STATE_SOURCE_CAMERA_AVAILABILITY = 2; 2386 STATE_SOURCE_DROPBOX_BROADCAST = 3; 2387 STATE_SOURCE_TEMPERATURE = 4; 2388 STATE_SOURCE_THERMAL_STATUS = 5; 2389 } 2390 /* State source involved */ 2391 /* Used when api_name == INTERNAL_PLATFORM_CONNECTION_* or 2392 * api_name == INTERNAL_CLIENT_LISTENER_* */ 2393 optional StateSource state_source = 14; 2394 2395 /* UID importance cut point */ 2396 /* This is the UID importance cutpoint associated with the 2397 * OnUidImportanceListener 2398 */ 2399 /* Used when state_source == STATE_SOURCE_UID_IMPORTANCE */ 2400 optional android.app.Importance uid_importance_cut_point = 15; 2401 2402 /* Expected value for temperature delta in Celsius */ 2403 optional float expected_temperature_celsius = 16; 2404 2405 /* Actual value for temperature delta in Celsius */ 2406 optional float actual_temperature_celsius = 17; 2407} 2408 2409/** 2410 * Log DisplayPort link error statistics. 2411 */ 2412message DisplayPortErrorStats { 2413 /* Vendor reverse domain name */ 2414 optional string reverse_domain_name = 1; 2415 2416 /* The error count due to link training failed. */ 2417 optional int32 link_negotiation_failures = 2; 2418 /* The error count due to read EDID failed. */ 2419 optional int32 edid_read_failures = 3; 2420 /* The error count due to read dpcd failed. */ 2421 optional int32 dpcd_read_failures = 4; 2422 /* The error count due to EDID is invalid. */ 2423 optional int32 edid_invalid_failures = 5; 2424 /* The error count due to sink count is invalid. */ 2425 optional int32 sink_count_invalid_failures = 6; 2426 /* The error count due to link unstable. */ 2427 optional int32 link_unstable_failures = 7; 2428} 2429 2430/** 2431 * Log HDCP authentication type statistics. 2432 */ 2433message HDCPAuthTypeStats { 2434 /* Vendor reverse domain name */ 2435 optional string reverse_domain_name = 1; 2436 2437 /* The count due to hdcp2 success */ 2438 optional int32 hdcp2_success_count = 2; 2439 /* The count due to hdcp2 fallback */ 2440 optional int32 hdcp2_fallback_count = 3; 2441 /* The count due to hdcp2 fail */ 2442 optional int32 hdcp2_fail_count = 4; 2443 /* The count due to hdcp1 success */ 2444 optional int32 hdcp1_success_count = 5; 2445 /* The count due to hdcp1 fail */ 2446 optional int32 hdcp1_fail_count = 6; 2447 /* The count due to hdcp0 */ 2448 optional int32 hdcp0_count = 7; 2449} 2450 2451/** 2452 * A message containing how DisplayPort is being used in a day. 2453 */ 2454message DisplayPortUsage { 2455 /* Vendor reverse domain name */ 2456 optional string reverse_domain_name = 1; 2457 2458 /* resolution width */ 2459 optional int32 width = 2; 2460 /* resolution height */ 2461 optional int32 height = 3; 2462 /* refresh rate */ 2463 optional float refresh_rate = 4; 2464 /* vendor ID. */ 2465 optional int32 vendor_id = 5; 2466 /* product ID. */ 2467 optional int32 product_id = 6; 2468 /* indicated start/stop event of DP usage */ 2469 optional bool connected = 7; 2470} 2471 2472/* 2473 * A message containing max77779 fuel gauge abnormal events 2474 * Logged from: 2475 * hardware/google/pixel/pixelstats/BatteryFGReporter.cpp 2476 */ 2477message FuelGaugeAbnormalityReported { 2478 enum Event { 2479 UNKNOWN_EVENT = 0; 2480 FULLCAPNOM_LOW = 1; // unexpected fullcapnom learning (too low) 2481 FULLCAPNOM_HIGH = 2; // unexpected fullcapnom learning (too high) 2482 REPSOC_EDET = 3; // empty detect false alarm 2483 REPSOC_FDET = 4; // full detect false alarm 2484 REPSOC = 5; // repsoc not accurate 2485 VFOCV = 6; // vfocv estimation wrong 2486 } 2487 enum EventState { 2488 UNKNOWN_STATE = 0; 2489 UNTRIGGER = 1; 2490 TRIGGER = 2; 2491 } 2492 /* Vendor reverse domain name */ 2493 optional string reverse_domain_name = 1; 2494 /* Report by which event */ 2495 repeated Event event = 2; 2496 /* State was triggered or untriggered */ 2497 repeated EventState event_state = 3; 2498 optional int32 duration_secs = 4; 2499 /* Record fuel gauge registers at the time of the event */ 2500 optional int32 fg_register_address_1 = 5; 2501 optional int32 fg_register_data_1 = 6; 2502 optional int32 fg_register_address_2 = 7; 2503 optional int32 fg_register_data_2 = 8; 2504 optional int32 fg_register_address_3 = 9; 2505 optional int32 fg_register_data_3 = 10; 2506 optional int32 fg_register_address_4 = 11; 2507 optional int32 fg_register_data_4 = 12; 2508 optional int32 fg_register_address_5 = 13; 2509 optional int32 fg_register_data_5 = 14; 2510 optional int32 fg_register_address_6 = 15; 2511 optional int32 fg_register_data_6 = 16; 2512 optional int32 fg_register_address_7 = 17; 2513 optional int32 fg_register_data_7 = 18; 2514 optional int32 fg_register_address_8 = 19; 2515 optional int32 fg_register_data_8 = 20; 2516 optional int32 fg_register_address_9 = 21; 2517 optional int32 fg_register_data_9 = 22; 2518 optional int32 fg_register_address_10 = 23; 2519 optional int32 fg_register_data_10 = 24; 2520 optional int32 fg_register_address_11= 25; 2521 optional int32 fg_register_data_11= 26; 2522 optional int32 fg_register_address_12= 27; 2523 optional int32 fg_register_data_12 = 28; 2524 optional int32 fg_register_address_13 = 29; 2525 optional int32 fg_register_data_13 = 30; 2526 optional int32 fg_register_address_14 = 31; 2527 optional int32 fg_register_data_14 = 32; 2528 optional int32 fg_register_address_15 = 33; 2529 optional int32 fg_register_data_15 = 34; 2530 optional int32 fg_register_address_16 = 35; 2531 optional int32 fg_register_data_16 = 36; 2532} 2533 2534/* 2535 * Process memory usage by Oom groups 2536 */ 2537message MmProcessUsageByOomGroupSnapshot { 2538 enum OomGroup { 2539 OOMR_950 = 0; 2540 OOMR_900 = 1; 2541 OOMR_850 = 2; 2542 OOMR_800 = 3; 2543 OOMR_750 = 4; 2544 OOMR_700 = 5; 2545 OOMR_650 = 6; 2546 OOMR_600 = 7; 2547 OOMR_550 = 8; 2548 OOMR_500 = 9; 2549 OOMR_450 = 10; 2550 OOMR_400 = 11; 2551 OOMR_350 = 12; 2552 OOMR_300 = 13; 2553 OOMR_250 = 14; 2554 OOMR_200 = 15; 2555 OOMS_200 = 16; 2556 OOMR_150 = 17; 2557 OOMR_100 = 18; 2558 OOMR_050 = 19; 2559 OOMR_000 = 20; 2560 OOMS_000 = 21; 2561 OOMR_NEGATIVE = 22; 2562 /* reserved for future error handling */ 2563 OOM_UNKNOWN = 999; 2564 } 2565 /* Vendor reverse domain name */ 2566 optional string reverse_domain_name = 1; 2567 /* Unique ID per knob read */ 2568 optional int32 metric_uid = 2; 2569 /* 2570 * This is the dimension: each knob read will create N atoms. 2571 * N = number of groups defined in the enumerate above. 2572 */ 2573 optional OomGroup oom_group = 3; 2574 optional int64 nr_task = 4; 2575 optional int64 file_rss = 5; 2576 optional int64 anon_rss = 6; 2577 optional int64 pgtable = 7; 2578 optional int64 swap_ent = 8; 2579 optional int64 shmem_rss = 9; 2580} 2581 2582/* 2583 * GCMA memory hourly snapshot 2584 */ 2585message MmGcmaSnapshot { 2586 /* Vendor reverse domain name */ 2587 optional string reverse_domain_name = 1; 2588 /* cached memory */ 2589 optional int64 cached = 2; 2590} 2591 2592/* 2593 * GCMA memory daily statistics 2594 */ 2595message MmGcmaStats { 2596 /* Vendor reverse domain name */ 2597 optional string reverse_domain_name = 1; 2598 /* statistics */ 2599 optional int64 discarded = 2; 2600 optional int64 evicted = 3; 2601 optional int64 loaded = 4; 2602 optional int64 stored = 5; 2603 repeated int64 latency_histogram = 6; 2604} 2605 2606/* 2607 * A message containing the USB audio capability of the connected accessories. 2608 */ 2609message VendorAudioUsbDeviceCapabilityStats { 2610 /* Vendor reverse domain name */ 2611 optional string reverse_domain_name = 1; 2612 2613 enum UsbMode { 2614 UNKNOWN_MODE = 0; 2615 ASYNC_MODE = 1; 2616 ADAPTIVE_MODE = 2; 2617 SYNC_MODE = 3; 2618 } 2619 /* USB Modes */ 2620 repeated UsbMode playback_supported_modes = 2; 2621 repeated UsbMode capture_supported_modes = 3; 2622 2623 enum UsbSpeed { 2624 OTHER_SPEED = 0; 2625 FULL_SPEED = 1; 2626 HIGH_SPEED = 2; 2627 SUPER_SPEED = 3; 2628 } 2629 /* USB Speed */ 2630 optional UsbSpeed usb_speed = 4 [deprecated = true]; 2631 2632 /* Data Packets Interval in ms. Expected value is between 125 and 1000.*/ 2633 repeated int32 playback_data_packet_interval = 5; 2634 repeated int32 capture_data_packet_interval = 6; 2635 2636 /* List of supported sample rates in increasing order. */ 2637 repeated int32 playback_supported_sample_rates = 7; 2638 repeated int32 capture_supported_sample_rates = 8; 2639 2640 /* Maximum number of channels supported */ 2641 optional int32 playback_supported_channel_count = 9; 2642 optional int32 capture_supported_channel_count = 10; 2643 2644 enum PcmType { 2645 DEFAULT = 0; 2646 INT16_BIT = 1; 2647 INT32_BIT = 2; 2648 FIXED_Q824 = 3; 2649 FLOAT32_BIT = 4; 2650 INT24_BIT = 5; 2651 DSD32_BIT = 6; 2652 } 2653 /* Supported PCM Type */ 2654 repeated PcmType playback_supported_pcm_types = 11; 2655 repeated PcmType capture_supported_pcm_types = 12; 2656 2657 /* Supported endian */ 2658 optional bool is_big_endian = 13; 2659 2660 /* Is USB device support playback */ 2661 optional bool is_playback = 14; 2662 2663 /* Duration connected */ 2664 optional int32 duration_second_connected = 15; 2665}; 2666 2667/* 2668 * A message containing battery time to full stats 2669 * Logged from: 2670 * hardware/google/pixel/pixelstats/BatteryTTFReporter.cpp 2671 */ 2672message BatteryTimeToFullStatsReported { 2673 // Vendor reverse domain name (expecting "com.google.pixel"). 2674 optional string reverse_domain_name = 1; 2675 2676 // The charge_counter and elap of each soc 2677 optional int32 ttf_type = 2; 2678 optional int32 ttf_range = 3; 2679 optional int32 soc_0 = 4; 2680 optional int32 soc_1 = 5; 2681 optional int32 soc_2 = 6; 2682 optional int32 soc_3 = 7; 2683 optional int32 soc_4 = 8; 2684 optional int32 soc_5 = 9; 2685 optional int32 soc_6 = 10; 2686 optional int32 soc_7 = 11; 2687 optional int32 soc_8 = 12; 2688 optional int32 soc_9 = 13; 2689} 2690 2691/* 2692 * A message containing Direct USB Access event. 2693 */ 2694message VendorAudioDirectUsbAccessUsageStats { 2695 /* Vendor reverse domain name */ 2696 optional string reverse_domain_name = 1; 2697 2698 optional int32 duration_second = 2; 2699}; 2700 2701/* 2702 * A message containing Usb Config event. 2703 */ 2704message VendorAudioUsbConfigStats { 2705 /* Vendor reverse domain name */ 2706 optional string reverse_domain_name = 1; 2707 2708 /* Is config for playback or capture */ 2709 optional bool is_playback = 2; 2710 2711 /* Is config for hifi */ 2712 optional bool has_hifi = 3; 2713 2714 /* Sample rate used */ 2715 optional int32 sample_rate = 4; 2716 2717 /* Channel used */ 2718 optional int32 channel = 5; 2719 2720 /* Pcm Type used */ 2721 optional int32 pcm_type = 6; 2722 2723 /* Duration in second */ 2724 optional int32 duration_second = 7; 2725}; 2726 2727/* GPU memory allocation information for frozen apps */ 2728message GpuFrozenAppsMemoryPerUid { 2729 /* Vendor reverse domain name (expecting "com.google.pixel"). */ 2730 optional string reverse_domain_name = 1; 2731 2732 /* UID of the frozen app. */ 2733 optional int32 uid = 2 [(android.os.statsd.is_uid) = true]; 2734 2735 /* Total amount of GPU memory allocated by this app, in kilobytes. */ 2736 optional int64 gpu_memory_kb = 3; 2737} 2738 2739/** 2740 * Logs for repair mode enter 2741 * Logged from: 2742 * vendor/google/apps/RepairMode/ 2743 * 2744 * Estimated Logging Rate: 2745 * Peak: 5 times in 1 min | Avg: 3 times per device per year 2746 */ 2747 message RepairModeEntered { 2748 // Vendor reverse domain name (expecting "com.google.pixel"). 2749 optional string reverse_domain_name = 1; 2750 // free storage size on device when entering repair mode in megabyte 2751 optional int64 storage_size_mb = 2; 2752} 2753 2754/** 2755 * Logs for repair mode exit 2756 * Logged from: 2757 * vendor/google/apps/RepairMode/ 2758 * 2759 * Estimated Logging Rate: 2760 * Peak: 5 times in 1 min | Avg: 3 times per device per year 2761 */ 2762message RepairModeExited { 2763 // Vendor reverse domain name (expecting "com.google.pixel"). 2764 optional string reverse_domain_name = 1; 2765 // free storage size on device when exiting repair mode in megabyte 2766 optional int64 storage_size_mb = 2; 2767 // whether diagnostic tool is executed during repair mode 2768 // false if diagnostic tool is never run 2769 // true if diagnostic is run once or more 2770 optional bool is_diagnostic_run = 3; 2771 2772 // how user auth/verify the credential to exit repair mode 2773 enum ExitMethod { 2774 UNSPECIFIED = 0; 2775 // auth by google account 2776 GAUTH = 1; 2777 // auth by screen lock on the device 2778 SCREEN_LOCK = 2; 2779 } 2780 // method for auth when exiting repair mode 2781 optional ExitMethod exit_method = 4; 2782} 2783 2784/** 2785 * Logs when a user cannot enter repair mode due to insufficient storage 2786 * Logged from: 2787 * vendor/google/apps/RepairMode/ 2788 * 2789 * Estimated Logging Rate: 2790 * Peak: 1 time in 5 mins | Avg: 20 times per device per year 2791 */ 2792message RepairModeLowStorageReported { 2793 // Vendor reverse domain name (expecting "com.google.pixel"). 2794 optional string reverse_domain_name = 1; 2795 // free storage size on the device in megabyte 2796 optional int64 storage_size_mb = 2; 2797} 2798 2799/** 2800 * Logs programmatic error that prevent users from entering repair mode 2801 * Logged from: 2802 * vendor/google/apps/RepairMode/ 2803 * 2804 * Estimated Logging Rate: 2805 * Peak: 1 time in 3 mins | Avg: 2 times per device per year 2806 */ 2807message RepairModeErrorReported { 2808 // Vendor reverse domain name (expecting "com.google.pixel"). 2809 optional string reverse_domain_name = 1; 2810 2811 // Error type that prevent user from entering repair mode 2812 enum ErrorType { 2813 UNSPECIFIED = 0; 2814 // Dynamic system failed to install image 2815 INSTALLED_FAILED = 1; 2816 // Failed to enable Dynamic system 2817 ENABLE_DYN_FAILED = 2; 2818 // Failed to reboot 2819 REBOOT_FAILED = 3; 2820 } 2821 2822 optional ErrorType error_type = 2; 2823} 2824 2825/* 2826 * Log if a device is plugged into a display that 2827 * supports forward error correction (FEC) and 2828 * display stream compression (DSC) 2829 */ 2830message DisplayPortDSCSupportCountStatsReported{ 2831 /* Vendor reverse domain name */ 2832 optional string reverse_domain_name = 1; 2833 2834 /* Counts of connections where FEC/DSC is 2835 * supported or not 2836 */ 2837 optional int32 fec_dsc_supported = 2; 2838 optional int32 fec_dsc_not_supported = 3; 2839} 2840 2841/* 2842* A message containing the use counts of various maximum 2843* resolutions the displays plugged into the phone use. 2844*/ 2845message DisplayPortMaxResolutionCountStatsReported{ 2846 2847 /* Vendor reverse domain name */ 2848 optional string reverse_domain_name = 1; 2849 2850 /* Other Resolutions that don't fit into the current list */ 2851 optional int32 max_res_other = 2; 2852 2853 /* Predefined Resolutions */ 2854 optional int32 max_res_1366_768 = 3; 2855 optional int32 max_res_1440_900 = 4; 2856 optional int32 max_res_1600_900 = 5; 2857 optional int32 max_res_1920_1080 = 6; 2858 optional int32 max_res_2560_1080 = 7; 2859 optional int32 max_res_2560_1440 = 8; 2860 optional int32 max_res_3440_1440 = 9; 2861 optional int32 max_res_3840_2160 = 10; 2862 optional int32 max_res_5120_2880 = 11; 2863 optional int32 max_res_7680_4320 = 12; 2864} 2865 2866/* Audio Device Interface. */ 2867enum AudioDeviceInterface { 2868 UNKNOWN_DEVICE_INTERFACE = 0; 2869 2870 // Built-in speakers 2871 SPEAKER = 1; 2872 SPEAKER_EARPIECE = 2; 2873 SPEAKER_SAFE = 3; 2874 2875 // Built-in microphones 2876 MICROPHONES = 4; 2877 BACK_MICROPHONES = 5; 2878 // internal used microphones 2879 ULTRASOUND_MICROPHONES = 6; 2880 SOUND_TRIGGER_MICROPHONES = 7; 2881 2882 // BT SCO 2883 BLUETOOTH_SCO_DEFAULT = 8; 2884 BLUETOOTH_SCO_HEADSET = 9; 2885 BLUETOOTH_SCO_CAR_KIT = 10; 2886 BLUETOOTH_SCO_HEADSET_MICROPHONES = 11; 2887 2888 // BT A2DP 2889 BLUETOOTH_A2DP_DEVICE = 12; 2890 BLUETOOTH_A2DP_SPEAKER = 13; 2891 BLUETOOTH_A2DP_HEADPHONE = 14; 2892 2893 // BT low energy (BLE) 2894 BLUETOOTH_LOW_ENERGY_SPEAKER = 15; 2895 BLUETOOTH_LOW_ENERGY_HEADSET = 16; 2896 BLUETOOTH_LOW_ENERGY_BROADCAST = 17; 2897 BLUETOOTH_LOW_ENERGY_HEADSET_MICROPHONES = 18; 2898 2899 // USB 2900 USB_DEVICE = 19; 2901 USB_HEADSET = 20; 2902 USB_DOCK = 21; 2903 USB_DEVICE_MICROPHONES = 22; 2904 USB_HEADSET_MICROPHONES = 23; 2905 USB_DOCK_MICROPHONES = 24; 2906 2907 // HDMI 2908 HDMI_DEVICE = 25; 2909 2910 // Telephony 2911 TELEPHONY_TX = 26; 2912 TELEPHONY_RX = 27; 2913 IN_CALL_CAPTURE_SOURCE0 = 28; 2914 IN_CALL_CAPTURE_SOURCE1 = 29; 2915 IN_CALL_CAPTURE_SOURCE2 = 30; 2916 2917 // Null sink and source 2918 NULL_SOURCE = 31; 2919 NULL_SINK = 32; 2920 2921 // Echo reference 2922 ECHO_REFERENCE_DEVICE_INTERFACE = 33; 2923} 2924 2925/* Audio Use Case. */ 2926enum AudioUseCase { 2927 UNKNOWN_VENDOR_AUDIO_USECASE = 0; 2928 // playback use cases 2929 PRIMARY_PLAYBACK = 1; 2930 RAW_PLAYBACK = 2; 2931 DEEP_BUFFER_PLAYBACK = 3; 2932 COMPRESS_OFFLOAD_PLAYBACK = 4; 2933 MMAP_PLAYBACK = 5; 2934 HIFI_PLAYBACK = 6; 2935 VOIP_PLAYBACK = 7; 2936 TELEPHONY_PLAYBACK = 8; 2937 IN_CALL_PLAYBACK = 9; 2938 SPATIALIZER_PLAYBACK = 10; 2939 ULTRASOUND_PLAYBACK = 11; 2940 HAPTIC_PLAYBACK = 12; 2941 SPATIALIZER_OFFLOAD_PLAYBACK = 13; 2942 // capture use cases 2943 PRIMARY_CAPTURE = 14; 2944 FAST_CAPTURE = 15; 2945 HIFI_CAPTURE = 16; 2946 MMAP_CAPTURE = 17; 2947 VOIP_CAPTURE = 18; 2948 VOIP_GSENET_CAPTURE = 19; 2949 ULTRASOUND_CAPTURE = 20; 2950 TELEPHONY_CAPTURE = 21; 2951 IN_CALL_CAPTURE = 22; 2952 SOUND_TRIGGER_CAPTURE = 23; 2953 SOUND_TRIGGER_TAP_CAPTURE = 24; 2954 HOTWORD_LOOKBACK_CAPTURE = 25; 2955 ECHO_REFERENCE_CAPTURE = 26; 2956 2957 // voice call use case 2958 VOICE_CALL_DOWNLINK = 27; 2959 VOICE_CALL_UPLINK = 28; 2960} 2961 2962/* Audio source with the original enum value. */ 2963enum AudioSource { 2964 DEFAULT = 0; 2965 MIC = 1; 2966 VOICE_UPLINK = 2; 2967 VOICE_DOWNLINK = 3; 2968 VOICE_CALL = 4; 2969 CAMCORDER = 5; 2970 VOICE_RECOGNITION = 6; 2971 VOICE_COMMUNICATION = 7; 2972 REMOTE_SUBMIX = 8; 2973 UNPROCESSED = 9; 2974 VOICE_PERFORMANCE = 10; 2975 ECHO_REFERENCE = 1997; 2976 FM_TUNER = 1998; 2977 HOTWORD = 1999; 2978 ULTRASOUND = 2000; 2979} 2980 2981enum AudioScreenFoldingState { 2982 UNKNOWN_FOLDING_STATE = 0; 2983 CLAMSHELL = 1; 2984 CLOSED = 2; 2985 OPEN = 3; 2986} 2987 2988/* 2989 * A message containing recording usage event. 2990 * Logged from: 2991 * vendor/google/whitechapel/audio/hal/aidl/audio/metric/suez_data_adapter/statsd_suez_data_adapter.cc 2992 * 2993 * Estimated Logging Rate: Any time during audio recording that screen_orientation / audio device / use case changes. 2994 * It will be aggregated in a count and value metric to keep the resource usage low. 2995 */ 2996message VendorAudioDspRecordUsageStatsReported { 2997 /* Vendor reverse domain name */ 2998 optional string reverse_domain_name = 1; 2999 3000 enum Type { 3001 UNKNOWN = 0; 3002 UC_AUDIO_RECORD = 1; 3003 UC_LOW_LATENCY_AUDIO_RECORD = 2; 3004 UC_MMAP_RECORD = 3; 3005 IN_HANDSET_MIC = 4; 3006 IN_HANDSET_DUAL_MIC = 5; 3007 IN_HANDSET_TRIPLE_MIC = 6; 3008 IN_CAMCORDER_LANDSCAPE = 7; 3009 IN_CAMCORDER_INVERT_LANDSCAPE = 8; 3010 IN_CAMCORDER_PORTRAIT = 9; 3011 IN_CAMCORDER_SELFIE_LANDSCAPE = 10; 3012 IN_CAMCORDER_SELFIE_INVERT_LANDSCAPE = 11; 3013 IN_CAMCORDER_SELFIE_PORTRAIT = 12; 3014 IN_CAMCORDER_MIC = 13; 3015 IN_CAMCORDER_TIRPLE_MIC = 14; 3016 CUSTOM_IN_PCM1 = 15; 3017 CUSTOM_IN_PCM2 = 16; 3018 CUSTOM_IN_PCM3 = 17; 3019 CUSTOM_IN_PCM4 = 18; 3020 CUSTOM_IN_PCM5 = 19; 3021 } 3022 3023 enum CameraType { 3024 UNKNOWN_CAMERA_TYPE = 0; 3025 FRONT_CAMERA = 1; 3026 BACK_CAMERA = 2; 3027 } 3028 3029 /* Type of Backend used in recording */ 3030 optional Type type = 2 [deprecated = true]; 3031 3032 /* Duration in second */ 3033 optional int32 duration_second = 3; 3034 3035 optional AudioSource audio_source = 4; 3036 3037 /* Device interface used */ 3038 optional AudioDeviceInterface audio_device_interface = 5; 3039 3040 /* Usecase used */ 3041 optional AudioUseCase vendor_audio_use_case = 6; 3042 3043 /* Camera Type */ 3044 optional CameraType camera_type = 7; 3045 3046 /* Screen orientation used. */ 3047 optional int32 screen_orientation = 8; 3048 3049 /* True if this atom represent the beginning of recording. If usecase/interfaces/orientation 3050 * changes mid-recording, new atom will be uploaded but this value will be false. 3051 */ 3052 optional bool is_beginning_of_recording = 9; 3053 3054 /* Folding state of the phone */ 3055 optional AudioScreenFoldingState audio_screen_folding_state = 10; 3056 3057 /* Device screen is on or off */ 3058 optional bool is_screen_on = 11; 3059}; 3060 3061/* 3062 * Logs the audio media playback usage stats. 3063 * Logged from: 3064 * vendor/google/whitechapel/audio/hal/aidl/audio/metric/suez_data_adapter/statsd_suez_data_adapter.cc 3065 * 3066 * Estimated Logging Rate: Any time during audia media playback that screen_orientation / audio device / use case changes. 3067 * It will be aggregated in a count and value metric to keep the resource usage low. 3068 */ 3069message MediaPlaybackUsageStatsReported { 3070 /* Vendor reverse domain name */ 3071 optional string reverse_domain_name = 1; 3072 3073 /* Device interface used */ 3074 optional AudioDeviceInterface interface = 2; 3075 3076 /* AudioSource used */ 3077 optional AudioSource audio_source = 3; 3078 3079 /* Usecase used */ 3080 optional AudioUseCase audio_use_case = 4; 3081 3082 /* Screen orientation used. */ 3083 optional int32 screen_orientation = 5; 3084 3085 /* True if this atom represent the end of playback. If usecase/interfaces/orientation 3086 * changes mid-playback, new atom will be uploaded but this value will be false. 3087 */ 3088 optional bool is_end_of_playback = 6; 3089 3090 /* Duration in second */ 3091 optional int32 duration_second = 7; 3092 3093 /* Folding state of the phone */ 3094 optional AudioScreenFoldingState audio_screen_folding_state = 8; 3095 3096 /* Device screen is on or off */ 3097 optional bool is_screen_on = 9; 3098 3099 /* Volume of the playback */ 3100 optional float volume = 10; 3101 3102 /* Average power in milliwatts. -1 if unavailable. */ 3103 optional float average_power = 11; 3104} 3105 3106/* 3107 * Logs the call usage information stats. 3108 * Logged from: 3109 * vendor/google/whitechapel/audio/hal/aidl/audio/metric/suez_data_adapter/statsd_suez_data_adapter.cc 3110 * 3111 * Estimated Logging Rate: Every 24 hours round to nearest 5 minutes 3112 */ 3113message CallUsageStatsReported { 3114 /* Vendor reverse domain name */ 3115 optional string reverse_domain_name = 1; 3116 3117 /* Device interface used */ 3118 optional AudioDeviceInterface downlink_interface = 2; 3119 3120 /* AudioSource used */ 3121 optional AudioSource downlink_audio_source = 3; 3122 3123 /* Usecase used */ 3124 optional AudioUseCase downlink_audio_use_case = 4; 3125 3126 /* Device interface used */ 3127 optional AudioDeviceInterface uplink_interface = 5; 3128 3129 /* AudioSource used */ 3130 optional AudioSource uplink_audio_source = 6; 3131 3132 /* Usecase used */ 3133 optional AudioUseCase uplink_audio_use_case = 7; 3134 3135 /* Number of call in the past 24 hours */ 3136 optional int32 call_count = 8; 3137 3138 /* Duration in second (value is round to 5 minutes) */ 3139 optional int32 duration_second = 9; 3140 3141 /* Current volume for the downlink playback */ 3142 optional float volume = 10; 3143 3144 /* Average power in milliwatts. -1 if unavailable. */ 3145 optional float average_power = 11; 3146 3147 /* background noise level from 1 (lowest) to 12 (highest). */ 3148 optional float noise_level = 12; 3149} 3150 3151/* 3152 * A message containing USB audio connection error event. 3153 * Logged from: 3154 * vendor/google/whitechapel/audio/hal/aidl/audio/metric/suez_data_adapter/statsd_suez_data_adapter.cc 3155 * 3156 * Estimated Logging Rate: Very low, around once a month per user. 3157 */ 3158message VendorAudioUsbConnectionState { 3159 /* Vendor reverse domain name */ 3160 optional string reverse_domain_name = 1; 3161 3162 enum ConnectionState { 3163 UNKNOWN_CONNECTION_STATE = 0; 3164 FAILED_TO_READ_CARD_ID_PCM_ID = 1; 3165 FAILED_TO_READ_USB_ID = 2; 3166 FAILED_TO_READ_BUS_ID_DEVICE_ID = 3; 3167 FAILED_TO_ADD_NEW_DEVICE = 4; 3168 FAILED_TO_PARSE_USB_CAPABILITY = 5; 3169 FAILED_TO_PARSE_USB_CAPABILITY_IS_EMPTY = 6; 3170 FAILED_TO_ADD_NEW_DEVICE_CAPABILITY = 7; 3171 FAILED_TO_ADD_ALREADY_CONNECTED_PORT_ID = 8; 3172 CONNECTION_SUCCESS = 9; 3173 } 3174 3175 enum DisconnectionState { 3176 UNKNOWN_DISCONNECTION_STATE = 0; 3177 FAILED_PORT_ID_NOT_CONNECTED = 1; 3178 DISCONNECTION_SUCCESS = 2; 3179 } 3180 3181 /* Connection State. UNKNOWN_CONNECTION_STATE in disconnection event. */ 3182 optional ConnectionState connection_error = 2; 3183 3184 /* Disconnection State. UNKNOWN_DISCONNECTION_STATE in connection event. */ 3185 optional DisconnectionState disconnection_error = 3; 3186}; 3187 3188/* 3189 * Logs the Audio Speaker Power information stats. 3190 * Logged from: 3191 * vendor/google/whitechapel/audio/hal/aidl/audio/metric/suez_data_adapter/statsd_suez_data_adapter.cc 3192 * 3193 * Estimated Logging Rate: Once per audio playback through speaker. 3194 */ 3195message VendorAudioSpeakerPowerStatsReported { 3196 /* Vendor reverse domain name */ 3197 optional string reverse_domain_name = 1; 3198 /* The average power of the speaker. i-th value represent i-th speaker. There are at most 4 speakers. */ 3199 repeated float average_power = 2; 3200 /* Duration in second that speaker is using the average power. i-th value represent i-th speaker. There are at most 4 speakers. */ 3201 repeated int32 duration_second = 3; 3202} 3203 3204/* 3205 * A message containing how many sectors read from 3206 * the dm verity protected partitions 3207 */ 3208message DmVerityPartitionReadAmountReported { 3209 enum DmPartition { 3210 SYSTEM = 0; 3211 SYSTEM_EXT = 1; 3212 PRODUCT = 2; 3213 VENDOR = 3; 3214 ODM = 4; 3215 UNKNOWN = 5; 3216 } 3217 /* Vendor reverse domain name */ 3218 optional string reverse_domain_name = 1; 3219 /* Identifies the dm-verity protected partition accessed. */ 3220 optional DmPartition dm_partition = 2; 3221 /* Number of sectors read from the dm-verity protected partition. */ 3222 optional int64 read_sectors = 3; 3223} 3224 3225/* 3226 * Event showing the state of the sensor when a Water Intrusion Event occurs 3227 */ 3228message WaterEventReported { 3229 enum FuseState { 3230 FUSE_STATE_UNKNOWN = 0; 3231 INTACT = 1; /* fuse has not blown */ 3232 BLOWN = 2; /* fuse has blown */ 3233 } 3234 enum EventPoint { 3235 EVENT_POINT_UNKNOWN = 0; 3236 BOOT = 1; 3237 IRQ = 2; 3238 } 3239 enum SensorState { 3240 SENSOR_STATE_UNKNOWN = 0; 3241 WET = 1; 3242 DRY = 2; 3243 INVALID = 3; 3244 DISABLED = 4; 3245 } 3246 3247 enum CircuitState { 3248 CIRCUIT_ENABLED_UNKNOWN = 0; 3249 CIRCUIT_ENABLED = 1; 3250 CIRCUIT_DISABLED = 2; 3251 } 3252 /* Vendor reverse domain name */ 3253 optional string reverse_domain_name = 1; 3254 /* 3255 * Event details 3256 */ 3257 /* The lifecycle point at which event was collected */ 3258 optional EventPoint collection_event = 13; 3259 3260 /* state of the intrusion detection fuse */ 3261 optional FuseState fuse_state = 2; 3262 /* Was the fuse enabled */ 3263 optional CircuitState fuse_enabled = 3; 3264 3265 /* The state of the reference sensor. */ 3266 optional SensorState reference_state = 4; 3267 /* The threshold of the reference in mV. */ 3268 optional int32 reference_threshold = 8; 3269 3270 /* The state of sensor 0. */ 3271 optional SensorState sensor0_state = 5; 3272 /* The threshold of sensor 0 in mV. */ 3273 repeated int32 sensor0_threshold = 9; 3274 3275 /* The state of sensor 1. */ 3276 optional SensorState sensor1_state = 6; 3277 /* The threshold of sensor1 in mv. */ 3278 repeated int32 sensor1_threshold = 10; 3279 3280 /* The state of sensor 2. */ 3281 optional SensorState sensor2_state = 7; 3282 /* The threshold of the sensor 2 in mv. */ 3283 repeated int32 sensor2_threshold = 11; 3284 3285 /* Was system fault enabled */ 3286 optional CircuitState fault_enabled = 12; 3287} 3288