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 java_package = "android.hardware.google.pixel"; 23option java_outer_classname = "PixelAtoms"; 24 25/* 26 * Please note that the following features are not currently supported by 27 * the IStats->reportVendorAtom implementation: 28 * - types outside of int, long, float, and string (ex. uint) 29 * - submessages within an atom 30 * - repeated fields - arrays must be unrolled 31 * - field # 1 - this will be occupied by the vendor namespace 32 */ 33 34/* Allocated atom IDs. */ 35message Atom { 36 oneof pushed { 37 // AOSP atom ID range starts at 105000 38 ChargeStats charge_stats = 105000; 39 VoltageTierStats voltage_tier_stats = 105001; 40 BatteryCapacity battery_capacity = 105002; 41 StorageUfsHealth storage_ufs_health = 105003; 42 F2fsStatsInfo f2fs_stats = 105004; 43 ZramMmStat zram_mm_stat = 105005; 44 ZramBdStat zram_bd_stat = 105006; 45 BootStatsInfo boot_stats = 105007; 46 WirelessChargingStats wireless_charging_stats = 105008; 47 DeviceOrientation device_orientation = 105009; 48 BatteryCapacityFG fg_capacity = 105010; 49 PdVidPid pd_vid_pid = 105011; 50 BatteryEEPROM battery_eeprom = 105012; 51 VendorSpeakerImpedance vendor_speaker_impedance = 105013; // moved from atoms.proto 52 StorageUfsResetCount ufs_reset_count = 105014; 53 PixelMmMetricsPerHour pixel_mm_metrics_per_hour = 105015; 54 PixelMmMetricsPerDay pixel_mm_metrics_per_day = 105016; 55 F2fsCompressionInfo f2fs_compression_info = 105017; 56 VendorChargeCycles vendor_charge_cycles = 105018; // moved from atoms.proto 57 VendorHardwareFailed vendor_hardware_failed = 105019; // moved from atoms.proto 58 VendorSlowIo vendor_slow_io = 105020; // moved from atoms.proto 59 VendorSpeechDspStat vendor_speech_dsp_stat = 105021; // moved from atoms.proto 60 VendorPhysicalDropDetected vendor_physical_drop_detected = 105022; // moved from atoms.proto 61 VendorUsbPortOverheat vendor_usb_port_overheat = 105023; // moved from atoms.proto 62 CmaStatus cma_status = 105024; 63 CmaStatusExt cma_status_ext = 105025; 64 VendorBatteryHealthSnapshot vendor_battery_health_snapshot = 105026; // moved from atoms.proto 65 VendorBatteryCausedShutdown vendor_battery_caused_shutdown = 105027; // moved from atoms.proto 66 F2fsGcSegmentInfo f2fs_gc_segment_info = 105028; 67 PowerMitigationStats mitigation_stats = 105029; // moved from atoms.proto 68 69 CitadelVersion citadel_version = 100018; // moved from vendor proprietary 70 CitadelEvent citadel_event = 100019; // moved from vendor proprietary 71 } 72 // AOSP atom ID range ends at 109999 73} 74 75/* Supported reverse domain names. */ 76message ReverseDomainNames { 77 optional string pixel = 1 [default = "com.google.pixel"]; 78} 79 80/* A message containing detailed statistics and debug information about a charge session. */ 81message ChargeStats { 82 /* Charge Adapter stats. */ 83 enum AdapterType { 84 ADAPTER_TYPE_UNKNOWN = 0; 85 ADAPTER_TYPE_USB = 1; 86 ADAPTER_TYPE_USB_SDP = 2; 87 ADAPTER_TYPE_USB_DCP = 3; 88 ADAPTER_TYPE_USB_CDP = 4; 89 ADAPTER_TYPE_USB_ACA = 5; 90 ADAPTER_TYPE_USB_C = 6; 91 ADAPTER_TYPE_USB_PD = 7; 92 ADAPTER_TYPE_USB_PD_DRP = 8; 93 ADAPTER_TYPE_USB_PD_PPS = 9; 94 ADAPTER_TYPE_USB_PD_BRICKID = 10; 95 ADAPTER_TYPE_HVDCP = 11; 96 ADAPTER_TYPE_HVDCP3 = 12; 97 ADAPTER_TYPE_FLOAT = 13; 98 ADAPTER_TYPE_WLC = 14; 99 ADAPTER_TYPE_WLC_EPP = 15; 100 ADAPTER_TYPE_WLC_SPP = 16; 101 ADAPTER_TYPE_GPP = 17; 102 ADAPTER_TYPE_10W = 18; 103 ADAPTER_TYPE_L7 = 19; 104 ADAPTER_TYPE_DL = 20; 105 ADAPTER_TYPE_WPC_EPP = 21; 106 ADAPTER_TYPE_WPC_GPP = 22; 107 ADAPTER_TYPE_WPC_10W = 23; 108 ADAPTER_TYPE_WPC_BPP = 24; 109 ADAPTER_TYPE_WPC_L7 = 25; 110 } 111 optional string reverse_domain_name = 1; 112 /* Type of charge adapter, enumerated above. */ 113 optional AdapterType adapter_type = 2; 114 /* Max negotiated voltage by charge adapter, in mV. */ 115 optional int32 adapter_voltage = 3; 116 /* Max negotiated current by charge adapter current, in mA. */ 117 optional int32 adapter_amperage = 4; 118 119 /* Stats at beginning of charge session. */ 120 /* System State of Charge, in percent. */ 121 optional int32 ssoc_in = 5; 122 /* Voltage in mV. */ 123 optional int32 voltage_in = 6; 124 125 /* Stats at end of charge session. */ 126 /* System State of Charge, in percent. */ 127 optional int32 ssoc_out = 7; 128 /* Voltage in mV. */ 129 optional int32 voltage_out = 8; 130 131 /** 132 * These values are meant to represent status of the charging device, used 133 * to validate the charging algorithm and explain charging performances. 134 * Examples of the content of the register: 135 * - APDO, PDO (power capabilities of the device, eg. 5V3A, 9V2A, 20V2A) for wired charging 136 * - Wireless charging MFG code. This is the value of a register of the WLC integrated 137 * circuit to identify the vendor and type of WLC pad 138 * - Receiver operating frequency 139 * - Register status 140 */ 141 optional int32 adapter_capabilities0 = 9; 142 optional int32 adapter_capabilities1 = 10; 143 optional int32 adapter_capabilities2 = 11; 144 optional int32 adapter_capabilities3 = 12; 145 optional int32 adapter_capabilities4 = 13; 146 147 /** 148 * These are values which reports the state of the wireless receiver, which will help in 149 * debugging charging issues and alternate configurations. 150 */ 151 optional int32 receiver_state0 = 14; 152 optional int32 receiver_state1 = 15; 153} 154 155/* A message containing stats from each charge voltage tier. */ 156message VoltageTierStats { 157 optional string reverse_domain_name = 1; 158 /* Voltage tier number, custom to implementation, should be <= 3. */ 159 optional int32 voltage_tier = 2; 160 161 /* Stats when entering voltage tier. */ 162 /* State of charge, in percent. */ 163 optional float soc_in = 3; 164 /* Coulomb count, in mAh. */ 165 optional int32 cc_in = 4; 166 /* Battery temperature, in deciC. */ 167 optional int32 temp_in = 5; 168 169 /* Time spent at various charge speeds, in seconds. */ 170 optional int32 time_fast_secs = 6; 171 optional int32 time_taper_secs = 7; 172 optional int32 time_other_secs = 8; 173 174 /* Battery temperature stats, in deciC. */ 175 optional int32 temp_min = 9; 176 optional int32 temp_avg = 10; 177 optional int32 temp_max = 11; 178 179 /* Battery current stats, in mA. */ 180 optional int32 ibatt_min = 12; 181 optional int32 ibatt_avg = 13; 182 optional int32 ibatt_max = 14; 183 184 /* Input current limit stats, in mA. */ 185 optional int32 icl_min = 15; 186 optional int32 icl_avg = 16; 187 optional int32 icl_max = 17; 188 189 /** 190 * Efficiency number, receiver operating frequency in kHz for wireless charging 191 * (alignment) 192 */ 193 optional int32 charging_operating_point = 18; 194 /* The minimum power out of the adapter at the given charging tier */ 195 optional int32 min_adapter_power_out = 19; 196 /* The time-averaged power out of the adapter at the given charging tier */ 197 optional int32 time_avg_adapter_power_out = 20; 198 /* The maximum power out of the adapter at the given charging tier */ 199 optional int32 max_adapter_power_out = 21; 200} 201 202/* A message containing an alternate proprietary full battery capacity estimate. */ 203message BatteryCapacity { 204 optional string reverse_domain_name = 1; 205 /* Sum of the change in coulomb count. */ 206 optional int32 delta_cc_sum = 2; 207 /* Sum of the change in state of charge (battery level). */ 208 optional int32 delta_vfsoc_sum = 3; 209} 210 211/* A message containing health values of UFS */ 212message StorageUfsHealth { 213 optional string reverse_domain_name = 1; 214 /* The value of lifetimeA for UFS health */ 215 optional int32 lifetime_a = 2; 216 /* The value of lifetimeB for UFS health */ 217 optional int32 lifetime_b = 3; 218 /* The value of lifetimeC for UFS health */ 219 optional int32 lifetime_c = 4; 220} 221 222/* A message containing filesystem stats of F2FS */ 223message F2fsStatsInfo { 224 optional string reverse_domain_name = 1; 225 /* The value of dirty segments of f2fs */ 226 optional int32 dirty_segments = 2; 227 /* The value of free segments of f2fs */ 228 optional int32 free_segments = 3; 229 /* The times of checkpoint function called in foreground*/ 230 optional int32 cp_calls_fg = 4; 231 /* The times of checkpoint function called in background */ 232 optional int32 cp_calls_bg = 5; 233 /* The times of garbage collection function called in foreground */ 234 optional int32 gc_calls_fg = 6; 235 /* The times of garbage collection function called in background */ 236 optional int32 gc_calls_bg = 7; 237 /* The amount of blocks been moved by garbage collection in foreground */ 238 optional int32 moved_blocks_fg = 8; 239 /* The amount of blocks been moved by garbage collection in background */ 240 optional int32 moved_blocks_bg = 9; 241 /* The average of how many valid blocks is in a segment */ 242 optional int32 valid_blocks = 10; 243} 244 245message ZramMmStat { 246 optional string reverse_domain_name = 1; 247 /* The value of original memory size */ 248 optional int64 orig_data_size = 2; 249 /* The value of compressed memory size */ 250 optional int64 compr_data_size = 3; 251 /* The value of consumed memory size to store compressed memory */ 252 optional int64 mem_used_total = 4; 253 /* The value of number of page filled with same elements data */ 254 optional int64 same_pages = 5; 255 /* The value of number of incompressible page */ 256 optional int64 huge_pages = 6; 257 /* The value of number of incompressible pages since boot */ 258 optional int64 huge_pages_since_boot = 7; 259} 260 261message ZramBdStat { 262 optional string reverse_domain_name = 1; 263 /* the number of pages in backing device */ 264 optional int64 bd_count = 2; 265 /* The number of pages readed from backing device */ 266 optional int64 bd_reads = 3; 267 /* The number of pages written to backing device */ 268 optional int64 bd_writes = 4; 269} 270 271/* A message containing boot times */ 272message BootStatsInfo { 273 optional string reverse_domain_name = 1; 274 /* The F2FS fsck time in secs */ 275 optional int32 fsck_time_sec = 2; 276 /* The F2FS mounted time in secs */ 277 optional int32 mounted_time_sec = 3; 278 /* The F2FS checkpoint=disable time in secs */ 279 optional int32 checkpoint_time_sec = 4; 280} 281 282/* A message containing wireless charging health info. */ 283message WirelessChargingStats { 284 /* Captures if a google charger used when start wireless charging */ 285 enum ChargerVendor { 286 VENDOR_UNKNOWN = 0; 287 VENDOR_GOOGLE = 1; 288 } 289 290 optional string reverse_domain_name = 1; 291 optional ChargerVendor charger_vendor = 2; 292} 293 294/* Current device Orientation */ 295message DeviceOrientation { 296 enum Orientation { 297 ORIENTATION_UNKNOWN = 0; 298 ORIENTATION_0 = 1; 299 ORIENTATION_90 = 2; 300 ORIENTATION_180 = 3; 301 ORIENTATION_270 = 4; 302 } 303 304 optional string reverse_domain_name = 1; 305 /* Device orientation. */ 306 optional Orientation orientation = 2; 307} 308 309/* Raw battery capacity stats */ 310message BatteryCapacityFG { 311 enum LogReason { 312 LOG_REASON_UNKNOWN = 0; 313 LOG_REASON_CONNECTED = 1; 314 LOG_REASON_DISCONNECTED = 2; 315 LOG_REASON_FULL_CHARGE = 3; 316 LOG_REASON_PERCENT_SKIP = 4; 317 LOG_REASON_DIVERGING_FG = 5; 318 } 319 320 optional string reverse_domain_name = 1; 321 /* Uevent logging reason, enumerated above. */ 322 optional LogReason capacity_log_reason = 2; 323 324 /* The battery capacity reported from the FG (fuel gauge) hardware */ 325 optional float capacity_gdf = 3; 326 /* The filtered system battery capacity reported to the UI */ 327 optional float capacity_ssoc = 4; 328 /* The fuel gauge capacity curve midpoint FG (fuel gauge) value */ 329 optional float capacity_gdf_curve = 5; 330 /* The fuel gauge capacity curve midpoint UI value */ 331 optional float capacity_ssoc_curve = 6; 332} 333 334message PdVidPid { 335 optional string reverse_domain_name = 1; 336 /* Vendor ID of wired charger */ 337 optional int32 vid = 2; 338 /* Product ID of wired charger */ 339 optional int32 pid = 3; 340} 341 342message BatteryEEPROM { 343 optional string reverse_domain_name = 1; 344 /* The cycle count number; record of charge/discharge times */ 345 optional int32 cycle_cnt = 2; 346 /* The current full capacity of the battery under nominal conditions */ 347 optional int32 full_cap = 3; 348 /* The battery equivalent series resistance */ 349 optional int32 esr = 4; 350 /* Battery resistance related to temperature change */ 351 optional int32 rslow = 5; 352 /* Battery health indicator reflecting the battery age state */ 353 optional int32 soh = 6; 354 /* The battery temperature */ 355 optional int32 batt_temp = 7; 356 357 /* Battery state of charge (SOC) shutdown point */ 358 optional int32 cutoff_soc = 8; 359 /* Raw battery state of charge (SOC), based on battery current (CC = Coulomb Counter) */ 360 optional int32 cc_soc = 9; 361 /* Estimated battery state of charge (SOC) from batt_soc with endpoint limiting (0% and 100%) */ 362 optional int32 sys_soc = 10; 363 /* Filtered monotonic SOC, handles situations where the cutoff_soc is increased and 364 * then decreased from the battery physical properties 365 */ 366 optional int32 msoc = 11; 367 /* Estimated SOC derived from cc_soc that provides voltage loop feedback correction using 368 * battery voltage, current, and status values 369 */ 370 optional int32 batt_soc = 12; 371 372 /* Field used for data padding in the EEPROM data */ 373 optional int32 reserve = 13; 374 375 /* The maximum battery temperature ever seen */ 376 optional int32 max_temp = 14; 377 /* The minimum battery temperature ever seen */ 378 optional int32 min_temp = 15; 379 /* The maximum battery voltage ever seen */ 380 optional int32 max_vbatt = 16; 381 /* The minimum battery voltage ever seen */ 382 optional int32 min_vbatt = 17; 383 /* The maximum battery current ever seen */ 384 optional int32 max_ibatt = 18; 385 /* The minimum battery current ever seen */ 386 optional int32 min_ibatt = 19; 387 /* Field used to verify the integrity of the EEPROM data */ 388 optional int32 checksum = 20; 389} 390 391/* A message containing an exceptional event from citadel. */ 392message CitadelEvent { 393 enum Event { 394 ALERT = 1; 395 REBOOTED = 2; 396 UPGRADED = 3; 397 ALERT_V2 = 4; 398 }; 399 optional string reverse_domain_name = 1; 400 optional Event event = 2; 401 optional int32 reset_count = 3; 402 optional int64 uptime_micros = 4; 403 enum Priority { 404 LOW = 0; 405 MEDIUM = 1; 406 HIGH = 2; 407 }; 408 optional Priority priority = 5; 409 410 // ALERT-specific fields. These fields correspond to the interrupt status 411 // bits for alerts within citadel. When alerts fire one or more of these 412 // bits are set to indicate the alert source. 413 optional int32 intr_sts_0 = 6; 414 optional int32 intr_sts_1 = 7; 415 optional int32 intr_sts_2 = 8; 416 417 // REBOOTED-specific fields. These fields correspond to the details of how 418 // the hardware reboot occurred. A reboot is a noteworthy event for citadel, 419 // as it can be triggered by events like stack overflow or other software 420 // bugs. 421 optional int32 rstsrc = 9; 422 optional int32 exitpd = 10; 423 optional int32 which0 = 11; 424 optional int32 which1 = 12; 425 426 // UPGRADED-specific field. This field corresponds to the result of FW 427 // upgrade for citadel. 428 optional int32 upgrade_state = 13; 429 430 // ALERT_V2-specific field. This field corresponds to the GLOBALSEC Log 431 // which contains normal globalsec, camo, temp and buserr. 432 optional int32 alert_grp_0 = 14; 433 optional int32 alert_grp_1 = 15; 434 optional int32 alert_grp_2 = 16; 435 optional int32 alert_grp_3 = 17; 436 optional int32 camo_breaches_0 = 18; 437 optional int32 camo_breaches_1 = 19; 438 optional int32 temp_min = 20; 439 optional int32 temp_max = 21; 440 optional int32 bus_err = 22; 441} 442 443/* A message containing the citadel firmware version. */ 444message CitadelVersion { 445 optional string reverse_domain_name = 1; 446 optional string version = 2; 447} 448 449/* A message containing the speaker impedance. */ 450 message VendorSpeakerImpedance { 451 optional string reverse_domain_name = 1; 452 optional int32 speaker_location = 2; 453 optional int32 impedance = 3; 454} 455 456/* A message containing how many times of ufs host reset */ 457message StorageUfsResetCount { 458 optional string reverse_domain_name = 1; 459 /* How many UFS error reset are triggered */ 460 optional int32 host_reset_count = 2; 461} 462 463/* A message containing Pixel memory metrics collected hourly. */ 464message PixelMmMetricsPerHour { 465 optional string reverse_domain_name = 1; 466 optional int64 free_pages = 2; 467 optional int64 anon_pages = 3; 468 optional int64 file_pages = 4; 469 optional int64 slab_reclaimable = 5; 470 optional int64 zspages = 6; 471 optional int64 unevictable = 7; 472 optional int64 ion_total_pools = 8; 473 optional int64 gpu_memory = 9; 474} 475 476/* A message containing Pixel memory metrics collected daily. */ 477message PixelMmMetricsPerDay { 478 optional string reverse_domain_name = 1; 479 optional int64 workingset_refault = 2; 480 optional int64 pswpin = 3; 481 optional int64 pswpout = 4; 482 optional int64 allocstall_dma = 5; 483 optional int64 allocstall_dma32 = 6; 484 optional int64 allocstall_normal = 7; 485 optional int64 allocstall_movable = 8; 486 optional int64 pgalloc_dma = 9; 487 optional int64 pgalloc_dma32 = 10; 488 optional int64 pgalloc_normal = 11; 489 optional int64 pgalloc_movable = 12; 490 optional int64 pgsteal_kswapd = 13; 491 optional int64 pgsteal_direct = 14; 492 optional int64 pgscan_kswapd = 15; 493 optional int64 pgscan_direct = 16; 494 optional int64 oom_kill = 17; 495 optional int64 pgalloc_high = 18; 496 optional int64 pgcache_hit = 19; 497 optional int64 pgcache_miss = 20; 498 optional int64 kswapd_stime_clks = 21; 499 optional int64 kcompactd_stime_clks = 22; 500} 501 502/* A message containing CMA metrics collected from dogfooding only. */ 503message CmaStatus { 504 optional string reverse_domain_name = 1; 505 optional int32 type = 2; 506 optional int64 cma_alloc_pages_attempts = 3; 507 optional int64 cma_alloc_pages_soft_attempts = 4; 508 optional int64 cma_fail_pages = 5; 509 optional int64 cma_fail_soft_pages = 6; 510 optional int64 migrated_pages = 7; 511} 512 513/* A message containing CMA metrics (External). */ 514message CmaStatusExt { 515 optional string reverse_domain_name = 1; 516 optional int32 type = 2; 517 optional int64 cma_alloc_latency_low = 3; 518 optional int64 cma_alloc_latency_mid = 4; 519 optional int64 cma_alloc_latency_high = 5; 520} 521 522message F2fsCompressionInfo { 523 optional string reverse_domain_name = 1; 524 /* Show the block count written after compression since mount */ 525 optional int32 compr_written_blocks = 2; 526 /* Show the saved block count with compression since mount */ 527 optional int32 compr_saved_blocks = 3; 528 /* Show the count of inode newly enabled for compression since mount */ 529 optional int32 compr_new_inodes = 4; 530} 531 532/** 533 * Log bucketed battery charge cycles. 534 * 535 * Each bucket represents cycles of the battery past 536 * a given charge point. For example, bucket 1 is the 537 * lowest 1/8th of the battery, and bucket 8 is 100%. 538 * 539 * Logged from: 540 * /sys/class/power_supply/bms/cycle_count, via Vendor. 541 */ 542message VendorChargeCycles { 543 optional string reverse_domain_name = 1; 544 optional int32 cycle_bucket_1 = 2; 545 optional int32 cycle_bucket_2 = 3; 546 optional int32 cycle_bucket_3 = 4; 547 optional int32 cycle_bucket_4 = 5; 548 optional int32 cycle_bucket_5 = 6; 549 optional int32 cycle_bucket_6 = 7; 550 optional int32 cycle_bucket_7 = 8; 551 optional int32 cycle_bucket_8 = 9; 552 optional int32 cycle_bucket_9 = 10; 553 optional int32 cycle_bucket_10 = 11; 554} 555 556/** 557 * Logs the report of a failed hardware. 558 * 559 * Logged from: 560 * Vendor HALs. 561 * 562 */ 563message VendorHardwareFailed { 564 enum HardwareType { 565 HARDWARE_FAILED_UNKNOWN = 0; 566 HARDWARE_FAILED_MICROPHONE = 1; 567 HARDWARE_FAILED_CODEC = 2; 568 HARDWARE_FAILED_SPEAKER = 3; 569 HARDWARE_FAILED_FINGERPRINT = 4; 570 } 571 optional string reverse_domain_name = 1; 572 optional HardwareType hardware_type = 2; 573 574 /** 575 * hardware_location allows vendors to differentiate between multiple 576 * instances of the same hardware_type. The specific locations are vendor 577 * defined integers, referring to board-specific numbering schemes. 578 */ 579 optional int32 hardware_location = 3; 580 /** 581 * failure_code is specific to the HardwareType of the failed hardware. 582 * It should use one of the enum values defined below. 583 */ 584 enum HardwareErrorCode { 585 UNKNOWN = 0; 586 COMPLETE = 1; 587 SPEAKER_HIGH_Z = 2; 588 SPEAKER_SHORT = 3; 589 FINGERPRINT_SENSOR_BROKEN = 4; 590 FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5; 591 DEGRADE = 6; 592 } 593 optional int32 failure_code = 4; 594} 595 596/** 597 * Log slow I/O operations on the primary storage. 598 */ 599message VendorSlowIo { 600 // Classifications of IO Operations. 601 enum IoOperation { 602 UNKNOWN = 0; 603 READ = 1; 604 WRITE = 2; 605 UNMAP = 3; 606 SYNC = 4; 607 } 608 optional string reverse_domain_name = 1; 609 optional IoOperation operation = 2; 610 611 // The number of slow IO operations of this type over 24 hours. 612 optional int32 count = 3; 613} 614 615/* 616 * Logs the reported speech DSP status. 617 * Logged from: Vendor audio implementation. 618 */ 619message VendorSpeechDspStat { 620 optional string reverse_domain_name = 1; 621 // The total Speech DSP uptime in milliseconds. 622 optional int32 total_uptime_millis = 2; 623 // The total Speech DSP downtime in milliseconds. 624 optional int32 total_downtime_millis = 3; 625 optional int32 total_crash_count = 4; 626 optional int32 total_recover_count = 5; 627} 628 629/** 630 * Log an event when the device has been physically dropped. 631 * Reported from the /vendor partition. 632 */ 633message VendorPhysicalDropDetected { 634 optional string reverse_domain_name = 1; 635 // Confidence that the event was actually a drop, 0 -> 100 636 optional int32 confidence_pctg = 2; 637 // Peak acceleration of the drop, in 1/1000s of a g. 638 optional int32 accel_peak_thousandths_g = 3; 639 // Duration of freefall in ms 640 optional int32 freefall_time_millis = 4; 641} 642 643/** Represents USB port overheat event. */ 644message VendorUsbPortOverheat { 645 optional string reverse_domain_name = 1; 646 /* Temperature of USB port at USB plug event, in 1/10ths of degree C. */ 647 optional int32 plug_temperature_deci_c = 2; 648 /* Maximum temperature of USB port during overheat event, in 1/10ths of degree 649 * C. */ 650 optional int32 max_temperature_deci_c = 3; 651 /* Time between USB plug event and overheat threshold trip, in seconds. */ 652 optional int32 time_to_overheat_secs = 4; 653 /* Time between overheat threshold trip and hysteresis, in seconds. */ 654 optional int32 time_to_hysteresis_secs = 5; 655 /* Time between hysteresis and active mitigation ending, in seconds. */ 656 optional int32 time_to_inactive_secs = 6; 657} 658 659/** 660 * Log battery health snapshot. 661 * 662 * Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level 663 * are snapshotted periodically over 24hrs. 664 */ 665message VendorBatteryHealthSnapshot { 666 enum BatterySnapshotType { 667 BATTERY_SNAPSHOT_TYPE_UNKNOWN = 0; 668 BATTERY_SNAPSHOT_TYPE_MIN_TEMP = 1; // Snapshot at min batt temp over 24hrs. 669 BATTERY_SNAPSHOT_TYPE_MAX_TEMP = 2; // Snapshot at max batt temp over 24hrs. 670 BATTERY_SNAPSHOT_TYPE_MIN_RESISTANCE = 3; // Snapshot at min batt resistance over 24hrs. 671 BATTERY_SNAPSHOT_TYPE_MAX_RESISTANCE = 4; // Snapshot at max batt resistance over 24hrs. 672 BATTERY_SNAPSHOT_TYPE_MIN_VOLTAGE = 5; // Snapshot at min batt voltage over 24hrs. 673 BATTERY_SNAPSHOT_TYPE_MAX_VOLTAGE = 6; // Snapshot at max batt voltage over 24hrs. 674 BATTERY_SNAPSHOT_TYPE_MIN_CURRENT = 7; // Snapshot at min batt current over 24hrs. 675 BATTERY_SNAPSHOT_TYPE_MAX_CURRENT = 8; // Snapshot at max batt current over 24hrs. 676 BATTERY_SNAPSHOT_TYPE_MIN_BATT_LEVEL = 9; // Snapshot at min battery level (SoC) over 24hrs. 677 BATTERY_SNAPSHOT_TYPE_MAX_BATT_LEVEL = 10; // Snapshot at max battery level (SoC) over 24hrs. 678 BATTERY_SNAPSHOT_TYPE_AVG_RESISTANCE = 11; // Snapshot at average battery resistance over 24hrs. 679 } 680 optional string reverse_domain_name = 1; 681 optional BatterySnapshotType type = 2; 682 // Temperature, in 1/10ths of degree C. 683 optional int32 temperature_deci_celsius = 3; 684 // Voltage Battery Voltage, in microVolts. 685 optional int32 voltage_micro_volt = 4; 686 // Current Battery current, in microAmps. 687 optional int32 current_micro_amps = 5; 688 // OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts. 689 optional int32 open_circuit_micro_volt = 6; 690 // Resistance Battery Resistance, in microOhms. 691 optional int32 resistance_micro_ohm = 7; 692 // Level Battery Level, as % of full. 693 optional int32 level_percent = 8; 694} 695 696/** 697 * Log battery caused shutdown with the last recorded voltage. 698 */ 699message VendorBatteryCausedShutdown { 700 optional string reverse_domain_name = 1; 701 // The last recorded battery voltage prior to shutdown. 702 optional int32 last_recorded_micro_volt = 2; 703} 704 705/** 706 * Log mitigation statistics. 707 */ 708message PowerMitigationStats { 709 optional string reverse_domain_name = 1; 710 // The last triggered count: batoilo. 711 optional int32 batoilo_count = 2; 712 // The last triggered count: vdroop1. 713 optional int32 vdroop1_count = 3; 714 // The last triggered count: vdroop2. 715 optional int32 vdroop2_count = 4; 716 // The last triggered count: smpl_warn. 717 optional int32 smpl_warn_count = 5; 718 // The last triggered count: ocp_cpu1. 719 optional int32 ocp_cpu1_count = 6; 720 // The last triggered count: ocp_cpu2. 721 optional int32 ocp_cpu2_count = 7; 722 // The last triggered count: ocp_gpu. 723 optional int32 ocp_gpu_count = 8; 724 // The last triggered count: ocp_tpu. 725 optional int32 ocp_tpu_count = 9; 726 // The last triggered count: soft_ocp_cpu1. 727 optional int32 soft_ocp_cpu1_count = 10; 728 // The last triggered count: soft_ocp_cpu2. 729 optional int32 soft_ocp_cpu2_count = 11; 730 // The last triggered count: soft_ocp_gpu. 731 optional int32 soft_ocp_gpu_count = 12; 732 // The last triggered count: soft_ocp_tpu. 733 optional int32 soft_ocp_tpu_count = 13; 734 // The last triggered capacity: batoilo. 735 optional int32 batoilo_cap = 14; 736 // The last triggered capacity: vdroop1. 737 optional int32 vdroop1_cap = 15; 738 // The last triggered capacity: vdroop2. 739 optional int32 vdroop2_cap = 16; 740 // The last triggered capacity: smpl_warn. 741 optional int32 smpl_warn_cap = 17; 742 // The last triggered capacity: ocp_cpu1. 743 optional int32 ocp_cpu1_cap = 18; 744 // The last triggered capacity: ocp_cpu2. 745 optional int32 ocp_cpu2_cap = 19; 746 // The last triggered capacity: ocp_gpu. 747 optional int32 ocp_gpu_cap = 20; 748 // The last triggered capacity: ocp_tpu. 749 optional int32 ocp_tpu_cap = 21; 750 // The last triggered capacity: soft_ocp_cpu1. 751 optional int32 soft_ocp_cpu1_cap = 22; 752 // The last triggered capacity: soft_ocp_cpu2. 753 optional int32 soft_ocp_cpu2_cap = 23; 754 // The last triggered capacity: soft_ocp_gpu. 755 optional int32 soft_ocp_gpu_cap = 24; 756 // The last triggered capacity: soft_ocp_tpu. 757 optional int32 soft_ocp_tpu_cap = 25; 758} 759 760/** 761 * Log how many segments have been reclaimed in a specific GC mode. 762 */ 763message F2fsGcSegmentInfo { 764 optional string reverse_domain_name = 1; 765 /* Reclaimed segments in GC normal mode */ 766 optional int32 reclaimed_segments_normal = 2; 767 /* Reclaimed segments in GC urgent high mode */ 768 optional int32 reclaimed_segments_urgent_high = 3; 769 /* Reclaimed segments in GC urgent low mode */ 770 optional int32 reclaimed_segments_urgent_low = 4; 771} 772