自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
USB-C 型转模拟耳机插孔转换器
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
尽管一些新的 Android 手机在出厂时并未配备 3.5 毫米耳机插孔,但用户可能仍会想要在这类设备上使用 3.5 毫米耳机。为此,本文详细介绍了 USB-C 型转模拟音频适配器规范,协助用户将 3.5 毫米耳机插入只提供 USB-C 端口的设备。
本文档给出的是最低要求,我们鼓励配件制造商在满足这些要求的基础上添加新的功能。
适配器类型
只允许使用数字转模拟适配器。不支持遵循 USB.org 的“USB C 型数据线和连接器规范 - 修订版 1.2,附录 A”相关规定的“仅模拟”适配器。
功能概览
该适配器可让用户将其现有的 3.5 毫米配件插入带 USB-C 端口的设备。为此,该适配器支持:
- 立体声模拟设备(无论是否带麦克风)
- 从数字到模拟的转换(2 个输出通道)
- 从模拟到数字的转换(1 个输入通道)
- 检测模拟设备插入
- 检测耳机麦克风
- 检测输出阻抗
- 将耳机按钮事件转换为 HID 事件
模拟接口
在插入和正确识别设备之前,适配器不得向 USB 主机提供任何 UAC 接口、播放端点或捕获端点。根据检测到的设备类型,必须报告以下 UAC 终端类型:
- 头戴式耳机。低阻抗换能器,< 1 千欧,无麦克风:0x0302
- 耳机。带麦克风的低阻抗变频器:0x0402
- 线路输入。高阻抗输入:0x603
- 线路输出。高阻抗输出:0x604
- 线路输入和线路输出或线路输入和麦克风:0x400
适配器应将从模拟接口接收的按钮事件转换为以下 HID 事件(在遵循 Android 模拟耳机规范的前提下):
函数 |
映射 |
A |
HID 用途页:0x0C
HID 用途:0x0CD |
B |
HID 用途页:0x0C
HID 用途:0x0E9 |
C |
HID 用途页:0x0C
HID 用途:0x0EA |
D |
HID 用途页:0x0C
HID 用途:0x0CF |
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# USB-C-to-analog audio adapter\n\nWhile some new Android phones are being produced without a 3.5 mm jack, users\nmay still own 3.5 mm headsets that they want to use with those devices. To\nfacilitate that, this article specifies a USB-C-to-analog audio adapter spec to\nplug\n[3.5 mm headsets](/docs/core/interaction/accessories/headset/plug-headset-spec)\ninto devices that only have a\n[USB-C port](/docs/core/interaction/accessories/headset/usb-device).\n\n\nThis documentation specifies the minimum requirements: accessory manufacturers\nare encouraged to add features while keeping these requirements in mind.\n\nAdapter type\n------------\n\n\nOnly digital-to-analog adapters are allowed. Analog-only adapters following\n[USB.org's](http://www.usb.org/) \"USB Type-C Cable and Connector\nSpecification, Release 1.2, Appendix A\" are not supported.\n\nFunctional overview\n-------------------\n\n\nThe adapter allows users to plug their existing 3.5mm accessories into devices\nwith USB-C ports. To do this, the adapter supports:\n\n- Stereo analog devices with and without microphones\n- Digital to analog conversion of 2 output channels\n- Analog to digital conversion of 1 input channel\n- Detection of analog device insertion\n- Detection of headset microphone\n- Detection of output impedance\n- Translation of headset button events to HID events\n\nAnalog interface\n----------------\n\n\nThe adapter shall not present any UAC interface, playback, or capture endpoints\nto the USB host until a device is inserted and properly identified. Depending on\nthe type of device detected, the following UAC terminal types must be reported:\n\n- **Headphones**. Low impedance transducers, \\\u003c 1 kiloohm, no microphone: 0x0302\n- **Headset**. Low impedance transducers with microphone: 0x0402\n- **Line in**. High impedance input: 0x603\n- **Line out**. High impedance output: 0x604\n- **Line in and Line out** or **Line in and Mic**: 0x400\n\nButton functions\n----------------\n\n\nThe adapter shall convert button events received from the analog interface and\nconforming to the Android\n[analog headset\nspecification](/docs/core/interaction/accessories/headset/plug-headset-spec) to the following HID events:\n\n| Function | Mappings |\n|----------|---------------------------------------|\n| A | HID usage page: 0x0C HID usage: 0x0CD |\n| B | HID usage page: 0x0C HID usage: 0x0E9 |\n| C | HID usage page: 0x0C HID usage: 0x0EA |\n| D | HID usage page: 0x0C HID usage: 0x0CF |"]]