ตั้งแต่วันที่ 27 มีนาคม 2025 เป็นต้นไป เราขอแนะนำให้ใช้ android-latest-release
แทน aosp-main
เพื่อสร้างและมีส่วนร่วมใน AOSP โปรดดูข้อมูลเพิ่มเติมที่หัวข้อการเปลี่ยนแปลงใน AOSP
แผงอุปกรณ์เสียง
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
การทดสอบเสียงของ CTS Verifier จำนวนมากจะตรวจสอบความสามารถของอุปกรณ์ฮาร์ดแวร์เสียงที่หลากหลาย แผงอุปกรณ์เสียงจะระบุอุปกรณ์เสียงที่อุปกรณ์ทดสอบรองรับและอุปกรณ์เสียงที่พร้อมใช้งาน
รายการอุปกรณ์ที่รองรับแสดงอุปกรณ์เสียงที่อุปกรณ์ทดสอบใช้ได้ แต่ไม่จำเป็นต้องเชื่อมต่ออยู่และอาจไม่พร้อมใช้งานขณะทดสอบ
AudioManager.getSupportedDeviceTypes()
ที่เพิ่มใน SDK 35 จะแสดงผลประเภทอุปกรณ์ที่รองรับ
รูปภาพต่อไปนี้แสดงให้เห็นว่า DUT รองรับอุปกรณ์ในตัว (เช่น ไมโครโฟน ลำโพง และหูฟัง) อุปกรณ์ต่อพ่วงเสียงแบบอนาล็อก อุปกรณ์ต่อพ่วงเสียงบลูทูธ และอุปกรณ์ต่อพ่วงเสียง USB
รูปที่ 1 แผงอุปกรณ์เสียงที่แสดงอุปกรณ์ที่รองรับ
รายการอุปกรณ์ที่ใช้ได้จะแสดงอุปกรณ์เสียงที่ใช้ได้ในขณะทดสอบ เนื่องจากมีอยู่ใน DUT (เช่น ลำโพงและไมโครโฟนภายใน) หรือเชื่อมต่ออยู่ (เช่น ชุดหูฟังอนาล็อกหรืออุปกรณ์ต่อพ่วงเสียง USB)
รูปภาพต่อไปนี้แสดงให้เห็นว่ามีเพียงอุปกรณ์ในตัวเท่านั้นที่พร้อมใช้งาน นั่นคือไม่มีอุปกรณ์ต่อพ่วงเสียงภายนอกที่เชื่อมต่อกับ DUT
รูปที่ 2 แผงอุปกรณ์เสียงที่แสดงอุปกรณ์ที่ใช้ได้
หากรายการอุปกรณ์ที่รองรับไม่ตรงกับฮาร์ดแวร์ที่อยู่ในอุปกรณ์ (อินพุต) แสดงว่าอาจมีปัญหาในการกำหนดค่านโยบายเสียงที่ HAL ระบุ หากอุปกรณ์ที่พร้อมใช้งานไม่ตรงกับอุปกรณ์ที่เชื่อมต่อกับอุปกรณ์ (เอาต์พุต) แสดงว่าอาจมีปัญหาเกี่ยวกับเลเยอร์ซอฟต์แวร์เสียงพื้นฐาน
เมื่อเชื่อมต่ออุปกรณ์ต่อพ่วงเสียงกับ DUT แล้ว รายชื่ออุปกรณ์ที่พร้อมใช้งานจะอัปเดตให้สอดคล้องกับการกำหนดค่า
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[[["เข้าใจง่าย","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 UTC"],[],[],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."]]