Docs: Add Near Ultrasound CTS doc and associated images

Bug: 23703201
Change-Id: Ib34232ea2e290fd3402ed5172c0f0fb0be775805
diff --git a/src/compatibility/compatibility_toc.cs b/src/compatibility/compatibility_toc.cs
index 1b8a503..d69bc28 100644
--- a/src/compatibility/compatibility_toc.cs
+++ b/src/compatibility/compatibility_toc.cs
@@ -51,8 +51,9 @@
             </a>
             </div>
            <ul>
-            <li><a href="<?cs var:toroot ?>compatibility/cts/rotation-vector.html">Rotation Vector Crosscheck</a></li>
             <li><a href="<?cs var:toroot ?>compatibility/cts/camera-hal.html">Camera HAL Testing</a></li>
+            <li><a href="<?cs var:toroot ?>compatibility/cts/near-ultrasound.html">Near Ultrasound Tests</a></li>
+            <li><a href="<?cs var:toroot ?>compatibility/cts/rotation-vector.html">Rotation Vector Crosscheck</a></li>
            </ul>
           </li>
           <li><a href="<?cs var:toroot ?>compatibility/cts/interpret.html">Interpret Results</a></li>
diff --git a/src/compatibility/cts/images/Near1.png b/src/compatibility/cts/images/Near1.png
new file mode 100644
index 0000000..56652f3
--- /dev/null
+++ b/src/compatibility/cts/images/Near1.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near10.png b/src/compatibility/cts/images/Near10.png
new file mode 100644
index 0000000..9c17c16
--- /dev/null
+++ b/src/compatibility/cts/images/Near10.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near11.png b/src/compatibility/cts/images/Near11.png
new file mode 100644
index 0000000..9f6805f
--- /dev/null
+++ b/src/compatibility/cts/images/Near11.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near12.png b/src/compatibility/cts/images/Near12.png
new file mode 100644
index 0000000..aa7f68d
--- /dev/null
+++ b/src/compatibility/cts/images/Near12.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near13.png b/src/compatibility/cts/images/Near13.png
new file mode 100644
index 0000000..a0493c4
--- /dev/null
+++ b/src/compatibility/cts/images/Near13.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near14.png b/src/compatibility/cts/images/Near14.png
new file mode 100644
index 0000000..529c8d8
--- /dev/null
+++ b/src/compatibility/cts/images/Near14.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near15.png b/src/compatibility/cts/images/Near15.png
new file mode 100644
index 0000000..77ddf43
--- /dev/null
+++ b/src/compatibility/cts/images/Near15.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near16.png b/src/compatibility/cts/images/Near16.png
new file mode 100644
index 0000000..de211ca
--- /dev/null
+++ b/src/compatibility/cts/images/Near16.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near17.png b/src/compatibility/cts/images/Near17.png
new file mode 100644
index 0000000..f341ff9
--- /dev/null
+++ b/src/compatibility/cts/images/Near17.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near18.png b/src/compatibility/cts/images/Near18.png
new file mode 100644
index 0000000..deb377e
--- /dev/null
+++ b/src/compatibility/cts/images/Near18.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near19.png b/src/compatibility/cts/images/Near19.png
new file mode 100644
index 0000000..1d2b8d6
--- /dev/null
+++ b/src/compatibility/cts/images/Near19.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near2.png b/src/compatibility/cts/images/Near2.png
new file mode 100644
index 0000000..3bfc2b4
--- /dev/null
+++ b/src/compatibility/cts/images/Near2.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near20.png b/src/compatibility/cts/images/Near20.png
new file mode 100644
index 0000000..6b41202
--- /dev/null
+++ b/src/compatibility/cts/images/Near20.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near21.png b/src/compatibility/cts/images/Near21.png
new file mode 100644
index 0000000..d10fe63
--- /dev/null
+++ b/src/compatibility/cts/images/Near21.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near22.png b/src/compatibility/cts/images/Near22.png
new file mode 100644
index 0000000..3535f6f
--- /dev/null
+++ b/src/compatibility/cts/images/Near22.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near23.png b/src/compatibility/cts/images/Near23.png
new file mode 100644
index 0000000..676f77f
--- /dev/null
+++ b/src/compatibility/cts/images/Near23.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near24.png b/src/compatibility/cts/images/Near24.png
new file mode 100644
index 0000000..3c420d9
--- /dev/null
+++ b/src/compatibility/cts/images/Near24.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near3.png b/src/compatibility/cts/images/Near3.png
new file mode 100644
index 0000000..1e38440
--- /dev/null
+++ b/src/compatibility/cts/images/Near3.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near4.png b/src/compatibility/cts/images/Near4.png
new file mode 100644
index 0000000..4a0cc7f
--- /dev/null
+++ b/src/compatibility/cts/images/Near4.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near5.png b/src/compatibility/cts/images/Near5.png
new file mode 100644
index 0000000..331bcc5
--- /dev/null
+++ b/src/compatibility/cts/images/Near5.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near6.png b/src/compatibility/cts/images/Near6.png
new file mode 100644
index 0000000..7ac45ad
--- /dev/null
+++ b/src/compatibility/cts/images/Near6.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near7.png b/src/compatibility/cts/images/Near7.png
new file mode 100644
index 0000000..04451bd
--- /dev/null
+++ b/src/compatibility/cts/images/Near7.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near8.png b/src/compatibility/cts/images/Near8.png
new file mode 100644
index 0000000..80911c2
--- /dev/null
+++ b/src/compatibility/cts/images/Near8.png
Binary files differ
diff --git a/src/compatibility/cts/images/Near9.png b/src/compatibility/cts/images/Near9.png
new file mode 100644
index 0000000..f092091
--- /dev/null
+++ b/src/compatibility/cts/images/Near9.png
Binary files differ
diff --git a/src/compatibility/cts/near-ultrasound.jd b/src/compatibility/cts/near-ultrasound.jd
new file mode 100644
index 0000000..97922f6
--- /dev/null
+++ b/src/compatibility/cts/near-ultrasound.jd
@@ -0,0 +1,186 @@
+page.title=Near Ultrasound tests
+@jd:body
+
+<!--
+    Copyright 2015 The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<div id="qv-wrapper">
+  <div id="qv">
+    <h2>In this document</h2>
+    <ol id="auto-toc">
+    </ol>
+  </div>
+</div>
+
+<p>This document contains steps for conducting near ultrasound (formerly known
+as hifi ultrasound) microphone and speaker tests. See the <a
+href="{@docRoot}devices/audio/index.html">Audio</a> section for general audio
+implementation instuctions.</p>
+
+<h2 id=ultrasound_microphone_tests>Near Ultrasound Microphone Tests</h2>
+
+<p>Prerequisites: Prepare two devices, one as the test device, one as the reference
+device. The reference can be Nexus 6, Nexus 5, or any device that is known to
+be able to produce near ultrasound sound.</p>
+<table>
+ <tr>
+    <td width="50%">Step 1: Open Near Ultrasound Microphone Tests on both devices</td>
+    <td width="50%"></td>
+ </tr>
+ <tr>
+    <td><img src="images/Near1.png" alt="Mic step 1, test device" width="300"
+        id="mic_step1_test_device" />Test device</td>
+    <td><img src="images/Near2.png" alt="Mic step 1, reference device" width="300"
+        id="mic_step1_ref_device" />Reference device</td>
+ </tr>
+ <tr>
+    <td>Step 2: After opening the test, press RECORD on the test device, then quickly
+press PLAY on the reference device.</td>
+    <td></td>
+ </tr>
+ <tr>
+    <td><img src="images/Near3.png" alt="Mic step 2, test device" width="300"
+        id="mic_step2_test_device" />Test device</td>
+    <td><img src="images/Near4.png" alt="Mic step 2, reference device" width="300"
+        id="mic_step2_ref_device" />Reference device</td>
+ </tr>
+ <tr>
+    <td>Step 3: Wait for the test to finish. While waiting, the devices should look
+like the following screenshots. Do nothing until you see the screens shown in
+Step 4.</td>
+    <td></td>
+ </tr>
+ <tr>
+    <td><img src="images/Near5.png" alt="Mic step 3, test device" width="300"
+        id="mic_step3_test_device" />Test device</td>
+    <td><img src="images/Near6.png" alt="Mic step 3, reference device" width="300"
+        id="mic_step3_ref_device" />Reference device</td>
+ </tr>
+ <tr>
+    <td>Step 4a: On the test device, if text PASS is shown, report passed by pressing
+the green button.</td>
+    <td></td>
+ </tr>
+ <tr>
+    <td><img src="images/Near7.png" alt="Mic step 4a, test device" width="300"
+        id="mic_step4a_test_device" />Test device</td>
+    <td><img src="images/Near8.png" alt="Mic step 4a, reference device" width="300"
+        id="mic_step4a_ref_device" />Reference device</td>
+ </tr>
+ <tr>
+    <td>Step 4b: On the test device, if text FAIL is shown, report failed by pressing
+the red button.Afterward you can repeat from step 1 to repeat the test if desired.</td>
+    <td></td>
+ </tr>
+ <tr>
+    <td><img src="images/Near9.png" alt="Mic step 4b, test device" width="300"
+        id="mic_step4b_test_device" />Test device</td>
+    <td><img src="images/Near10.png" alt="Mic step 4b, reference device" width="300"
+        id="mic_step4b_ref_device" />Reference device</td>
+ </tr>
+ <tr>
+    <td>Extra step: This step is not required.You can plot the calculated
+response using the PLOT button on the test device.</td>
+    <td></td>
+ </tr>
+ <tr>
+    <td><img src="images/Near11.png" alt="Mic extra step 1, test device" width="300"
+        id="mic_extrastep1_test_device" /><img src="images/Near12.png" alt="Mic extra
+        step 2, test device" width="300" id="mic_extrastep2_test_device" />Test
+        device</td>
+    <td>Reference device N/A</td>
+ </tr>
+</table>
+
+
+<h2 id=ultrasound_speaker_tests>Near Ultrasound Speaker Tests</h2>
+
+
+<p>Step 0: Prepare two devices, one as the test device, one as the reference
+device. The reference can be Nexus 6, Nexus 5, or any device that is known to
+be able to record near ultrasound sound.</p>
+<table>
+ <tr>
+    <td width="50%">Step 1: Open Near Ultrasound Speaker Tests on both devices</td>
+    <td width="50%"></td>
+ </tr>
+ <tr>
+    <td><img src="images/Near13.png" alt="Speaker step 1, test device" width="300"
+        id="speaker_step1_test_device" />Test device</td>
+    <td><img src="images/Near14.png" alt="Speaker step 1, reference device" width="300"
+        id="speaker_step1_ref_device" />Reference device</td>
+ </tr>
+ <tr>
+    <td>Step 2: After opening the test, press RECORD on the reference device, then
+quickly press PLAY on the test device.</td>
+    <td></td>
+ </tr>
+ <tr>
+    <td><img src="images/Near15.png" alt="Speaker step 2, test device" width="300"
+        id="speaker_step2_test_device" />Test device</td>
+    <td><img src="images/Near16.png" alt="Speaker step 2, reference device" width="300"
+        id="speaker_step2_ref_device" />Reference device</td>
+ </tr>
+ <tr>
+    <td>Step 3: Wait for the test to finish. While waiting, the devices should look
+like the following screenshots. Do nothing until you see the screens shown in
+Step 4.</td>
+    <td></td>
+ </tr>
+ <tr>
+    <td><img src="images/Near17.png" alt="Speaker step 3, test device" width="300"
+        id="speaker_step3_test_device" />Test device</td>
+    <td><img src="images/Near18.png" alt="Speaker step 3, reference device" width="300"
+        id="speaker_step3_ref_device" />Reference device</td>
+ </tr>
+ <tr>
+    <td>Step 4: When you see the popup on the reference device, press OK on the test
+device.</td>
+    <td></td>
+ </tr>
+ <tr>
+    <td><img src="images/Near19.png" alt="Speaker step 4, test device" width="300"
+        id="speaker_step4_test_device" />Test device</td>
+    <td><img src="images/Near20.png" alt="Speaker step 4, reference device" width="300"
+        id="speaker_step4_ref_device" />Reference device</td>
+ </tr>
+ <tr>
+    <td>Step 5a: On the reference device, if text PASS is shown, report passed by
+pressing the green button on the test device.</td>
+    <td></td>
+ </tr>
+ <tr>
+    <td><img src="images/Near21.png" alt="Speaker step 5a, test device" width="300"
+        id="speaker_step5a_test_device" />Test device</td>
+    <td><img src="images/Near22.png" alt="Speaker step 5a, reference device" width="300"
+        id="speaker_step5a_ref_device" />Reference device</td>
+ </tr>
+ <tr>
+    <td>Step 5b: On the reference device, if text FAIL is shown, report failed by
+pressing the red button on the test device.Afterward you can repeat from step 1 to repeat the test if desired.</td>
+    <td></td>
+ </tr>
+ <tr>
+    <td><img src="images/Near23.png" alt="Speaker step 5b, test device" width="300"
+        id="speaker_step5b_test_device" />Test device</td>
+    <td><img src="images/Near24.png" alt="Speaker step 5b, reference device" width="300"
+        id="speaker_step5b_ref_device" />Reference device</td>
+ </tr>
+ <tr>
+    <td>Extra step: This step is not required. You can plot the calculated response using the PLOT button on the reference
+device. See the instructions on the Near Ultrasound Microphone Test.</td>
+    <td></td>
+ </tr>
+</table>