自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
「Audio Devices」面板
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
許多 CTS Verifier 音訊測試會驗證各種音訊硬體裝置的功能。「Audio Devices」面板會指出 DUT 支援哪些音訊裝置,以及哪些音訊裝置可供使用。
「Supported Devices」清單會顯示 DUT 可使用的音訊裝置,但不一定已連線,因此無法在測試期間使用。AudioManager.getSupportedDeviceTypes()
是在 SDK 35 中新增的,可傳回支援的裝置類型。
下圖顯示 DUT 支援內建裝置 (例如麥克風、喇叭和耳機)、類比音訊周邊裝置、藍牙音訊周邊裝置和 USB 音訊周邊裝置:
圖 1. 音訊裝置面板顯示支援的裝置。
「可用裝置」清單會顯示可在測試期間使用的音訊裝置,這些裝置可能是內建於 DUT (例如內建喇叭和麥克風),或是已連接 (例如類比耳機或 USB 音訊外接裝置)。
下圖顯示只有內建裝置可供使用,也就是說,沒有任何外部音訊周邊裝置連接至 DUT:
圖 2. 音訊裝置面板顯示可用的裝置。
如果支援的裝置清單與裝置中的硬體 (Inputs) 不符,HAL 提供的音訊政策設定可能有問題。如果可用裝置與已連接至裝置的裝置不符 (輸出裝置),則可能是底層音訊軟體層發生問題。
當音訊周邊裝置連接至 DUT 時,可用裝置清單會更新,以反映設定。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Audio Devices panel\n\n\u003cbr /\u003e\n\nMany CTS Verifier audio tests validate capabilities over a variety of audio\nhardware devices. The **Audio Devices** panel indicates which audio devices are\nsupported by the DUT and which are available for use.\n\nThe **Supported Devices** list shows audio devices that the DUT can use, but\naren't necessarily connected and hence aren't available at testing time.\n[`AudioManager.getSupportedDeviceTypes()`](https://developer.android.com/reference/android/media/AudioManager#getSupportedDeviceTypes(int)),\nadded in SDK 35, returns supported device types.\n\nThe following figure shows that the DUT supports the built-in\ndevices (such as microphone, speaker, and earpiece), analog audio peripherals,\nBluetooth audio peripherals, and USB audio peripherals:\n\n**Figure 1.** Audio Devices panel showing supported devices.\n\nThe **Available Devices** list shows audio devices that can be used at testing\ntime, either because they're built in to the DUT (such as the internal speaker\nand microphone), or are connected (such as an analog headset or USB audio\nperipheral).\n\nThe following figure shows that only the built-in devices are available for use,\nthat is, there are no external audio peripherals connected to the DUT:\n\n**Figure 2.** Audio Devices panel showing available devices.\n\nIf the list of supported devices doesn't match the hardware that is in\nthe device (**Inputs** ), there might be a problem in the audio policy\nconfiguration provided by the HAL. If the available devices don't match what is\nconnected to the device (**Outputs**), there might be a problem with the\nunderlying audio software layer.\n\nWhen audio peripherals are connected to the DUT, the list of available devices\nis updated to reflect the configuration."]]