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 | |
| 36 | <h2 id="values">Power values</h2> |
| 37 | |
| 38 | <table> |
| 39 | <tr> |
| 40 | <th>Name</th> |
| 41 | <th>Description</th> |
| 42 | <th>Example Value</th> |
| 43 | <th>Notes</th> |
| 44 | </tr> |
| 45 | <tr> |
| 46 | <td>none</td> |
| 47 | <td>Nothing</td> |
| 48 | <td>0</td> |
| 49 | <td></td> |
| 50 | </tr> |
| 51 | |
| 52 | <tr> |
| 53 | <td>screen.on</td> |
| 54 | <td>Additional power used when screen is turned on at minimum brightness.</td> |
| 55 | <td>200mA</td> |
| 56 | <td>Includes touch controller and display backlight. At 0 brightness, not the |
| 57 | Android minimum which tends to be 10 or 20%.</td> |
| 58 | </tr> |
| 59 | |
| 60 | <tr> |
| 61 | <td>screen.full</td> |
| 62 | <td>Additional power used when screen is at maximum brightness, compared to |
| 63 | screen at minimum brightness.</td> |
| 64 | <td>100mA-300mA</td> |
| 65 | <td>A fraction of this value (based on screen brightness) is added to the |
| 66 | screen.on value to compute the power usage of the screen.</td> |
| 67 | </tr> |
| 68 | |
| 69 | <tr> |
| 70 | <td>bluetooth.active</td> |
| 71 | <td>Additional power used when playing audio through Bluetooth A2DP.</td> |
| 72 | <td>14mA</td> |
| 73 | <td></td> |
| 74 | </tr> |
| 75 | |
| 76 | <tr> |
| 77 | <td>bluetooth.on</td> |
| 78 | <td>Additional power used when Bluetooth is turned on but idle.</td> |
| 79 | <td>1.4mA</td> |
| 80 | <td></td> |
| 81 | </tr> |
| 82 | |
| 83 | <tr> |
| 84 | <td>wifi.on</td> |
| 85 | <td>Additional power used when Wi-Fi is turned on but not receiving, |
| 86 | transmitting, or scanning.</td> |
| 87 | <td>2mA</td> |
| 88 | <td></td> |
| 89 | </tr> |
| 90 | |
| 91 | <tr> |
| 92 | <td>wifi.active</td> |
| 93 | <td>Additional power used when transmitting or receiving over Wi-Fi.</td> |
| 94 | <td>31mA</td> |
| 95 | <td></td> |
| 96 | </tr> |
| 97 | |
| 98 | <tr> |
| 99 | <td>wifi.scan</td> |
| 100 | <td>Additional power used when Wi-Fi is scanning for access points.</td> |
| 101 | <td>100mA</td> |
| 102 | <td></td> |
| 103 | </tr> |
| 104 | |
| 105 | <tr> |
| 106 | <td>dsp.audio</td> |
| 107 | <td>Additional power used when audio decoding/encoding via DSP.</td> |
| 108 | <td>14.1mA</td> |
| 109 | <td>Reserved for future use.</td> |
| 110 | </tr> |
| 111 | |
| 112 | |
| 113 | <tr> |
| 114 | <td>dsp.video</td> |
| 115 | <td>Additional power used when video decoding via DSP.</td> |
| 116 | <td>54mA</td> |
| 117 | <td>Reserved for future use.</td> |
| 118 | </tr> |
| 119 | |
| 120 | <tr> |
| 121 | <td>camera.avg</td> |
| 122 | <td>Average power use by the camera subsystem for a typical camera |
| 123 | application.</td> |
| 124 | <td>600mA</td> |
| 125 | <td>Intended as a rough estimate for an application running a preview |
| 126 | and capturing approximately 10 full-resolution pictures per minute.</td> |
| 127 | </tr> |
| 128 | |
| 129 | <tr> |
| 130 | <td>camera.flashlight</td> |
| 131 | <td>Average power used by the camera flash module when on.</td> |
| 132 | <td>200mA</td> |
| 133 | <td></td> |
| 134 | </tr> |
| 135 | |
| 136 | |
| 137 | <tr> |
| 138 | <td>gps.on</td> |
| 139 | <td>Additional power used when GPS is acquiring a signal.</td> |
| 140 | <td>50mA</td> |
| 141 | <td></td> |
| 142 | </tr> |
| 143 | |
| 144 | <tr> |
| 145 | <td>radio.active</td> |
| 146 | <td>Additional power used when cellular radio is transmitting/receiving.</td> |
| 147 | <td>100mA-300mA</td> |
| 148 | <td></td> |
| 149 | </tr> |
| 150 | |
| 151 | <tr> |
| 152 | <td>radio.scanning</td> |
| 153 | <td>Additional power used when cellular radio is paging the tower.</td> |
| 154 | <td>1.2mA</td> |
| 155 | <td></td> |
| 156 | </tr> |
| 157 | |
| 158 | <tr> |
| 159 | <td>radio.on</td> |
| 160 | <td>Additional power used when the cellular radio is on. Multi-value entry, |
| 161 | one per signal strength (no signal, weak, moderate, strong).</td> |
| 162 | <td>1.2mA</td> |
| 163 | <td>Some radios boost power when they search for a cell tower and do not |
| 164 | detect a signal. Values can be the same or decrease with increasing signal |
| 165 | strength. If you provide only one value, the same value is used for all |
| 166 | strengths. If you provide two values, the first is used for no-signal, the |
| 167 | second value is used for all other strengths, and so on.</td> |
| 168 | </tr> |
| 169 | |
| 170 | <tr> |
| 171 | <td>cpu.speeds</td> |
| 172 | <td>Multi-value entry that lists each possible CPU speed in KHz.</td> |
| 173 | <td>125000KHz, 250000KHz, 500000KHz, 1000000KHz, 1500000KHz</td> |
| 174 | <td>The number and order of entries must correspond to the mA entries in |
| 175 | cpu.active.</td> |
| 176 | </tr> |
| 177 | |
| 178 | <tr> |
| 179 | <td>cpu.idle</td> |
| 180 | <td>Total power drawn by the system when CPUs (and the SoC) are in system |
| 181 | suspend state.</td> |
| 182 | <td>3mA</td> |
| 183 | <td></td> |
| 184 | </tr> |
| 185 | |
| 186 | <tr> |
| 187 | <td>cpu.awake</td> |
| 188 | <td>Additional power used when CPUs are in scheduling idle state |
| 189 | (kernel idle loop); system is not in system suspend state.</td> |
| 190 | <td>50mA</td> |
| 191 | <td>Your platform might have more than one idle state in use with differing |
| 192 | levels of power consumption; choose a representative idle state for longer |
| 193 | periods of scheduler idle (several milliseconds). Examine the power graph on |
| 194 | your measurement equipment and choose samples where the CPU is at its lowest |
| 195 | consumption, discarding higher samples where the CPU exited idle.</td> |
| 196 | </tr> |
| 197 | |
| 198 | <tr> |
| 199 | <td>cpu.active</td> |
| 200 | <td>Additional power used by CPUs when running at different speeds.</td> |
| 201 | <td>100mA, 120mA, 140mA, 160mA, 200mA</td> |
| 202 | <td>Set the max speed in the kernel to each of the allowed speeds and peg the |
| 203 | CPU at that speed. The number of entries here correspond to the number of |
| 204 | entries in cpu.speeds, in the same order.</td> |
| 205 | </tr> |
| 206 | |
| 207 | <tr> |
| 208 | <td>battery.capacity</td> |
| 209 | <td>Total battery capacity in mAh.</td> |
| 210 | <td>3000mAh</td> |
| 211 | <td></td> |
| 212 | </tr> |
| 213 | </table> |
| 214 | |
| 215 | <h2 id="sample">Sample file</h2> |
| 216 | |
| 217 | <pre> |
| 218 | <!-- Most values are the incremental current used by a feature, in mA (measured at |
| 219 | nominal voltage). OEMs must measure and provide actual values before shipping a device. |
| 220 | Example real-world values are given, but are dependent on the platform |
| 221 | and can vary significantly, so should be measured on the shipping platform with a power meter. |
| 222 | --> |
| 223 | 0 |
| 224 | 200 |
| 225 | 160 |
| 226 | 10 |
| 227 | <!-- Bluetooth stereo audio playback 10.0 mA --> |
| 228 | 1.3 |
| 229 | 0.5 |
| 230 | 30 |
| 231 | 100 |
| 232 | 12 |
| 233 | 50 |
| 234 | 50 |
| 235 | 75 |
| 236 | 1.1 |
| 237 | <!-- Strength 0 to BINS-1 (4) --> |
| 238 | 1.1 |
| 239 | |
| 240 | <!-- Different CPU speeds as reported in |
| 241 | /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state --> |
| 242 | |
| 243 | 250000 <!-- 250 MHz --> |
| 244 | 500000 <!-- 500 MHz --> |
| 245 | 750000 <!-- 750 MHz --> |
| 246 | 1000000 <!-- 1 GHz --> |
| 247 | 1200000 <!-- 1.2 GHz --> |
| 248 | |
| 249 | <!-- Power consumption when CPU is idle --> |
| 250 | 3.0 |
| 251 | 50.1 |
| 252 | <!-- Power consumption at different speeds --> |
| 253 | |
| 254 | 100 <!-- 250 MHz --> |
| 255 | 120 <!-- 500 MHz --> |
| 256 | 140 <!-- 750 MHz --> |
| 257 | 155 <!-- 1 GHz --> |
| 258 | 175 <!-- 1.2 GHz --> |
| 259 | |
| 260 | <!-- This is the battery capacity in mAh --> |
| 261 | 3000 |
| 262 | <!-- Battery capacity is 3000 mAH (at 3.6 Volts) --> |
| 263 | |
| 264 | </pre> |