blob: e75d50a4f9d291496046a3ad1b5156f0b611f6a4 [file] [log] [blame]
Heidi von Markham9ade83e2015-09-02 17:22:40 -07001page.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
31being used by the device and perform the various operations for which
32information is needed. Measure the power use during those operations and compute
33the values (deriving differences from other baseline power uses as appropriate).
34</p>
35
Heidi von Markhame15bf602015-11-17 15:15:51 -080036<p>As the goal of a power profile is to estimate battery drain appropriately,
37power profile values are given in current (amps). The Android framework
38multiplies the current by the time for which the subsystem was active and
39computes the mAh value, which is then used to estimate the amount of battery
40drained by the application/subsystem.</p>
41
Heidi von Markhambfadf222015-09-09 16:18:44 -070042<h2 id="multiple-cpus">Devices with heterogeneous CPUs</h2>
43
44<p>The power profile for devices with CPU cores of heterogeneous architecture
45must include the following additional fields:
46<ul>
47<li>Number of total CPUs for each cluster.</li>
48<li>CPU speeds supported by each cluster.</li>
49</ul>
50
51<p>To differentiate between active CPUs and supported CPU speeds for each
52cluster, append the cluster number to the name of the array. Example:</p>
53
54<pre>
55&lt;array name="cpu.active.cluster0"&gt;
56&lt;value&gt;200&lt;/value&gt;
57&lt;value&gt;300&lt;/value&gt;
58&lt;value&gt;400&lt;/value&gt;
59&lt;/array&gt;
60&lt;array name="cpu.speeds.cluster0"&gt;
61&lt;value&gt;600000&lt;/value&gt;
62&lt;value&gt;800000&lt;/value&gt;
63&lt;value&gt;1200000&lt;/value&gt;
64&lt;/array&gt;
65
66&lt;array name="cpu.active.cluster1"&gt;
67&lt;value&gt;400&lt;/value&gt;
68&lt;value&gt;500&lt;/value&gt;
69&lt;value&gt;600&lt;/value&gt;
70&lt;/array&gt;
71&lt;array name="cpu.speeds.cluster1"&gt;
72&lt;value&gt;800000&lt;/value&gt;
73&lt;value&gt;1200000&lt;/value&gt;
74&lt;value&gt;1400000&lt;/value&gt;
75&lt;/array&gt;
76</pre>
77
Heidi von Markham9ade83e2015-09-02 17:22:40 -070078<h2 id="values">Power values</h2>
Heidi von Markhambfadf222015-09-09 16:18:44 -070079<p>The following table describes available power value settings. To view the
80sample file in AOSP, see
81<a href="https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/xml/power_profile.xml">power_profile.xml</a>.</p>
Heidi von Markham9ade83e2015-09-02 17:22:40 -070082
83<table>
84<tr>
85 <th>Name</th>
86 <th>Description</th>
87 <th>Example Value</th>
88 <th>Notes</th>
89</tr>
90<tr>
91 <td>none</td>
92 <td>Nothing</td>
93 <td>0</td>
94 <td></td>
95</tr>
96
97<tr>
98 <td>screen.on</td>
99 <td>Additional power used when screen is turned on at minimum brightness.</td>
100 <td>200mA</td>
101 <td>Includes touch controller and display backlight. At 0 brightness, not the
102 Android minimum which tends to be 10 or 20%.</td>
103</tr>
104
105<tr>
106 <td>screen.full</td>
107 <td>Additional power used when screen is at maximum brightness, compared to
108 screen at minimum brightness.</td>
109 <td>100mA-300mA</td>
110 <td>A fraction of this value (based on screen brightness) is added to the
111 screen.on value to compute the power usage of the screen.</td>
112</tr>
113
114<tr>
115 <td>bluetooth.active</td>
116 <td>Additional power used when playing audio through Bluetooth A2DP.</td>
117 <td>14mA</td>
118 <td></td>
119</tr>
120
121<tr>
122 <td>bluetooth.on</td>
123 <td>Additional power used when Bluetooth is turned on but idle.</td>
124 <td>1.4mA</td>
125 <td></td>
126</tr>
127
128<tr>
129 <td>wifi.on</td>
130 <td>Additional power used when Wi-Fi is turned on but not receiving,
131 transmitting, or scanning.</td>
132 <td>2mA</td>
133 <td></td>
134</tr>
135
136<tr>
137 <td>wifi.active</td>
138 <td>Additional power used when transmitting or receiving over Wi-Fi.</td>
139 <td>31mA</td>
140 <td></td>
141</tr>
142
143<tr>
144 <td>wifi.scan</td>
145 <td>Additional power used when Wi-Fi is scanning for access points.</td>
146 <td>100mA</td>
147 <td></td>
148</tr>
149
150<tr>
151 <td>dsp.audio</td>
152 <td>Additional power used when audio decoding/encoding via DSP.</td>
153 <td>14.1mA</td>
154 <td>Reserved for future use.</td>
155</tr>
156
157
158<tr>
159 <td>dsp.video</td>
160 <td>Additional power used when video decoding via DSP.</td>
161 <td>54mA</td>
162 <td>Reserved for future use.</td>
163</tr>
164
165<tr>
166 <td>camera.avg</td>
167 <td>Average power use by the camera subsystem for a typical camera
168 application.</td>
169 <td>600mA</td>
170 <td>Intended as a rough estimate for an application running a preview
171 and capturing approximately 10 full-resolution pictures per minute.</td>
172</tr>
173
174<tr>
175 <td>camera.flashlight</td>
176 <td>Average power used by the camera flash module when on.</td>
177 <td>200mA</td>
178 <td></td>
179</tr>
180
181
182<tr>
183 <td>gps.on</td>
184 <td>Additional power used when GPS is acquiring a signal.</td>
185 <td>50mA</td>
186 <td></td>
187</tr>
188
189<tr>
190 <td>radio.active</td>
191 <td>Additional power used when cellular radio is transmitting/receiving.</td>
192 <td>100mA-300mA</td>
193 <td></td>
194</tr>
195
196<tr>
197 <td>radio.scanning</td>
198 <td>Additional power used when cellular radio is paging the tower.</td>
199 <td>1.2mA</td>
200 <td></td>
201</tr>
202
203<tr>
204 <td>radio.on</td>
205 <td>Additional power used when the cellular radio is on. Multi-value entry,
206 one per signal strength (no signal, weak, moderate, strong).</td>
207 <td>1.2mA</td>
208 <td>Some radios boost power when they search for a cell tower and do not
209 detect a signal. Values can be the same or decrease with increasing signal
210 strength. If you provide only one value, the same value is used for all
211 strengths. If you provide two values, the first is used for no-signal, the
212 second value is used for all other strengths, and so on.</td>
213</tr>
214
215<tr>
216 <td>cpu.speeds</td>
217 <td>Multi-value entry that lists each possible CPU speed in KHz.</td>
218 <td>125000KHz, 250000KHz, 500000KHz, 1000000KHz, 1500000KHz</td>
219 <td>The number and order of entries must correspond to the mA entries in
220 cpu.active.</td>
221</tr>
222
223<tr>
224 <td>cpu.idle</td>
225 <td>Total power drawn by the system when CPUs (and the SoC) are in system
226 suspend state.</td>
227 <td>3mA</td>
228 <td></td>
229</tr>
230
231<tr>
232 <td>cpu.awake</td>
233 <td>Additional power used when CPUs are in scheduling idle state
234 (kernel idle loop); system is not in system suspend state.</td>
235 <td>50mA</td>
236 <td>Your platform might have more than one idle state in use with differing
237 levels of power consumption; choose a representative idle state for longer
238 periods of scheduler idle (several milliseconds). Examine the power graph on
239 your measurement equipment and choose samples where the CPU is at its lowest
240 consumption, discarding higher samples where the CPU exited idle.</td>
241</tr>
242
243<tr>
244 <td>cpu.active</td>
245 <td>Additional power used by CPUs when running at different speeds.</td>
246 <td>100mA, 120mA, 140mA, 160mA, 200mA</td>
Heidi von Markham516e6dd2015-11-04 12:03:32 -0800247 <td>Value represents the power used by the CPU rails when running at different
248 speeds. Set the max speed in the kernel to each of the allowed speeds and peg
249 the CPU at that speed. The number and order of entries correspond to the
250 number and order of entries in cpu.speeds.</td>
Heidi von Markham9ade83e2015-09-02 17:22:40 -0700251</tr>
252
253<tr>
Heidi von Markhambfadf222015-09-09 16:18:44 -0700254 <td>cpu.clusters.cores</td>
255 <td>Number of cores each CPU cluster contains.</td>
256 <td>4, 2</td>
257 <td>Required only for devices with <a href="#multiple-cpus">heterogeneous CPU
258 architectures</a>. Number of entries and order should match the number of
259 cluster entries for the cpu.active and cpu.speeds. The first entry represents
260 the number of CPU cores in cluster0, the second entry represents the number of
261 CPU cores in cluster1, and so on.</td>
262</tr>
263
264<tr>
Heidi von Markham9ade83e2015-09-02 17:22:40 -0700265 <td>battery.capacity</td>
266 <td>Total battery capacity in mAh.</td>
267 <td>3000mAh</td>
268 <td></td>
269</tr>
Heidi von Markhambfadf222015-09-09 16:18:44 -0700270</table>