aboutsummaryrefslogtreecommitdiff
path: root/en/devices
diff options
context:
space:
mode:
Diffstat (limited to 'en/devices')
-rw-r--r--en/devices/architecture/kernel/modular-kernels.html2
-rw-r--r--en/devices/automotive/images/automotive_power_class_diagram.pngbin206642 -> 141145 bytes
-rw-r--r--en/devices/automotive/images/automotive_power_deep_sleep.pngbin129342 -> 73006 bytes
-rw-r--r--en/devices/automotive/images/automotive_power_deep_sleep_exit.pngbin106899 -> 60340 bytes
-rw-r--r--en/devices/automotive/images/automotive_power_object_state.pngbin64709 -> 39254 bytes
-rw-r--r--en/devices/automotive/images/automotive_power_reference_diagram.pngbin42141 -> 10636 bytes
-rw-r--r--en/devices/automotive/images/automotive_power_states.pngbin58397 -> 25526 bytes
-rw-r--r--en/devices/automotive/power.html114
-rw-r--r--en/devices/camera/camera3.html10
-rw-r--r--en/devices/tech/debug/asan.html16
-rw-r--r--en/devices/tech/debug/gdb.html42
-rw-r--r--en/devices/tech/power/values.html104
12 files changed, 176 insertions, 112 deletions
diff --git a/en/devices/architecture/kernel/modular-kernels.html b/en/devices/architecture/kernel/modular-kernels.html
index c314a956..a0908b71 100644
--- a/en/devices/architecture/kernel/modular-kernels.html
+++ b/en/devices/architecture/kernel/modular-kernels.html
@@ -599,7 +599,7 @@ where to load the DT blob from.</p>
<p>Requirements for Device Tree Overlay support (if used):</p>
<ul>
-<li>Device should have new device tree blob for overlay (DTBO) partion per
+<li>Device should have new device tree blob for overlay (DTBO) partition per
kernel image for board–specific DT overlay (for details on the partition format,
see <a href="/devices/architecture/dto/partitions.html">DTB/DTBO Partitions</a>.
The assumption is that bootloader already knows where and how to load the
diff --git a/en/devices/automotive/images/automotive_power_class_diagram.png b/en/devices/automotive/images/automotive_power_class_diagram.png
index 736dadb8..ac46c2c3 100644
--- a/en/devices/automotive/images/automotive_power_class_diagram.png
+++ b/en/devices/automotive/images/automotive_power_class_diagram.png
Binary files differ
diff --git a/en/devices/automotive/images/automotive_power_deep_sleep.png b/en/devices/automotive/images/automotive_power_deep_sleep.png
index 2ccfda75..a4ee79f9 100644
--- a/en/devices/automotive/images/automotive_power_deep_sleep.png
+++ b/en/devices/automotive/images/automotive_power_deep_sleep.png
Binary files differ
diff --git a/en/devices/automotive/images/automotive_power_deep_sleep_exit.png b/en/devices/automotive/images/automotive_power_deep_sleep_exit.png
index b920eb20..8ab08220 100644
--- a/en/devices/automotive/images/automotive_power_deep_sleep_exit.png
+++ b/en/devices/automotive/images/automotive_power_deep_sleep_exit.png
Binary files differ
diff --git a/en/devices/automotive/images/automotive_power_object_state.png b/en/devices/automotive/images/automotive_power_object_state.png
index 0e0aba62..32f3145c 100644
--- a/en/devices/automotive/images/automotive_power_object_state.png
+++ b/en/devices/automotive/images/automotive_power_object_state.png
Binary files differ
diff --git a/en/devices/automotive/images/automotive_power_reference_diagram.png b/en/devices/automotive/images/automotive_power_reference_diagram.png
index 625450f1..8b521c09 100644
--- a/en/devices/automotive/images/automotive_power_reference_diagram.png
+++ b/en/devices/automotive/images/automotive_power_reference_diagram.png
Binary files differ
diff --git a/en/devices/automotive/images/automotive_power_states.png b/en/devices/automotive/images/automotive_power_states.png
index d0c5cab6..8772354f 100644
--- a/en/devices/automotive/images/automotive_power_states.png
+++ b/en/devices/automotive/images/automotive_power_states.png
Binary files differ
diff --git a/en/devices/automotive/power.html b/en/devices/automotive/power.html
index f126825d..084a39bb 100644
--- a/en/devices/automotive/power.html
+++ b/en/devices/automotive/power.html
@@ -21,16 +21,16 @@
limitations under the License.
-->
-<p>Android Automotive (AAE) P introduces a new state – <em>deep sleep</em> – into the AAE P power
-management state machine. To implement this state, AAE P provides a new power management service
+<p>Android 9 introduces a new state – <em>deep sleep</em> – into the power
+management state machine. To implement this state, Android 9 provides a new power management service
and interface: <code>CarPowerManagementService</code> and <code>CarPowerManager</code>.</p>
-<p>State transitions are triggered by the Vehicle MCU (VMCU). To enable AAE to communicate with the
-VMCU, integrators must implement several components. Integrators are responsible for integrating
+<p>State transitions are triggered by the Vehicle MCU (VMCU). To communicate with the VMCU,
+integrators must implement several components. Integrators are responsible for integrating
with the VHAL and the kernel implementation. Integrators are also responsible for disabling wake
sources and ensuring that shutdowns are not postponed indefinitely.</p>
-<h2>Terminology</h2>
+<h2 id=terms>Terminology</h2>
<p>These terms are used throughout this document:</p>
@@ -73,7 +73,7 @@ bringup.</td>
<td>Hibernate</td>
<td>AKA <em>Suspend to Disk</em> (S2D/S4). The SoC is placed into S4 power mode (hibernate) and RAM
content is written to non-volatile media (such as flash or disk) and the entire system is powered
-off. Android does <strong><em>not</em></strong> currently implement hibernate.</td>
+off. Android does <strong><em>not</em></strong> currently implement hibernate.</td>
</tr>
<tr>
<td>Media Processor (MP)</td>
@@ -86,7 +86,7 @@ off. Android does <strong><em>not</em></strong> currently implement hibernate.<
<tr>
<td>System on a Chip (SoC)</td>
<td>Main processor that runs Android, typically supplied by manufacturers such as Intel, Mediatek,
-Nvidia, Qualcomm, Renesas, and Texas Instruments. </td>
+Nvidia, Qualcomm, Renesas, and Texas Instruments.</td>
</tr>
<tr>
<td>Suspend</td>
@@ -112,15 +112,15 @@ communicates with the VMCU via USB, UART, SPI, and GPIO signals. </td>
</tbody>
</table>
-<h2>System design</h2>
+<h2 id=design>System design</h2>
-<p>This section describes how AAE represents the application processor's power state and which
+<p>This section describes how Android 9 represents the application processor's power state and which
modules implement the power management system. This material also describes how these modules work
together and how state transitions typically occur.</p>
-<h3>Car power state machine</h3>
+<h3 id=state>Car power state machine</h3>
-<p>AAE uses a <em>state machine</em> to represent the power state of the AP. This state machine
+<p>Android 9 uses a <em>state machine</em> to represent the power state of the AP. This state machine
provides these five states, as illustrated below:
<p><img src="/devices/automotive/images/automotive_power_states.png"></p>
@@ -136,15 +136,15 @@ When display turns on, the ON: DISP OFF state transitions into ON:FULL (and vice
SHUTDOWN PREPARE and then transitions to OFF or DEEP SLEEP:</p>
<ul>
-<li>Power off</li>
-<li>Suspended to RAM</li>
+<li>Power off.</li>
+<li>Suspended to RAM.</li>
</ul>
<p>When this power management state machine enters the DEEP SLEEP state, the AP runs Suspend to
RAM. For example, the AP suspends its state (such as register stored value) in RAM. When the AP
wakes up, all states are restored.</p>
-<h3>Power management modules</h3>
+<h3 id=module>Power management modules</h3>
<p>These five modules comprise the power management system:</p>
@@ -203,14 +203,14 @@ modules, applications, and services is illustrated below:</p>
<p><b>Figure 2</b>. Power components reference diagram</p>
-<h3>Typical message sequence</h3>
+<h3 id=msg>Typical message sequence</h3>
<p>The previous section described the modules that comprise the power management system. This
section uses the following two examples to explain how the modules and applications communicate:</p>
<ul>
-<li>Enter deep sleep</li>
-<li>Exit deep sleep</li>
+<li>Enter deep sleep.</li>
+<li>Exit deep sleep.</li>
</ul>
<h4>Enter deep sleep</h4>
@@ -262,16 +262,16 @@ provided by the CPM. This method returns these values, as notified from the VMCU
<p><b>Figure 4</b>. Exit deep sleep sequence diagram</p>
-<h2>Programming interfaces provided by CPM</h2>
+<h2 id=cpm>Programming interfaces provided by CPM</h2>
<p>This section describes the Java and C++ API provided by the CPM for system applications and
services. The process to call the CPM in C++ is identical to that used by the Java API. This API
enables the system software to:</p>
<ul>
-<li>Monitor the AP's power state changes</li>
-<li>Acquire boot reasons from the CPMS</li>
-<li>Request the VMCU to shut down the AP on the next suspend instruction</li>
+<li>Monitor power state changes in the AP.</li>
+<li>Acquire boot reasons from the CPMS.</li>
+<li>Request the VMCU to shut down the AP on the next suspend instruction.</li>
</ul>
<p><code>PowerTestFragment.java</code> in <code>com.google.android.car.kitchensink.power</code>
@@ -282,7 +282,7 @@ illustrates how to use these APIs in Java. Use these steps to call the APIs prov
<li>Call the appropriate method on the object created in Step 1.</li>
</ol>
-<h3>Creating a CarPowerManager object</h3>
+<h3 id=object>Creating a CarPowerManager object</h3>
<p>To create a CPM object, call the Car object's <code>getCarManager()</code> method. This method is
a facade used to create CM objects. Specify <code>android.car.Car.POWER_SERVICE</code> as an
@@ -297,7 +297,7 @@ CarPowerManager powerManager =
</pre>
</div>
-<h2>CarPowerStateListener and registration</h2>
+<h2 id=reg>CarPowerStateListener and registration</h2>
<p>System applications and services can receive power state change notifications by implementing
<code>CarPowerManager.CarPowerStateListener</code>. This interface defines one method
@@ -358,7 +358,7 @@ following table:</p>
</tbody>
</table>
-<h3>CarPowerStateListener unregistration</h3>
+<h3 id=dereg>CarPowerStateListener unregistration</h3>
<p>To unregister all listener objects registered to CPM, call the <code>clearListener</code> method:</p>
@@ -367,7 +367,7 @@ powerManager.clearListener();
</pre>
</div>
-<h3>Boot reason acquisition</h3>
+<h3 id=boot>Boot reason acquisition</h3>
<p>To acquire the boot reason, call the <code>getBootReason</code> method, which communicates with
the CPMS and returns one of the following five boot reasons:</p>
@@ -424,29 +424,29 @@ try{
<p>This method throws a <code>CarNotConnectedException</code> when it fails to communicate with the
CPMS.</p>
-<h3>Shutdown request on next suspend</h3>
+<h3 id=shutdown>Shutdown request on next suspend</h3>
<p>The <code>requestShutdownOnNextSuspend()</code>method instructs CPMS to shut down instead of deep
sleep at the next opportunity.</p>
-<h2>System integration on your Android implementation</h2>
+<h2 id=integration>System integration on your Android implementation</h2>
<p>Integrators are responsible for implementing the following items:</p>
<ul>
-<li>Kernel interface to suspend Android</li>
+<li>Kernel interface to suspend Android.</li>
<li>The VHAL to:<ul type="circle">
-<li>Propagate the initiation of suspend or shutdown from the car to Android</li>
-<li>Send the shutdown ready message from Android to the car</li>
-<li>Initiate shutdown or suspend of Android via the Linux kernel interface</li>
-<li>Propagate the wake reason from the car to Android upon resume from suspend</li>
+<li>Propagate the initiation of suspend or shutdown from the car to Android.</li>
+<li>Send the shutdown ready message from Android to the car.</li>
+<li>Initiate shutdown or suspend of Android via the Linux kernel interface.</li>
+<li>Propagate the wake reason from the car to Android upon resume from suspend.</li>
</ul>
-<li>Wakesources to be disabled when the device is in suspend</li>
+<li>Wakesources to be disabled when the device is in suspend.</li>
<li>Applications to shut down quickly enough so as not to indefinitely postpone the shutdown
-process</li>
+process.</li>
</ul>
-<h3>Kernel interface: /sys/power/state</h3>
+<h3 id=kernel>Kernel interface: /sys/power/state</h3>
<p>First, implement the Linux suspend power state. Android places a device into suspend mode when
an application or service writes <code>mem</code> into a file located at
@@ -455,15 +455,15 @@ the VMCU that the device has shut down completely. The Integrator is also respon
any race conditions between VHAL sending the final message to the VMCU and the system going into
suspend or shutdown mode.</p>
-<h3>VHAL responsibility</h3>
+<h3 id=vhal>VHAL responsibility</h3>
<p>The VHAL provides an interface between the vehicle network and Android. The VHAL:</p>
<ul>
-<li>Propagates the initiation of suspend or shutdown from the car to Android</li>
-<li>Sends the shutdown ready message from Android to the car</li>
-<li>Initiates the shutdown or suspend of Android via the Linux kernel interface</li>
-<li>Propagates the wake reason from the car to Android upon resume from suspend</li>
+<li>Propagates the initiation of suspend or shutdown from the car to Android.</li>
+<li>Sends the shutdown ready message from Android to the car.</li>
+<li>Initiates the shutdown or suspend of Android via the Linux kernel interface.</li>
+<li>Propagates the wake reason from the car to Android upon resume from suspend.</li>
</ul>
<p>When the CPMS informs the VHAL that it is ready to shut down, the VHAL sends the shutdown ready
@@ -503,7 +503,7 @@ instruct the VMCU that it is safe to remove power from the device.</p>
integers:</p>
<ul>
-<li><code>int32Values[0]</code>: <code>VehicleApPowerStateReport</code> enum of current state </li>
+<li><code>int32Values[0]</code>: <code>VehicleApPowerStateReport</code> enum of the current state.</li>
<li><code>int32Values[1]</code>: Time in milliseconds to postpone or sleep/shutdown. This value
depends on the first value.</li>
</ul>
@@ -517,7 +517,7 @@ specific descriptions, which are stored in the
<tr>
<th><strong>Value name</strong></th>
<th><strong>Description</strong></th>
-<th><strong>Second value</strong></th>
+<th><strong>Second&nbsp;value</strong></th>
</tr>
</thead>
<tbody>
@@ -562,7 +562,7 @@ value.</td>
<p>The state can be set asynchronously (in the case of <code>BOOT_COMPLETE</code>) or in response to
a request via the VMCU. When the state is set to <code>SHUTDOWN_START</code>,
-<code>DEEP_SLEEP_ENTRY,</code> or <code>SHUTDOWN_POSTPONE</code>, an integer value in
+<code>DEEP_SLEEP_ENTRY,</code> or <code>SHUTDOWN_POSTPONE</code>, an integer value in
milliseconds is sent to notify the VMCU for how long the AP must postpone shutdown or sleep.</p>
<h4>AP_POWER_STATE_REQ</h4>
@@ -572,14 +572,14 @@ two integers:</p>
<ul>
<li><code>int32Values[0]</code>: <code>VehicleApPowerStateReq</code> enum value, which represents
-the new state into which to transition</li>
-<li><code>int32Values[1]</code>: <code>VehicleApPowerStateShutdownParam</code> enum value. This is
-sent only for a <code>SHUTDOWN_PREPARE</code> message and conveys to Android what options it
-contains.</li>
+the new state into which to transition.</li>
+<li><code>int32Values[1]</code>: <code>VehicleApPowerStateShutdownParam</code> enum value. This
+ value os sent only for a <code>SHUTDOWN_PREPARE</code> message and transmits to Android the
+ options it contains.</li>
</ul>
<p>The first integer value represents the new state into which Android is to transit. The semantics
-are defined in <code>types.hal</code> and provided in the following table:</p>
+are defined in <code>types.hal</code> and provided in the following table:</p>
<table>
<thead>
@@ -677,24 +677,24 @@ a specific duration, as specified in <code>VehicleApPowerSetState</code>#SHUTDOW
</tbody>
</table>
-<h3>Wake sources</h3>
+<h3 id=wake>Wake sources</h3>
<p>Use Integrator to disable the appropriate wake sources when the device is in suspend mode.
-Common wake sources include heartbeats, modem, wifi, and Bluetooth. The only valid wake source must
+Common wake sources include heartbeats, modem, wifi, and Bluetooth. The only valid wake source must
be an interrupt from the VMCU to wake up the SoC. This assumes that the VMCU can listen to the modem
-for remote wakeup events (such as remote engine start). If this functionality is pushed to the AP,
+for remote wakeup events (such as remote engine start). If this functionality is pushed to the AP,
then another wake source to service the modem must be added. In the current design, the Integrator
-supplies a file with a list of wake sources to be turned off. The CPMS iterates through this file
+supplies a file with a list of wake sources to be turned off. The CPMS iterates through this file
and manages the turning off and on of the wake sources at suspend time.</p>
-<h3>Applications</h3>
+<h3 id=apps>Applications</h3>
<p>OEMs must be careful to write applications so that they can be shut down quickly and not postpone
the process indefinitely. </p>
-<h2>Appendix</h2>
+<h2 id=app>Appendix</h2>
-<h3>Directories in the source code tree</h3>
+<h3 id=tree>Directories in the source code tree</h3>
<table>
<thead>
@@ -731,7 +731,7 @@ the process indefinitely. </p>
</tbody>
</table>
-<h3>Class diagram</h3>
+<h3 id=diagram>Class diagram</h3>
<p>This class diagram displays the Java classes and interfaces in the power management system:</p>
@@ -739,7 +739,7 @@ the process indefinitely. </p>
<p><b>Figure 5</b>. Power class diagram</p>
-<h3>Object relationship </h3>
+<h3 id=rel>Object relationship</h3>
<p>The following graph illustrates which objects have references to other objects. An edge
means that the source object holds a reference to the target object. For example, VehicleHAL has a
diff --git a/en/devices/camera/camera3.html b/en/devices/camera/camera3.html
index bb2e6833..71e90a34 100644
--- a/en/devices/camera/camera3.html
+++ b/en/devices/camera/camera3.html
@@ -30,7 +30,7 @@ to your underlying camera driver and hardware. Android 8.0 introduced
<a href="/devices/architecture/treble">Treble</a>, switching the CameraHal API
to a stable interface defined by the HAL Interface Description Language (HIDL).
If you have previously developed a camera
-HAL module and driver for older versions of Android, be aware of significant
+HAL module and driver for Android 7.0 and lower, be aware of significant
changes in the camera pipeline.</p>
<h2 id="v3-enhance">Camera HAL3 features</h2>
@@ -84,12 +84,12 @@ may be repeated indefinitely (with <code>setRepeatingRequest()</code>). Captures
have priority over repeating requests.</p>
<img src="images/camera_simple_model.png" alt="Camera data model" id="figure2" />
-<p class="img-caption"><strong>Figure 2.</strong> Camera core operation model</p>
+<p class="img-caption"><strong>Figure 1.</strong> Camera core operation model</p>
<h2 id="overview">Camera HAL1 overview</h2>
-<aside class="note"><strong>Note:</strong> Camera HAL1 has been deprecated. New
-devices should use Camera HAL3.</aside>
+<aside class="note"><strong>Note:</strong> As Camera HAL1 has been deprecated,
+ Camera HAL3 is recommended for devices launching on Android 9 or higher.</aside>
<p>Version 1 of the camera subsystem was designed as a black box with high-level
controls and the following three operating modes:</p>
@@ -105,7 +105,7 @@ hard to implement new features such as burst mode, which falls between two of
the operating modes.</p>
<img src="images/camera_block.png" alt="Camera block diagram" id="figure1" />
-<p class="img-caption"><strong>Figure 1.</strong> Camera components</p>
+<p class="img-caption"><strong>Figure 2.</strong> Camera components</p>
<p>Android 7.0 continues to support camera HAL1 as many devices still rely on
it. In addition, the Android camera service supports implementing both HALs (1
diff --git a/en/devices/tech/debug/asan.html b/en/devices/tech/debug/asan.html
index 9ea32939..29df8b6d 100644
--- a/en/devices/tech/debug/asan.html
+++ b/en/devices/tech/debug/asan.html
@@ -44,7 +44,8 @@ HWASan is non-deterministic. There are only 256 possible tag values, so there is
probability of missing any bug. HWAsan does not have ASan's limited-size redzones for
detecting overflows and limited-capacity quarantine for detecting use-after-free,
so it does not matter to HWAsan how large the overflow is or how long ago the memory
-was deallocated. This makes HWASan better than ASan.</p>
+was deallocated. This makes HWASan better than ASan. You can read more about
+<a href="http://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html" class="external">the design of HWAsan</a>.</p>
<p>Valgrind's Memcheck tool is similar, but ASan also detects stack/global overflows
in addition to heap overflows, and is much faster with less memory overhead. Conversely,
@@ -60,10 +61,15 @@ instead.</p>
<h2 id="using-hwasan">Using HWAsan</h2>
-<p>As of December 2018 only Pixel 2 and Pixel 2 XL are supported. Supporting another device
-requires backporting several kernel patches. The Android team is working on getting those into
-the common kernel.
-You may also need to remove some optional extras to make room on your system partition for the
+<p>As of February 2019 only Pixel 2 and Pixel 2 XL support HWAsan. The Android team is working on
+getting the necessary patches into the common kernel, but for now supporting another device requires
+backporting these kernel patches:</p>
+<ul>
+<li><a href="https://lore.kernel.org/patchwork/project/lkml/list/?series=375855" class="external">arm64: untag user pointers passed to the kernel</a></li>
+<li><a href="https://lore.kernel.org/patchwork/project/lkml/list/?series=375865" class="external">arm64 relaxed ABI</a></li>
+</ul>
+
+<p>You may also need to remove some optional extras to make room on your system partition for the
larger libraries. See the <code>walleye_hwasan</code> target for an example.</p>
<p>Use the following commands to build the entire platform using HWASan:</p>
diff --git a/en/devices/tech/debug/gdb.html b/en/devices/tech/debug/gdb.html
index 49d62aa3..34096fb6 100644
--- a/en/devices/tech/debug/gdb.html
+++ b/en/devices/tech/debug/gdb.html
@@ -162,5 +162,47 @@ the following property:</p>
set arm fallback-mode arm # or thumb
</pre>
+<h2 id="vscode">Debugging with VS Code</h2>
+<p>GDB supports debugging platform code on
+ <a href="https://code.visualstudio.com/" class="external">Visual Studio Code</a>.
+ You can use the
+ VS Code debugger frontend instead of the GDB CLI interface to control and
+ debug native code running on devices.</p>
+<p>Before using VS Code for debugging, make sure you install the
+ <a href="https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools" class="external">
+ C/C++ extension</a>.</p>
+<p>To debug code using VS Code:</p>
+<ol>
+ <li>Ensure all build artifacts (such as symbols) required to run
+ <code>gdbclient.py</code> are present.</li>
+ <li>
+ <p>Run the following command:</p>
+ <pre class="prettyprint"><code class="devsite-terminal">gdbclient.py <var>-p pid | -n proc-name | -r ...</var> --setup-forwarding vscode <var>ANY_OTHER_FLAGS</var></code></pre>
+ <p>This prints a JSON object and <code>gdbclient.py</code> continues running.
+ This is expected; do not kill the <code>gdbclient.py</code> program.</p>
+ </li>
+ <li>In the debugging tab in VS Code, select
+ <strong>add configuration</strong>, then select
+ <strong>C/C++ gdb attach</strong>.
+ This opens a <code>launch.json</code> file and adds a new JSON object to a
+ list.
+ </li>
+ <li>Delete the newly added debugger configuration.</li>
+ <li>Copy the JSON object printed by <code>gdbclient.py</code> and paste it
+ into the object you just deleted. Save the changes.
+ </li>
+ <li>To reload the window to refresh the debugger list, press
+ <strong>Ctrl+Shift+P</strong> and type "reload window".
+ </li>
+ <li>Select the new debugger configuration and press
+ <strong>run</strong>. The debugger should connect after 10 to 30 seconds.
+ </li>
+ <li>When you are done debugging, go to the terminal running
+ <code>gdbclient.py</code> and press <strong>enter</strong> to end the
+ <code>gdbclient.py</code> program.
+ </li>
+</ol>
+<p>After setting up the debugger configuration for the first time,
+ you can skip steps 3 through 6.</p>
</body>
</html>
diff --git a/en/devices/tech/power/values.html b/en/devices/tech/power/values.html
index e4c68426..a2ea8388 100644
--- a/en/devices/tech/power/values.html
+++ b/en/devices/tech/power/values.html
@@ -5,6 +5,7 @@
<meta name="book_path" value="/_book.yaml" />
</head>
<body>
+ {% include "_versions.html" %}
<!--
Copyright 2017 The Android Open Source Project
@@ -104,17 +105,18 @@ sample file in AOSP, see
<th>Example Value</th>
<th>Notes</th>
</tr>
+
<tr>
- <td>none</td>
- <td>Nothing</td>
- <td>0</td>
- <td></td>
+ <td>ambient.on</td>
+ <td>Additional power used when screen is in doze/ambient/always-on mode instead of off.</td>
+ <td>around 100 mA</td>
+ <td> - </td>
</tr>
<tr>
<td>screen.on</td>
<td>Additional power used when screen is turned on at minimum brightness.</td>
- <td>200mA</td>
+ <td>200 mA</td>
<td>Includes touch controller and display backlight. At 0 brightness, not the
Android minimum which tends to be 10 or 20%.</td>
</tr>
@@ -123,7 +125,7 @@ sample file in AOSP, see
<td>screen.full</td>
<td>Additional power used when screen is at maximum brightness, compared to
screen at minimum brightness.</td>
- <td>100mA-300mA</td>
+ <td>100 mA-300 mA</td>
<td>A fraction of this value (based on screen brightness) is added to the
screen.on value to compute the power usage of the screen.</td>
</tr>
@@ -132,44 +134,43 @@ sample file in AOSP, see
<td>wifi.on</td>
<td>Additional power used when Wi-Fi is turned on but not receiving,
transmitting, or scanning.</td>
- <td>2mA</td>
- <td></td>
+ <td>2 mA</td>
+ <td> - </td>
</tr>
<tr>
<td>wifi.active</td>
<td>Additional power used when transmitting or receiving over Wi-Fi.</td>
- <td>31mA</td>
- <td></td>
+ <td>31 mA</td>
+ <td> - </td>
</tr>
<tr>
<td>wifi.scan</td>
<td>Additional power used when Wi-Fi is scanning for access points.</td>
- <td>100mA</td>
- <td></td>
+ <td>100 mA</td>
+ <td> - </td>
</tr>
<tr>
- <td>dsp.audio</td>
+ <td>audio</td>
<td>Additional power used when audio decoding/encoding via DSP.</td>
- <td>14.1mA</td>
- <td>Reserved for future use.</td>
+ <td>around 10 mA</td>
+ <td>Used for DSP audio.</td>
</tr>
-
<tr>
- <td>dsp.video</td>
+ <td>video</td>
<td>Additional power used when video decoding via DSP.</td>
- <td>54mA</td>
- <td>Reserved for future use.</td>
+ <td>around 50 mA</td>
+ <td>Used for DSP video.</td>
</tr>
<tr>
<td>camera.avg</td>
<td>Average power use by the camera subsystem for a typical camera
application.</td>
- <td>600mA</td>
+ <td>600 mA</td>
<td>Intended as a rough estimate for an application running a preview
and capturing approximately 10 full-resolution pictures per minute.</td>
</tr>
@@ -177,37 +178,44 @@ sample file in AOSP, see
<tr>
<td>camera.flashlight</td>
<td>Average power used by the camera flash module when on.</td>
- <td>200mA</td>
- <td></td>
+ <td>200 mA</td>
+ <td> - </td>
</tr>
+<tr>
+ <td>gps.signalqualitybased</td>
+ <td>Additional power used by GPS based on signal strength. This is a multi-value entry,
+ one per signal strength, from weakest to strongest.</td>
+ <td> 30 mA, 10 mA </td>
+ <td> - </td>
+</tr>
<tr>
<td>gps.on</td>
<td>Additional power used when GPS is acquiring a signal.</td>
- <td>50mA</td>
- <td></td>
+ <td>50 mA</td>
+ <td> - </td>
</tr>
<tr>
<td>radio.active</td>
<td>Additional power used when cellular radio is transmitting/receiving.</td>
- <td>100mA-300mA</td>
- <td></td>
+ <td>100 mA-300 mA</td>
+ <td> - </td>
</tr>
<tr>
<td>radio.scanning</td>
<td>Additional power used when cellular radio is paging the tower.</td>
- <td>1.2mA</td>
- <td></td>
+ <td>1.2 mA</td>
+ <td> - </td>
</tr>
<tr>
<td>radio.on</td>
- <td>Additional power used when the cellular radio is on. Multi-value entry,
+ <td>Additional power used when the cellular radio is on. This is a multi-value entry,
one per signal strength (no signal, weak, moderate, strong).</td>
- <td>1.2mA</td>
+ <td>1.2 mA</td>
<td>Some radios boost power when they search for a cell tower and do not
detect a signal. Values can be the same or decrease with increasing signal
strength. If you provide only one value, the same value is used for all
@@ -223,7 +231,7 @@ sample file in AOSP, see
the controller. If there are multiple receive or transmit states, the average
of those states is taken. In addition, the system now collects data for
<a href="#le-bt-scans">Low Energy (LE) and Bluetooth scans</a>.<br><br>Android
- N and later no longer use the Bluetooth power values for bluetooth.active
+ 7.0 and later no longer use the Bluetooth power values for bluetooth.active
(used when playing audio via Bluetooth A2DP) and bluetooth.on (used when
Bluetooth is on but idle).</td>
</tr>
@@ -247,12 +255,19 @@ sample file in AOSP, see
</tr>
<tr>
+ <td>modem.controller.sleep</td>
+ <td> Average current draw (mA) of the modem controller when asleep.</td>
+ <td> 0 mA </td>
+ <td rowspan=5>These values are not estimated, but taken from the data sheet of the controller.
+ If there are multiple receive states, the average of those states is taken. If there are
+ multiple transmit states, specifying a value for each transmit state is supported
+ starting in Android {{ androidPVersionNumber}}.</td>
+</tr>
+
+<tr>
<td>modem.controller.idle</td>
<td>Average current draw (mA) of the modem controller when idle.</td>
<td> - </td>
- <td rowspan=4>These values are not estimated, but taken from the data sheet of
- the controller. If there are multiple receive or transmit states, the average
- of those states is taken.</td>
</tr>
<tr>
@@ -263,8 +278,9 @@ sample file in AOSP, see
<tr>
<td>modem.controller.tx</td>
- <td>Average current draw (mA) of the modem controller when transmitting.</td>
- <td> - </td>
+ <td>Average current draw (mA) of the modem controller when transmitting at different RF power
+ levels. This is a multi-value entry with one value per transmit power level.</td>
+ <td> 100 mA, 200 mA, 300 mA, 400 mA, 500 mA </td>
</tr>
<tr>
@@ -302,8 +318,8 @@ sample file in AOSP, see
<tr>
<td>cpu.speeds</td>
- <td>Multi-value entry that lists each possible CPU speed in KHz.</td>
- <td>125000KHz, 250000KHz, 500000KHz, 1000000KHz, 1500000KHz</td>
+ <td>This is a multi-value entry that lists each possible CPU speed in KHz.</td>
+ <td>125000 KHz, 250000 KHz, 500000 KHz, 1000000 KHz, 1500000 KHz</td>
<td>The number and order of entries must correspond to the mA entries in
cpu.active.</td>
</tr>
@@ -312,15 +328,15 @@ sample file in AOSP, see
<td>cpu.idle</td>
<td>Total power drawn by the system when CPUs (and the SoC) are in system
suspend state.</td>
- <td>3mA</td>
- <td></td>
+ <td>3 mA</td>
+ <td> - </td>
</tr>
<tr>
<td>cpu.awake</td>
<td>Additional power used when CPUs are in scheduling idle state
(kernel idle loop); system is not in system suspend state.</td>
- <td>50mA</td>
+ <td>50 mA</td>
<td>Your platform might have more than one idle state in use with differing
levels of power consumption; choose a representative idle state for longer
periods of scheduler idle (several milliseconds). Examine the power graph on
@@ -331,7 +347,7 @@ sample file in AOSP, see
<tr>
<td>cpu.active</td>
<td>Additional power used by CPUs when running at different speeds.</td>
- <td>100mA, 120mA, 140mA, 160mA, 200mA</td>
+ <td>100 mA, 120 mA, 140 mA, 160 mA, 200 mA</td>
<td>Value represents the power used by the CPU rails when running at different
speeds. Set the max speed in the kernel to each of the allowed speeds and peg
the CPU at that speed. The number and order of entries correspond to the
@@ -352,8 +368,8 @@ sample file in AOSP, see
<tr>
<td>battery.capacity</td>
<td>Total battery capacity in mAh.</td>
- <td>3000mAh</td>
- <td></td>
+ <td>3000 mAh</td>
+ <td> - </td>
</tr>
</table>