aboutsummaryrefslogtreecommitdiff
path: root/en/devices/accessories
diff options
context:
space:
mode:
Diffstat (limited to 'en/devices/accessories')
-rw-r--r--en/devices/accessories/headset/usb-adapter.html112
-rw-r--r--en/devices/accessories/headset/usb-device.html124
-rw-r--r--en/devices/accessories/headset/usb-headset-spec.html118
3 files changed, 276 insertions, 78 deletions
diff --git a/en/devices/accessories/headset/usb-adapter.html b/en/devices/accessories/headset/usb-adapter.html
new file mode 100644
index 00000000..4b70bc1d
--- /dev/null
+++ b/en/devices/accessories/headset/usb-adapter.html
@@ -0,0 +1,112 @@
+<html devsite>
+ <head>
+ <title>USB-C-to-Analog Audio Adapter</title>
+ <meta name="project_path" value="/_project.yaml" />
+ <meta name="book_path" value="/_book.yaml" />
+ </head>
+ <body>
+ <!--
+ Copyright 2018 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.
+ -->
+
+
+
+<p>
+While some new Android phones are being produced without a 3.5 mm jack, users
+may still own 3.5 mm headsets that they want to use with those devices. To
+facilitate that, this article specifies a USB-C-to-analog audio adapter spec to
+plug
+<a href="/devices/accessories/headset/plug-headset-spec.html">3.5 mm headsets</a>
+into devices that only have a
+<a href="/devices/accessories/headset/usb-device">USB-C port</a>.</p>
+<p>
+This documentation specifies the minimum requirements: accessory manufacturers
+are encouraged to add features while keeping these requirements in mind.
+</p>
+
+<h2 id="adapter-type">Adapter type</h2>
+<p>
+Only digital-to-analog adapters are allowed. Analog-only adapters following
+<a href="http://www.usb.org/">USB.org's</a> "USB Type-C Cable and Connector
+Specification, Release 1.2, Appendix A" are not supported.
+</p>
+<h2 id="functional-overview">Functional overview</h2>
+<p>
+The adapter allows users to plug their existing 3.5mm accessories into devices
+with USB-C ports. To do this, the adapter supports:
+</p>
+<ul>
+ <li>Stereo analog devices with and without microphones</li>
+ <li>Digital to analog conversion of 2 output channels</li>
+ <li>Analog to digital conversion of 1 input channel</li>
+ <li>Detection of analog device insertion</li>
+ <li>Detection of headset microphone</li>
+ <li>Detection of output impedance</li>
+ <li>Translation of headset button events to HID events</li>
+</ul>
+
+<h2 id="analog-interface">Analog interface</h2>
+<p>
+The adapter shall not present any UAC interface, playback, or capture endpoints
+to the USB host until a device is inserted and properly identified. Depending on
+the type of device detected, the following UAC terminal types must be reported:
+</p>
+
+<ul>
+ <li><strong>Headphones</strong>. Low impedance transducers, &lt; 1 kiloohm, no
+ microphone: 0x0302</li>
+ <li><strong>Headset</strong>. Low impedance transducers with microphone: 0x0402</li>
+ <li><strong>Line in</strong>. High impedance input: 0x603</li>
+ <li><strong>Line out</strong>. High impedance output: 0x604</li>
+ <li><strong>Line in and Line out</strong> or <strong>Line in and Mic</strong>:
+ 0x400</li>
+</ul>
+
+<h2 id="button-functions">Button functions</h2>
+<p>
+The adapter shall convert button events received from the analog interface and
+conforming to the Android
+<a href="/devices/accessories/headset/plug-headset-spec">analog headset
+specification</a> to the following HID events: </p>
+<table>
+ <tr>
+ <th>Function</th>
+ <th>Mappings</th>
+ </tr>
+ <tr>
+ <td>A</td>
+ <td>HID usage page: 0x0C<br>
+ HID usage: 0x0CD </td>
+ </tr>
+ <tr>
+ <td>B </td>
+ <td>HID usage page: 0x0C<br>
+ HID usage: 0x0E9</td>
+ </tr>
+ <tr>
+ <td>C</td>
+ <td>HID usage page: 0x0C<br>
+ HID usage: 0x0EA</td>
+ </tr>
+ <tr>
+ <td>D </td>
+ <td>HID usage page: 0x0C<br>
+ HID usage: 0x0CF</td>
+ </tr>
+</table>
+
+ </body></html>
+
+
diff --git a/en/devices/accessories/headset/usb-device.html b/en/devices/accessories/headset/usb-device.html
new file mode 100644
index 00000000..4cc73939
--- /dev/null
+++ b/en/devices/accessories/headset/usb-device.html
@@ -0,0 +1,124 @@
+<html devsite>
+ <head>
+ <title>USB Headset: Device Specification</title>
+ <meta name="project_path" value="/_project.yaml" />
+ <meta name="book_path" value="/_book.yaml" />
+ </head>
+ <body>
+ <!--
+ Copyright 2017 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.
+ -->
+
+
+
+<p>
+For USB headsets to work seamlessly across the Android ecosystem, Android
+devices must support them uniformly. This documentation specifies USB
+behavior to support USB headsets and adapters across the Android ecosystem.
+</p>
+
+<h2 id="software-mapping">Software mapping</h2>
+<p>
+Compatible USB headsets are required to support compatible HID mappings.
+Device support is required for the following keycode mappings.
+</p>
+
+<table>
+ <tr>
+ <th>Function</th>
+ <th>Mappings</th>
+ <th>Context</th>
+ <th>Behavior</th>
+ </tr>
+ <tr>
+ <td rowspan="6">A</td>
+ <td rowspan="6"><strong>HID usage page</strong>: 0x0C<br>
+ <strong>HID usage</strong>: 0x0CD<br>
+ <strong>Kernel key</strong>: <code>KEY_PLAYPAUSE</code><br>
+ <strong>Android key</strong>: <code>KEYCODE_MEDIA_PLAY_PAUSE</code></td>
+ <td rowspan="2">Media playback</td>
+ <td><strong>Input</strong>: Short press<br>
+ <strong>Output</strong>: Play or pause</td>
+ </tr>
+ <tr>
+ <td><strong>Input</strong>: Long press<br>
+ <strong>Output</strong>: Launch voice command<br>
+ <strong>Sends</strong>:
+ <code>android.speech.action.VOICE_SEARCH_HANDS_FREE</code> if the device
+ is locked or its screen is off. Sends
+ <code>android.speech.RecognizerIntent.ACTION_WEB_SEARCH</code> otherwise</td>
+ </tr>
+ <tr>
+ <td rowspan="2">Incoming call</td>
+ <td><strong>Input</strong>: Short press<br>
+ <strong>Output</strong>: Accept call</td>
+ </tr>
+ <tr>
+ <td><strong>Input</strong>: Long press<br>
+ <strong>Output</strong>: Reject call</td>
+ </tr>
+ <tr>
+ <td rowspan="2">Ongoing call</td>
+ <td><strong>Input</strong>: Short press<br>
+ <strong>Output</strong>: End call</td>
+ </tr>
+ <tr>
+ <td><strong>Input</strong>: Long press<br>
+ <strong>Output</strong>: Mute or unmute microphone</td>
+ </tr>
+ <tr>
+ <td>B</td>
+ <td><strong>HID usage page</strong>: 0x0C<br>
+ <strong>HID usage</strong>: 0x0E9<br>
+ <strong>Kernel key</strong>: <code>KEY_VOLUMEUP</code><br>
+ <strong>Android key</strong>: <code>VOLUME_UP</code></td>
+ <td>Media playback, Ongoing call</td>
+ <td><strong>Input</strong>: Short or long press<br>
+ <strong>Output</strong>: Increases the system or headset volume</td>
+ </tr>
+ <tr>
+ <td>C</td>
+ <td><strong>HID usage page</strong>: 0x0C<br>
+ <strong>HID usage</strong>: 0x0EA<br>
+ <strong>Kernel key</strong>: <code>KEY_VOLUMEDOWN</code><br>
+ <strong>Android key</strong>: <code>VOLUME_DOWN</code></td>
+ <td>Media playback, Ongoing call</td>
+ <td><strong>Input</strong>: Short or long press<br>
+ <strong>Output</strong>: Decreases the system or headset volume</td>
+ </tr>
+ <tr>
+ <td>D</td>
+ <td><strong>HID usage page</strong>: 0x0C<br>
+ <strong>HID usage</strong>: 0x0CF<br>
+ <strong>Kernel key</strong>: <code>KEY_VOICECOMMAND</code><br>
+ <strong>Android key</strong>: <code>KEYCODE_VOICE_ASSIST</code></td>
+ <td>All. Can be triggered in any instance.</td>
+ <td><strong>Input</strong>: Short or long press<br>
+ <strong>Output</strong>: Launch voice command</td>
+ </tr>
+</table>
+
+<h2 id="mechanical">Mechanical</h2>
+<p>
+Device manufacturers should also consult the
+<a href="/devices/audio/usb.html">USB Digital Audio</a> page for more
+information about USB implementation on Android.
+Device manufacturers must also follow the requirements in the
+<a href="/compatibility/android-cdd.html#7_7_usb">USB section</a> of
+the Android CDD.
+</p>
+
+ </body>
+</html>
diff --git a/en/devices/accessories/headset/usb-headset-spec.html b/en/devices/accessories/headset/usb-headset-spec.html
index 3279eee1..9302fe09 100644
--- a/en/devices/accessories/headset/usb-headset-spec.html
+++ b/en/devices/accessories/headset/usb-headset-spec.html
@@ -24,25 +24,34 @@
<p>
-This documentation specifies USB headset buttons behavior to function uniformly
-across the Android ecosystem. Device manufacturers should also consult the
-<a href="/devices/audio/usb.html">USB
-Digital Audio</a> page for more information about USB implementation on Android
-and the <a href="/compatibility/android-cdd.html">Android Compatibility
-Definition Document (CDD)</a> for requirements related to Android devices.
-</p>
-<p>There are also specifications for
-<a href="plug-headset-spec.html">3.5 mm headsets</a> for accessory manufacturers and
-<a href="jack-headset-spec.html">3.5 mm jacks</a> for device manufacturers.
+This documentation specifies some characteristics of USB headsets, so that
+they function uniformly across the Android ecosystem. Only headsets with
+digital USB audio interface are permitted. Purely analog headsets with
+mechanical adaptation to USB-C are not permitted, as per USB Type-C
+specification.
</p>
<p>
This documentation specifies the minimum requirements: accessory manufacturers
are encouraged to add features while keeping these requirements in mind.
</p>
-<h2 id="control-function-mapping">Control-function mapping</h2>
+
+<h2 id="functional-overview">Functional overview</h2>
+<p>
+USB headsets can implement a variety of basic and advanced features. This
+specification only covers mandated basic features:
+</p>
+<ul>
+ <li>Stereo output</li>
+ <li>Optional, but recommended, microphone</li>
+ <li>Function buttons for volume, playback, and call control</li>
+</ul>
+
+<h2 id="control-function">Control functions</h2>
+<p>Headsets can come with varying number of buttons to control specific
+functions, such as volume and play/pause.<p>
<table>
<tr>
- <th>Control Function</th>
+ <th>Control function</th>
<th>Accessory Support</th>
<th>Description</th>
</tr>
@@ -92,82 +101,34 @@ on a second key press).
<h2 id="software-mapping">Software mapping</h2>
<p>
Compatible USB headsets are required to support the following software mappings
-for the headset buttons. Device support is required for the following software
-mappings.
+for the headset buttons. Devices match these HID mappings with the appropriate
+Android keycode.
</p>
<table>
<tr>
<th>Function</th>
<th>Mappings</th>
- <th>Context</th>
- <th>Behavior</th>
- </tr>
- <tr>
- <td rowspan="6">A</td>
- <td rowspan="6"><strong>HID usage page</strong>: 0x0C<br>
- <strong>HID usage</strong>: 0x0CD<br>
- <strong>Kernel key</strong>: <code>KEY_PLAYPAUSE</code><br>
- <strong>Android key</strong>: <code>KEYCODE_MEDIA_PLAY_PAUSE</code></td>
- <td rowspan="2">Media playback</td>
- <td><strong>Input</strong>: Short press<br>
- <strong>Output</strong>: Play or pause</td>
- </tr>
- <tr>
- <td><strong>Input</strong>: Long press<br>
- <strong>Output</strong>: Launch voice command<br>
- <strong>Sends</strong>:
- <code>android.speech.action.VOICE_SEARCH_HANDS_FREE</code> if the device
- is locked or its screen is off. Sends
- <code>android.speech.RecognizerIntent.ACTION_WEB_SEARCH</code> otherwise</td>
- </tr>
- <tr>
- <td rowspan="2">Incoming call</td>
- <td><strong>Input</strong>: Short press<br>
- <strong>Output</strong>: Accept call</td>
</tr>
<tr>
- <td><strong>Input</strong>: Long press<br>
- <strong>Output</strong>: Reject call</td>
- </tr>
- <tr>
- <td rowspan="2">Ongoing call</td>
- <td><strong>Input</strong>: Short press<br>
- <strong>Output</strong>: End call</td>
- </tr>
- <tr>
- <td><strong>Input</strong>: Long press<br>
- <strong>Output</strong>: Mute or unmute microphone</td>
+ <td>A</td>
+ <td>HID usage page: 0x0C<br>
+ HID usage: 0x0CD </td>
</tr>
<tr>
- <td>B</td>
- <td><strong>HID usage page</strong>: 0x0C<br>
- <strong>HID usage</strong>: 0x0E9<br>
- <strong>Kernel key</strong>: <code>KEY_VOLUMEUP</code><br>
- <strong>Android key</strong>: <code>VOLUME_UP</code></td>
- <td>Media playback, Ongoing call</td>
- <td><strong>Input</strong>: Short or long press<br>
- <strong>Output</strong>: Increases the system or headset volume</td>
+ <td>B </td>
+ <td>HID usage page: 0x0C<br>
+ HID usage: 0x0E9</td>
</tr>
<tr>
<td>C</td>
- <td><strong>HID usage page</strong>: 0x0C<br>
- <strong>HID usage</strong>: 0x0EA<br>
- <strong>Kernel key</strong>: <code>KEY_VOLUMEDOWN</code><br>
- <strong>Android key</strong>: <code>VOLUME_DOWN</code></td>
- <td>Media playback, Ongoing call</td>
- <td><strong>Input</strong>: Short or long press<br>
- <strong>Output</strong>: Decreases the system or headset volume</td>
+ <td>HID usage page: 0x0C<br>
+ HID usage: 0x0EA</td>
</tr>
<tr>
- <td>D</td>
- <td><strong>HID usage page</strong>: 0x0C<br>
- <strong>HID usage</strong>: 0x0CF<br>
- <strong>Kernel key</strong>: <code>KEY_VOICECOMMAND</code><br>
- <strong>Android key</strong>: <code>KEYCODE_VOICE_ASSIST</code></td>
- <td>All. Can be triggered in any instance.</td>
- <td><strong>Input</strong>: Short or long press<br>
- <strong>Output</strong>: Launch voice command</td>
+ <td>D </td>
+ <td>HID usage page: 0x0C<br>
+ HID usage: 0x0CF</td>
</tr>
</table>
@@ -176,16 +137,17 @@ collection. For accessories without a microphone, use Headphone (Usage
Page: Consumer (0x0C), Usage: Headphone (0x05)). For accesories with a
microphone, use Headset (Usage Page: Telephony (0x0B), Usage: Headset (0x05)).</p>
+<h2 id="output-level">Output level</h2>
+<p>
+The maximum sound pressure level shall comply to any regulatory requirement in
+the country of destination.
+</p>
+
<h2 id="mechanical">Mechanical</h2>
<p>
Accessory manufacturers must follow the requirements for USB connectors
as specified by <a href="http://www.usb.org/">USB.org</a>.
</p>
-<p>
-Device manufacturers must follow the requirements in the
-<a href="/compatibility/android-cdd.html#7_7_usb">USB section</a> of
-the Android CDD.
-</p>
</body>
</html>