Heidi von Markham | 9ade83e | 2015-09-02 17:22:40 -0700 | [diff] [blame] | 1 | page.title=Measuring Power Values |
| 2 | @jd:body |
| 3 | |
| 4 | <!-- |
| 5 | Copyright 2015 The Android Open Source Project |
| 6 | |
| 7 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | you may not use this file except in compliance with the License. |
| 9 | You may obtain a copy of the License at |
| 10 | |
| 11 | http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | |
| 13 | Unless required by applicable law or agreed to in writing, software |
| 14 | distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | See the License for the specific language governing permissions and |
| 17 | limitations under the License. |
| 18 | --> |
| 19 | <div id="qv-wrapper"> |
| 20 | <div id="qv"> |
| 21 | <h2>In this document</h2> |
| 22 | <ol id="auto-toc"></ol> |
| 23 | </div> |
| 24 | </div> |
| 25 | |
| 26 | |
| 27 | <p>Device manufacturers must provide a component power profile in |
| 28 | <code>/frameworks/base/core/res/res/xml/power_profile.xml</code>.</p> |
| 29 | |
| 30 | <p>To determine values for power profiles, use hardware that measures the power |
| 31 | being used by the device and perform the various operations for which |
| 32 | information is needed. Measure the power use during those operations and compute |
| 33 | the values (deriving differences from other baseline power uses as appropriate). |
| 34 | </p> |
| 35 | |
Heidi von Markham | bfadf22 | 2015-09-09 16:18:44 -0700 | [diff] [blame] | 36 | <h2 id="multiple-cpus">Devices with heterogeneous CPUs</h2> |
| 37 | |
| 38 | <p>The power profile for devices with CPU cores of heterogeneous architecture |
| 39 | must include the following additional fields: |
| 40 | <ul> |
| 41 | <li>Number of total CPUs for each cluster.</li> |
| 42 | <li>CPU speeds supported by each cluster.</li> |
| 43 | </ul> |
| 44 | |
| 45 | <p>To differentiate between active CPUs and supported CPU speeds for each |
| 46 | cluster, append the cluster number to the name of the array. Example:</p> |
| 47 | |
| 48 | <pre> |
| 49 | <array name="cpu.active.cluster0"> |
| 50 | <value>200</value> |
| 51 | <value>300</value> |
| 52 | <value>400</value> |
| 53 | </array> |
| 54 | <array name="cpu.speeds.cluster0"> |
| 55 | <value>600000</value> |
| 56 | <value>800000</value> |
| 57 | <value>1200000</value> |
| 58 | </array> |
| 59 | |
| 60 | <array name="cpu.active.cluster1"> |
| 61 | <value>400</value> |
| 62 | <value>500</value> |
| 63 | <value>600</value> |
| 64 | </array> |
| 65 | <array name="cpu.speeds.cluster1"> |
| 66 | <value>800000</value> |
| 67 | <value>1200000</value> |
| 68 | <value>1400000</value> |
| 69 | </array> |
| 70 | </pre> |
| 71 | |
Heidi von Markham | 9ade83e | 2015-09-02 17:22:40 -0700 | [diff] [blame] | 72 | <h2 id="values">Power values</h2> |
Heidi von Markham | bfadf22 | 2015-09-09 16:18:44 -0700 | [diff] [blame] | 73 | <p>The following table describes available power value settings. To view the |
| 74 | sample file in AOSP, see |
| 75 | <a href="https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/xml/power_profile.xml">power_profile.xml</a>.</p> |
Heidi von Markham | 9ade83e | 2015-09-02 17:22:40 -0700 | [diff] [blame] | 76 | |
| 77 | <table> |
| 78 | <tr> |
| 79 | <th>Name</th> |
| 80 | <th>Description</th> |
| 81 | <th>Example Value</th> |
| 82 | <th>Notes</th> |
| 83 | </tr> |
| 84 | <tr> |
| 85 | <td>none</td> |
| 86 | <td>Nothing</td> |
| 87 | <td>0</td> |
| 88 | <td></td> |
| 89 | </tr> |
| 90 | |
| 91 | <tr> |
| 92 | <td>screen.on</td> |
| 93 | <td>Additional power used when screen is turned on at minimum brightness.</td> |
| 94 | <td>200mA</td> |
| 95 | <td>Includes touch controller and display backlight. At 0 brightness, not the |
| 96 | Android minimum which tends to be 10 or 20%.</td> |
| 97 | </tr> |
| 98 | |
| 99 | <tr> |
| 100 | <td>screen.full</td> |
| 101 | <td>Additional power used when screen is at maximum brightness, compared to |
| 102 | screen at minimum brightness.</td> |
| 103 | <td>100mA-300mA</td> |
| 104 | <td>A fraction of this value (based on screen brightness) is added to the |
| 105 | screen.on value to compute the power usage of the screen.</td> |
| 106 | </tr> |
| 107 | |
| 108 | <tr> |
| 109 | <td>bluetooth.active</td> |
| 110 | <td>Additional power used when playing audio through Bluetooth A2DP.</td> |
| 111 | <td>14mA</td> |
| 112 | <td></td> |
| 113 | </tr> |
| 114 | |
| 115 | <tr> |
| 116 | <td>bluetooth.on</td> |
| 117 | <td>Additional power used when Bluetooth is turned on but idle.</td> |
| 118 | <td>1.4mA</td> |
| 119 | <td></td> |
| 120 | </tr> |
| 121 | |
| 122 | <tr> |
| 123 | <td>wifi.on</td> |
| 124 | <td>Additional power used when Wi-Fi is turned on but not receiving, |
| 125 | transmitting, or scanning.</td> |
| 126 | <td>2mA</td> |
| 127 | <td></td> |
| 128 | </tr> |
| 129 | |
| 130 | <tr> |
| 131 | <td>wifi.active</td> |
| 132 | <td>Additional power used when transmitting or receiving over Wi-Fi.</td> |
| 133 | <td>31mA</td> |
| 134 | <td></td> |
| 135 | </tr> |
| 136 | |
| 137 | <tr> |
| 138 | <td>wifi.scan</td> |
| 139 | <td>Additional power used when Wi-Fi is scanning for access points.</td> |
| 140 | <td>100mA</td> |
| 141 | <td></td> |
| 142 | </tr> |
| 143 | |
| 144 | <tr> |
| 145 | <td>dsp.audio</td> |
| 146 | <td>Additional power used when audio decoding/encoding via DSP.</td> |
| 147 | <td>14.1mA</td> |
| 148 | <td>Reserved for future use.</td> |
| 149 | </tr> |
| 150 | |
| 151 | |
| 152 | <tr> |
| 153 | <td>dsp.video</td> |
| 154 | <td>Additional power used when video decoding via DSP.</td> |
| 155 | <td>54mA</td> |
| 156 | <td>Reserved for future use.</td> |
| 157 | </tr> |
| 158 | |
| 159 | <tr> |
| 160 | <td>camera.avg</td> |
| 161 | <td>Average power use by the camera subsystem for a typical camera |
| 162 | application.</td> |
| 163 | <td>600mA</td> |
| 164 | <td>Intended as a rough estimate for an application running a preview |
| 165 | and capturing approximately 10 full-resolution pictures per minute.</td> |
| 166 | </tr> |
| 167 | |
| 168 | <tr> |
| 169 | <td>camera.flashlight</td> |
| 170 | <td>Average power used by the camera flash module when on.</td> |
| 171 | <td>200mA</td> |
| 172 | <td></td> |
| 173 | </tr> |
| 174 | |
| 175 | |
| 176 | <tr> |
| 177 | <td>gps.on</td> |
| 178 | <td>Additional power used when GPS is acquiring a signal.</td> |
| 179 | <td>50mA</td> |
| 180 | <td></td> |
| 181 | </tr> |
| 182 | |
| 183 | <tr> |
| 184 | <td>radio.active</td> |
| 185 | <td>Additional power used when cellular radio is transmitting/receiving.</td> |
| 186 | <td>100mA-300mA</td> |
| 187 | <td></td> |
| 188 | </tr> |
| 189 | |
| 190 | <tr> |
| 191 | <td>radio.scanning</td> |
| 192 | <td>Additional power used when cellular radio is paging the tower.</td> |
| 193 | <td>1.2mA</td> |
| 194 | <td></td> |
| 195 | </tr> |
| 196 | |
| 197 | <tr> |
| 198 | <td>radio.on</td> |
| 199 | <td>Additional power used when the cellular radio is on. Multi-value entry, |
| 200 | one per signal strength (no signal, weak, moderate, strong).</td> |
| 201 | <td>1.2mA</td> |
| 202 | <td>Some radios boost power when they search for a cell tower and do not |
| 203 | detect a signal. Values can be the same or decrease with increasing signal |
| 204 | strength. If you provide only one value, the same value is used for all |
| 205 | strengths. If you provide two values, the first is used for no-signal, the |
| 206 | second value is used for all other strengths, and so on.</td> |
| 207 | </tr> |
| 208 | |
| 209 | <tr> |
| 210 | <td>cpu.speeds</td> |
| 211 | <td>Multi-value entry that lists each possible CPU speed in KHz.</td> |
| 212 | <td>125000KHz, 250000KHz, 500000KHz, 1000000KHz, 1500000KHz</td> |
| 213 | <td>The number and order of entries must correspond to the mA entries in |
| 214 | cpu.active.</td> |
| 215 | </tr> |
| 216 | |
| 217 | <tr> |
| 218 | <td>cpu.idle</td> |
| 219 | <td>Total power drawn by the system when CPUs (and the SoC) are in system |
| 220 | suspend state.</td> |
| 221 | <td>3mA</td> |
| 222 | <td></td> |
| 223 | </tr> |
| 224 | |
| 225 | <tr> |
| 226 | <td>cpu.awake</td> |
| 227 | <td>Additional power used when CPUs are in scheduling idle state |
| 228 | (kernel idle loop); system is not in system suspend state.</td> |
| 229 | <td>50mA</td> |
| 230 | <td>Your platform might have more than one idle state in use with differing |
| 231 | levels of power consumption; choose a representative idle state for longer |
| 232 | periods of scheduler idle (several milliseconds). Examine the power graph on |
| 233 | your measurement equipment and choose samples where the CPU is at its lowest |
| 234 | consumption, discarding higher samples where the CPU exited idle.</td> |
| 235 | </tr> |
| 236 | |
| 237 | <tr> |
| 238 | <td>cpu.active</td> |
| 239 | <td>Additional power used by CPUs when running at different speeds.</td> |
| 240 | <td>100mA, 120mA, 140mA, 160mA, 200mA</td> |
Heidi von Markham | 516e6dd | 2015-11-04 12:03:32 -0800 | [diff] [blame^] | 241 | <td>Value represents the power used by the CPU rails when running at different |
| 242 | speeds. Set the max speed in the kernel to each of the allowed speeds and peg |
| 243 | the CPU at that speed. The number and order of entries correspond to the |
| 244 | number and order of entries in cpu.speeds.</td> |
Heidi von Markham | 9ade83e | 2015-09-02 17:22:40 -0700 | [diff] [blame] | 245 | </tr> |
| 246 | |
| 247 | <tr> |
Heidi von Markham | bfadf22 | 2015-09-09 16:18:44 -0700 | [diff] [blame] | 248 | <td>cpu.clusters.cores</td> |
| 249 | <td>Number of cores each CPU cluster contains.</td> |
| 250 | <td>4, 2</td> |
| 251 | <td>Required only for devices with <a href="#multiple-cpus">heterogeneous CPU |
| 252 | architectures</a>. Number of entries and order should match the number of |
| 253 | cluster entries for the cpu.active and cpu.speeds. The first entry represents |
| 254 | the number of CPU cores in cluster0, the second entry represents the number of |
| 255 | CPU cores in cluster1, and so on.</td> |
| 256 | </tr> |
| 257 | |
| 258 | <tr> |
Heidi von Markham | 9ade83e | 2015-09-02 17:22:40 -0700 | [diff] [blame] | 259 | <td>battery.capacity</td> |
| 260 | <td>Total battery capacity in mAh.</td> |
| 261 | <td>3000mAh</td> |
| 262 | <td></td> |
| 263 | </tr> |
Heidi von Markham | bfadf22 | 2015-09-09 16:18:44 -0700 | [diff] [blame] | 264 | </table> |