Merge "Update audio terminology"
diff --git a/src/devices/audio/funplug.jd b/src/devices/audio/funplug.jd
index 6245e95..443f3a6 100644
--- a/src/devices/audio/funplug.jd
+++ b/src/devices/audio/funplug.jd
@@ -1,4 +1,4 @@
-page.title=FunPlug Audio Dongle
+page.title=Audio Loopback Dongle
 @jd:body
 
 <!--
@@ -29,30 +29,30 @@
 <a href="http://en.wikipedia.org/wiki/Dongle">dongle</a>
 for the
 <a href="http://en.wikipedia.org/wiki/Phone_connector_(audio)">headset connector</a>
-that we call the "FunPlug."
+that we call the "Dr. Rick O'Rang audio loopback dongle."
 The Chrome hardware team designed this circuit and plug for functional testing;
 however it has many other uses too.  The Android audio team uses it to measure
 <a href="latency_measure.html#measuringRoundTrip">round-trip audio latency</a>,
 via the Larsen effect (feedback loop).
 </p>
 
-<h2 id="funplugCircuit">FunPlug circuit</h2>
+<h2 id="funplugCircuit">Circuit</h2>
 
-<img src="images/funplug_circuit.png" alt="FunPlug circuit" id="figure1" />
+<img src="images/loopback_circuit.png" alt="circuit" id="figure1" />
 <p class="img-caption">
-  <strong>Figure 1.</strong> FunPlug circuit diagram
+  <strong>Figure 1.</strong> circuit diagram
 </p>
 
 <p>
 To ensure that the output signal will not overload the microphone input,
 we cut it down by about 20dB.
 The resistor loads tell the microphone polarity switch that
-the FunPlug is a US/CTIA pinout Tip Ring Ring Shield (TRRS) plug.
+the audio loopback dongle is a US/CTIA pinout Tip Ring Ring Shield (TRRS) plug.
 </p>
 
-<h2 id="funplugAssembled">FunPlug assembled</h2>
+<h2 id="funplugAssembled">Assembled</h2>
 
-<img src="images/funplug_assembled.jpg" alt="FunPlug fully assembled" id="figure2" />
+<img src="images/loopback_assembled.jpg" alt="fully assembled" id="figure2" />
 <p class="img-caption">
-  <strong>Figure 2.</strong> Assembled FunPlug
+  <strong>Figure 2.</strong> Assembled
 </p>
diff --git a/src/devices/audio/images/funplug_assembled.jpg b/src/devices/audio/images/loopback_assembled.png
similarity index 100%
rename from src/devices/audio/images/funplug_assembled.jpg
rename to src/devices/audio/images/loopback_assembled.png
Binary files differ
diff --git a/src/devices/audio/images/funplug_circuit.png b/src/devices/audio/images/loopback_circuit.png
similarity index 100%
rename from src/devices/audio/images/funplug_circuit.png
rename to src/devices/audio/images/loopback_circuit.png
Binary files differ
diff --git a/src/devices/audio/latency_measure.jd b/src/devices/audio/latency_measure.jd
index 0b1724a..ffefda2 100644
--- a/src/devices/audio/latency_measure.jd
+++ b/src/devices/audio/latency_measure.jd
@@ -129,10 +129,10 @@
 located in the <code>audio_utils</code> library.
 </p>
 
-<h3 id="funplug">FunPlug</h3>
+<h3 id="funplug">Audio Loopback Dongle</h3>
 
 <p>
-  The <a href="funplug.html">FunPlug</a> dongle is handy for
+  The <a href="funplug.html">Dr. Rick O'Rang audio loopback dongle</a> is handy for
   measuring round-trip latency over the headset connector.
   The image below demonstrates the result of injecting an impulse
   into the loop once, and then allowing the feedback loop to oscillate.
diff --git a/src/devices/audio/terminology.jd b/src/devices/audio/terminology.jd
index 53c719c..11a3bbb 100644
--- a/src/devices/audio/terminology.jd
+++ b/src/devices/audio/terminology.jd
@@ -54,6 +54,15 @@
 Compare to "gain."
 </dd>
 
+<dt>audiophile</dt>
+<dd>
+An <a href="http://en.wikipedia.org/wiki/Audiophile">audiophile</a>
+is an individual who is concerned with a superior music
+reproduction experience, especially someone willing to make tradeoffs
+(of expense, component size, room design, etc.) beyond what an ordinary
+person might choose.
+</dd>
+
 <dt>bits per sample or bit depth</dt>
 <dd>
 Number of bits of information per sample.
@@ -73,6 +82,24 @@
 Compare to "upmixing."
 </dd>
 
+<dt>DSD</dt>
+<dd>
+A proprietary audio encoding based on
+<a href="http://en.wikipedia.org/wiki/Pulse-density_modulation">pulse-density modulation</a>.
+Whereas PCM encodes a waveform as a sequence of individual audio samples of multiple bits,
+DSD encodes a waveform as a sequence of bits at a very high sample rate.
+For DSD, there is no concept of "samples" in the conventional PCM sense.
+Both PCM and DSD represent multiple channels by independent sequences.
+DSD is better suited to content distribution than as an internal representation for processing,
+as it can be difficult to apply traditional DSP algorithms to DSD.
+DSD is used in
+<a href="http://en.wikipedia.org/wiki/Super_Audio_CD">Super Audio CD</a>
+(SACD), and in DSD over PCM (DoP) for USB.
+See the Wikipedia article
+<a href="http://en.wikipedia.org/wiki/Direct_Stream_Digital">Digital Stream Digital<a/>
+for more information.
+</dd>
+
 <dt>duck</dt>
 <dd>
 To temporarily reduce the volume of one stream, when another stream
@@ -108,11 +135,27 @@
 Compare to "attenuation."
 </dd>
 
+<dt>HD audio</dt>
+<dd>
+High Definition audio, a synonym for "high-resolution audio".
+Not to be confused with Intel High Definition Audio.
+</dd>
+
 <dt>Hz</dt>
 <dd>
 The units for sample rate or frame rate.
 </dd>
 
+<dt>high-resolution audio</dt>
+<dd>
+There is no standard definition, but high-resolution usually means any representation
+with greater bit-depth and sample rate than CDs (which are stereo 16-bit PCM at 44.1 kHz),
+and with no lossy data compression applied.
+Equivalent to "HD audio".  See the Wikipedia article
+<a href="http://en.wikipedia.org/wiki/High-resolution_audio">high-resolution audio</a>
+for more information.
+</dd>
+
 <dt>latency</dt>
 <dd>
 Time delay as a signal passes through a system.
@@ -144,6 +187,21 @@
 ADC and DAC are lossy conversions with respect to amplitude.  See also "transparency."
 </dd>
 
+<dt>lossless</dt>
+<dd>
+A <a href="http://en.wikipedia.org/wiki/Lossless_compression">lossless data compression</a>
+algorithm preserves bit accuracy across encoding and decoding.
+The result of decoding any previously encoded data is equivalent to the original data.
+Examples of lossless audio content distribution formats include
+<a href="http://en.wikipedia.org/wiki/Compact_disc">CDs</a>, PCM within
+<a href="http://en.wikipedia.org/wiki/WAV">WAV</a>, and
+<a href="http://en.wikipedia.org/wiki/FLAC">FLAC</a>.
+Note that the authoring process may reduce the bit depth or sample rate from that of the
+<a href="http://en.wikipedia.org/wiki/Audio_mastering">masters</a>.
+Distribution formats that preserve the resolution and bit accuracy of masters
+are the subject of "high-resolution audio".
+</dd>
+
 <dt>mono</dt>
 <dd>
 One channel.
diff --git a/src/devices/audio/usb.jd b/src/devices/audio/usb.jd
index e805ac4..147bfa3 100644
--- a/src/devices/audio/usb.jd
+++ b/src/devices/audio/usb.jd
@@ -552,7 +552,10 @@
 
 <ul>
 <li>design hardware to support USB host mode</li>
-<li>enable all kernel features needed: USB host mode, USB audio, isochronous transfer mode</li>
+<li>enable generic USB host support at the framework level
+via the <code>android.hardware.usb.host.xml</code> feature flag</li>
+<li>enable all kernel features needed: USB host mode, USB audio, isochronous transfer mode;
+see <a href="{@docRoot}/devices/tech/kernel.html">Android Kernel Configuration</a></li>
 <li>keep up-to-date with recent kernel releases and patches;
 despite the noble goal of class compliance, there are extant audio peripherals
 with <a href="http://en.wiktionary.org/wiki/quirk">quirks</a>,
diff --git a/src/devices/devices_toc.cs b/src/devices/devices_toc.cs
index 2083936..23d7379 100644
--- a/src/devices/devices_toc.cs
+++ b/src/devices/devices_toc.cs
@@ -45,7 +45,7 @@
               <li><a href="<?cs var:toroot ?>devices/audio/latency_measure.html">Measure</a></li>
               <li><a href="<?cs var:toroot ?>devices/audio/latency_design.html">Design</a></li>
               <li><a href="<?cs var:toroot ?>devices/audio/testing_circuit.html">Light Testing Circuit</a></li>
-              <li><a href="<?cs var:toroot ?>devices/audio/funplug.html">FunPlug Audio Dongle</a></li>
+              <li><a href="<?cs var:toroot ?>devices/audio/funplug.html">Loopback Audio Dongle</a></li>
             </ul>
           </li>
           <li><a href="<?cs var:toroot ?>devices/audio/avoiding_pi.html">Priority Inversion</a></li>
diff --git a/src/devices/tech/kernel.jd b/src/devices/tech/kernel.jd
index da749c5..637c5c4 100644
--- a/src/devices/tech/kernel.jd
+++ b/src/devices/tech/kernel.jd
@@ -288,3 +288,11 @@
 CONFIG_TIMER_STATS=y
 CONFIG_SCHED_TRACER=y
 </pre>
+
+<h3>For USB host mode audio</h3>
+
+<pre>
+CONFIG_SND_USB=y
+CONFIG_SND_USB_AUDIO=y
+# CONFIG_USB_AUDIO is for a peripheral mode (gadget) driver
+</pre>