ตั้งแต่วันที่ 27 มีนาคม 2025 เป็นต้นไป เราขอแนะนำให้ใช้ android-latest-release
แทน aosp-main
เพื่อสร้างและมีส่วนร่วมใน AOSP โปรดดูข้อมูลเพิ่มเติมที่หัวข้อการเปลี่ยนแปลงใน AOSP
การติดตามการเคลื่อนไหวของศีรษะผ่าน LE Audio
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เสียงบลูทูธ (BT) พลังงานต่ำ (LE) เปิดตัวกลไกการขนส่งแบบตรรกะตามการเชื่อมต่อแบบแอซิงโครนัส (LE-ACL) และแบบไอโซโครนัส (LE-ISO) สำหรับข้อมูลการติดตามการเคลื่อนไหวของศีรษะ (HT)
Android 15 รองรับการปรับโหมดเวลาในการตอบสนองสำหรับ HT โดยขึ้นอยู่กับว่าใช้กลไกการขนส่ง LE-ACL หรือ LE-ISO หรือไม่
หน้านี้อธิบายวิธีที่เฟรมเวิร์กเสียง, HAL เสียง และกองซ้อนบลูทูธทำงานร่วมกันเพื่อค้นหาและเลือกกลไกการรับส่ง LE-ACL หรือ LE-ISO ที่โฮสต์และชุดหูฟังรองรับ
การรองรับ LE-ACL และ LE-ISO
Android 15 รองรับกลไกการขนส่ง LE-ACL และ LE-ISO โดยใช้พร็อพเพอร์ตี้ของระบบที่ระบุโดยผู้ให้บริการ โหมดเวลาในการตอบสนองของ HAL เสียง และโหมดการเชื่อมต่อโปรแกรมจำลองเสียงเชิงพื้นที่
พร็อพเพอร์ตี้ของระบบ
การใช้งานของผู้ให้บริการโทรศัพท์จะแสดงกลไกการขนส่งที่รองรับในพร็อพเพอร์ตี้ระบบ bluetooth.core.le.dsa_transport_preference
ค่าดังกล่าวเป็นรายการสตริงที่คั่นด้วยคอมมา ซึ่งแสดงตัวขนส่งที่รองรับตามลำดับความชอบ ดังนี้
le-acl
: การรับส่ง LE-ACL เมื่อมีการรายงานข้อมูลหน่วยวัดความเฉื่อย (IMU) ผ่านกองเซ็นเซอร์
iso-hw
: การรับส่ง ISO ที่มีความสามารถในการส่งข้อมูล HT จากตัวควบคุมบลูทูธไปยังโปรแกรมจำลองเสียงใน DSP เสียงโดยตรง
iso-sw
: การรับส่ง ISO ที่ไม่มีความสามารถในการส่งผ่านข้อมูลแบบอุโมงค์ เมื่อมีการรายงานข้อมูล IMU ผ่านกองเซ็นเซอร์
โหมดเวลาในการตอบสนอง
ในกรณีของเสียง LE ของ BT กลไกสําหรับสแต็ก BT เพื่อระบุโหมดเวลาในการตอบสนองที่รองรับไปยัง HAL เสียงและเฟรมเวิร์กเสียงจะเหมือนกับที่กําหนดไว้สําหรับ BT Classic (A2DP) HAL เสียงจะรายงานโหมดเวลาในการตอบสนองที่รองรับตามอุปกรณ์เสียงที่เลือกอยู่ในปัจจุบัน
การติดตั้งใช้งาน A2DP รองรับเฉพาะโหมด FREE
และ LOW_LATENCY
ในทางตรงกันข้าม สำหรับเสียง BT LE ระบบจะกำหนดโหมดเวลาในการตอบสนองต่อไปนี้ใน HAL เสียงเพื่อรองรับการเพิ่มกลไกการส่ง LE-ACL และ LE-ISO
FREE
: ค่านี้บ่งบอกว่าไม่มีข้อจำกัดที่เฉพาะเจาะจงเกี่ยวกับเวลาในการตอบสนอง โหมดนี้จะใช้เมื่อระบบไม่รองรับเวลาในการตอบสนองต่ำ (ตามที่ HAL ระบุ) หรือเมื่อ HT ไม่ทำงาน (ตามที่เฟรมเวิร์กระบุ)
LOW
: ค่านี้แสดงถึงเวลาในการตอบสนองที่ต่ำ (เช่น น้อยกว่า 100 มิลลิวินาที) ซึ่งเข้ากันได้กับการดำเนินการ HT ระบบจะใช้โหมดนี้เมื่อรองรับเวลาในการตอบสนองต่ำและ HID มีการนําส่งผ่านโปรโตคอล ACL (ระบุโดย HAL) หรือเมื่อ HT ทํางานอยู่และไม่มีโหมดเวลาในการตอบสนองต่ำอื่นๆ ที่ใช้ได้ (ระบุโดยเฟรมเวิร์ก)
DYNAMIC_SPATIAL_AUDIO_SOFTWARE
: โหมดนี้จะใช้เมื่อเป็นไปตามเงื่อนไขข้อใดข้อหนึ่งต่อไปนี้
- เมื่อรองรับเวลาในการตอบสนองต่ำ ระบบจะส่ง HID ผ่านโปรโตคอล ISO และ HID จะไม่สามารถส่งผ่านไปยังเอนจิ้นเอฟเฟกต์การจัดวางเสียง (ตามที่ HAL ระบุ)
- เมื่อ HT ทำงานอยู่และมีการใช้โปรโตคอล ISO เมื่อเฟรมเวิร์กเสียงส่งข้อมูล HID ไปยังเอนจิ้นเอฟเฟกต์การจัดวางเสียง (ระบุโดยเฟรมเวิร์ก)
ในโหมดนี้ ไลบรารีการประมวลผล HT ในเฟรมเวิร์กจะดำเนินการประมวลผลข้อมูล IMU ก่อนการประมวลผลทั้งหมดและปรับยอดการเคลื่อนไหวของโทรศัพท์ที่เซ็นเซอร์ของโทรศัพท์ระบุ
DYNAMIC_SPATIAL_AUDIO_HARDWARE
: โหมดนี้จะใช้เมื่อเป็นไปตามเงื่อนไขข้อใดข้อหนึ่งต่อไปนี้
- เมื่อรองรับเวลาในการตอบสนองต่ำ HID จะส่งผ่านโปรโตคอล ISO และสามารถส่ง HID ไปยังโปรแกรมเอฟเฟกต์การจัดวางเสียง (ระบุโดย HAL)
- เมื่อ HT ทำงานอยู่และใช้โปรโตคอล ISO เมื่อมีการต่อท่อข้อมูล HID ไปยังเครื่องมือเอฟเฟกต์การจัดวางเสียง (ระบุโดยเฟรมเวิร์ก)
ในโหมดนี้ เครื่องยนต์เอฟเฟกต์การจัดวางเสียงจะได้รับข้อมูลจาก IMU ที่ไม่ได้ประมวลผลโดยตรงจากสแต็ก BT หรือตัวควบคุม BT การใช้งานเอฟเฟกต์การจัดวางเสียงจะดำเนินการประมวลผลข้อมูล IMU และการปรับยอดทั้งหมดกับการเคลื่อนไหวของโทรศัพท์ที่เซ็นเซอร์ของโทรศัพท์ระบุ
รายการค่าของโหมดเวลาในการตอบสนองจะแมปกับพร็อพเพอร์ตี้ระบบ bluetooth.core.le.dsa_transport_preference
ใน Spatializer.cpp
การรองรับโปรแกรมจำลองเสียงรอบทิศทาง
ตัวควบคุมการจัดวางเสียงในบริการนโยบายเสียงจะควบคุมการเลือกโปรโตคอลการนำส่ง HT ผ่านเสียง LE การติดตั้งใช้งานเอนจิ้นเอฟเฟกต์การจัดวางเสียงบ่งบอกถึงการสนับสนุนการเทนเนลิงข้อมูล HT ที่มีความสามารถ HeadTracking.ConnectionMode
โหมดการเชื่อมต่อ HT ที่รองรับมีดังนี้
FRAMEWORK_PROCESSED
: เฟรมเวิร์กเสียงจะส่งข้อมูล IMU ที่ประมวลผลล่วงหน้าในรูปแบบเวกเตอร์จากต้นทางไปยังปลายทางไปยัง HAL โหมดเริ่มต้นนี้สอดคล้องกับโหมดปัจจุบันที่มี BT แบบคลาสสิก
DIRECT_TO_SENSOR_SW
: เครื่องยนต์เอฟเฟกต์การจัดวางเสียงจะเชื่อมต่อกับเซ็นเซอร์โดยตรงผ่านสแต็กซอฟต์แวร์เซ็นเซอร์ เฟรมเวิร์กเสียงจะควบคุมเฉพาะสถานะเปิดใช้ของเซ็นเซอร์ การติดตั้งใช้งานซอฟต์แวร์ที่ไม่ได้ใช้libheadtracking
การประมวลผลข้อมูล IMU ก่อนการประมวลผลหรือการติดตั้งใช้งาน DSP ที่ส่งผ่านข้อมูลไปยังหน่วยประมวลผลเสียงแบบแยกต่างหาก (Spatializer) ของ AOSP จะใช้โหมด DIRECT_TO_SENSOR_SW
ได้
DIRECT_TO_SENSOR_TUNNEL
: เครื่องยนต์เอฟเฟกต์การจัดวางเสียงจะเชื่อมต่อกับเซ็นเซอร์โดยตรงผ่านการเทนเนลิงฮาร์ดแวร์ เฟรมเวิร์กเสียงจะควบคุมเฉพาะสถานะเปิดใช้ของเซ็นเซอร์ การติดตั้งใช้งานโปรแกรมจำลองเสียงที่ระบบแยกโหลดไปยัง DSP ใช้โหมด DIRECT_TO_SENSOR_TUNNEL
ได้
การเลือกโหมดเวลาในการตอบสนอง
เฟรมเวิร์กจะเลือกโหมดเวลาในการตอบสนองจากรายการโหมดเวลาในการตอบสนองที่รองรับซึ่ง HAL รายงาน
การตั้งค่าโหมดเวลาในการตอบสนองจะอิงตามสถานะการเปิดใช้ HT ปัจจุบัน การรองรับตัวจัดวางเสียงปัจจุบัน และพร็อพเพอร์ตี้ของระบบที่ระบุโดยผู้ให้บริการ ซึ่งจะกำหนดลําดับความสำคัญของกลไกการขนส่ง
เฟรมเวิร์กใช้กระบวนการต่อไปนี้ใน selectHeadtrackingConnectionMode_l
เพื่อเลือกโหมดเวลาในการตอบสนอง
- เฟรมเวิร์กจะโหลดค่ากําหนดการนําส่งจาก
bluetooth.core.le.dsa_transport_preference
พร็อพเพอร์ตี้ของระบบ
- ระบบจะกรองและจัดเรียงโหมดเวลาในการตอบสนองที่รองรับซึ่ง HAL เสียงรายงานตามรายการที่โหลดในขั้นตอนที่ 1
- หากโหมดเวลาในการตอบสนองต่ำที่มีลำดับความสำคัญสูงสุดคือ
iso-hw
และการใช้งานโปรแกรมจำลองเสียง 3 มิติรองรับการเชื่อมต่อเซ็นเซอร์โดยตรง (นั่นคือ มีการตั้งค่า DIRECT_TO_SENSOR_SW
หรือ DIRECT_TO_SENSOR_TUNNEL
ในโปรแกรมจำลองเสียง 3 มิติ) ระบบจะตั้งค่าโหมดเวลาในการตอบสนองเป็น DYNAMIC_SPATIAL_AUDIO_HARDWARE
หากโหมดเวลาในการตอบสนองต่ำที่มีลำดับความสำคัญสูงสุดคือ iso-hw
และการใช้งานโปรแกรมจำลองเสียง 3 มิติไม่รองรับการเชื่อมต่อเซ็นเซอร์โดยตรง (ไม่ได้ตั้งค่า DIRECT_TO_SENSOR_SW
หรือ DIRECT_TO_SENSOR_TUNNEL
ในโปรแกรมจำลองเสียง 3 มิติ) โหมดที่ต้องการถัดไป (iso-sw
หรือ le-acl
) จะกำหนดโหมดเวลาในการตอบสนอง (DYNAMIC_SPATIAL_AUDIO_SOFTWARE
หรือ LOW
)
หากไม่ได้ระบุโหมดที่ต้องการถัดไป ระบบจะรายงานข้อผิดพลาดในการกําหนดค่าผลิตภัณฑ์
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา 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,["# Head tracking over LE audio\n\n[Bluetooth (BT) Low Energy (LE) audio](https://www.bluetooth.com/specifications/core54-html/)\nintroduces the Asynchronous Connection-oriented Logical (LE-ACL) and Isochronous\n(LE-ISO) logical transport mechanisms for head tracking (HT) data.\n\nAndroid 15 provides support for latency mode\nadjustments for HT based on whether the LE-ACL or LE-ISO transport mechanism is\nused.\n\nThis page describes how the audio framework, audio HAL, and Bluetooth stack\ninteract to discover and select the LE-ACL or LE-ISO transport mechanisms\nsupported by the host and the headset.\n\nSupport for LE-ACL and LE-ISO\n-----------------------------\n\nAndroid 15 includes support for LE-ACL and LE-ISO\ntransport mechanisms by using a vendor-defined\n[system property](#ht-sys-prop), audio HAL [latency modes](#ht-latency-modes),\nand [spatializer connection modes](#ht-spatial-support).\n\n### System property\n\nThe phone vendor implementation lists the supported transport mechanisms in the\n[`bluetooth.core.le.dsa_transport_preference`](https://cs.android.com/android/platform/superproject/+/android-latest-release:system/libsysprop/srcs/android/sysprop/BluetoothProperties.sysprop;l=769) system property. The value is a comma-separated list of strings,\nlisting the [supported transports](https://cs.android.com/android/platform/superproject/+/android-latest-release:packages/modules/Bluetooth/system/bta/le_audio/le_audio_types.h;l=58) in the order of preference:\n\n- `le-acl`: LE-ACL transport, when the inertial measurement unit (IMU) data is reported through the sensor stack.\n- `iso-hw`: ISO transport with capability to tunnel HT data directly from the Bluetooth controller to the spatializer in the audio DSP.\n- `iso-sw`: ISO transport without tunneling capability, when the IMU data is reported through the sensor stack.\n\n### Latency modes\n\nIn the case of BT LE audio, the mechanism for the BT stack to indicate the\nsupported latency modes to the audio HAL and audio framework is the same as that\ndefined for BT Classic (A2DP). The audio HAL reports the supported latency modes\naccording to the currently selected audio device.\n\nA2DP implementations support only `FREE` and `LOW_LATENCY` modes.\n\nIn contrast, for BT LE audio, the following [latency modes](https://cs.android.com/android/platform/superproject/+/android-latest-release:system/hardware/interfaces/media/aidl/android/media/audio/common/AudioLatencyMode.aidl;l=27)\nare defined in the audio HAL to support the addition of LE-ACL and LE-ISO\ntransport mechanisms:\n\n- `FREE`: This value indicates that there's no specific constraint on the\n latency. This mode is used when low latency isn't supported (indicated by\n the HAL), or when HT isn't active (indicated by the framework).\n\n- `LOW`: This value indicates a relatively low latency (such as, less than\n 100 ms) compatible with HT operation. This mode is used when low\n latency is supported and HID is conveyed over the ACL protocol (indicated by\n the HAL), or when HT is active and no other low latency modes are available\n (indicated by the framework).\n\n- `DYNAMIC_SPATIAL_AUDIO_SOFTWARE`: This mode is used when one of the\n following conditions are met:\n\n - When low latency is supported, HID is conveyed over the ISO protocol, and HID can't be tunneled to the spatializer effect engine (indicated by the HAL).\n - When HT is active and the ISO protocol is used when the audio framework provides the HID data to the spatializer effect engine (indicated by the framework).\n\n In this mode, the HT computing library in the framework does all the\n preprocessing on the IMU data and reconciliation with phone movements\n indicated by phone sensors.\n- `DYNAMIC_SPATIAL_AUDIO_HARDWARE`: This mode is used when one of the\n following conditions are met:\n\n - When low latency is supported, HID is conveyed over the ISO protocol, and HID can be tunneled to the spatializer effect engine (indicated by the HAL).\n - When the HT active and the ISO protocol is used when the HID data is tunneled to the spatializer effect engine (indicated by the framework).\n\n In this mode, the spatializer effect engine receives the unprocessed IMU\n data directly from the BT stack or BT controller. The spatializer effect\n implementation does all the preprocessing on the IMU data and reconciliation\n with phone movements indicated by phone sensors.\n\nThe latency mode enums are mapped to the [`bluetooth.core.le.dsa_transport_preference`](https://cs.android.com/android/platform/superproject/+/android-latest-release:system/libsysprop/srcs/android/sysprop/BluetoothProperties.sysprop;l=769)\nsystem property in [`Spatializer.cpp`](https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/av/services/audiopolicy/service/Spatializer.cpp;l=218).\n\n### Spatializer support\n\nThe [spatializer](https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/av/services/audiopolicy/service/Spatializer.cpp)\ncontroller in the audio policy service controls the selection of HT transport\nprotocol over LE audio. The spatializer effect engine implementation indicates\nsupport for HT data tunneling with the [`HeadTracking.ConnectionMode`](https://cs.android.com/android/platform/superproject/+/android-latest-release:system/hardware/interfaces/media/aidl/android/media/audio/common/HeadTracking.aidl;l=63) capability.\n\nThe supported HT connection modes are as follows:\n\n- `FRAMEWORK_PROCESSED`: The audio framework provides preprocessed IMU data in a head-to-stage vector format to HAL. This default mode corresponds to current mode with BT classic.\n- `DIRECT_TO_SENSOR_SW`: The spatializer effect engine directly connects to the sensor through the sensor software stack. The audio framework controls only the enabled state of the sensor. Software implementations that don't use the AOSP `libheadtracking` IMU data preprocessing or DSP offloaded spatializer implementations can use the `DIRECT_TO_SENSOR_SW` mode.\n- `DIRECT_TO_SENSOR_TUNNEL`: The spatializer effect engine directly connects to the sensor through hardware tunneling. The audio framework controls only the enabled state of the sensor. DSP offloaded spatializer implementations can use the `DIRECT_TO_SENSOR_TUNNEL` mode.\n\nLatency mode selection\n----------------------\n\nThe framework selects a latency mode from the list of supported\n[latency modes](#ht-latency-modes) that are reported by the HAL.\nThe [latency mode is set](https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/av/services/audiopolicy/service/Spatializer.cpp;l=1056)\nbased on the current HT enable state, current [spatializer support](#ht-spatial-support),\nand the vendor-specified [system property](#ht-sys-prop) that\nestablishes a priority order between transport mechanisms.\n\nThe framework uses the following process in [`selectHeadtrackingConnectionMode_l`](https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/av/services/audiopolicy/service/Spatializer.cpp;l=1056)\nto select the latency mode:\n\n1. The framework loads the transport preference from the [`bluetooth.core.le.dsa_transport_preference`](https://cs.android.com/android/platform/superproject/+/android-latest-release:system/libsysprop/srcs/android/sysprop/BluetoothProperties.sysprop;l=769) [system property](#ht-sys-prop).\n2. The supported latency modes reported by the audio HAL are filtered and ordered against the list loaded in step 1.\n3. If the highest priority low latency mode is `iso-hw` and the spatializer implementation supports direct sensor connection (that is, `DIRECT_TO_SENSOR_SW` or `DIRECT_TO_SENSOR_TUNNEL` are set in the spatializer), the latency mode is set to `DYNAMIC_SPATIAL_AUDIO_HARDWARE`.\n4. If the highest priority low latency mode is `iso-hw` and the spatializer\n implementation doesn't support direct sensor connection (`DIRECT_TO_SENSOR_SW`\n or `DIRECT_TO_SENSOR_TUNNEL` aren't set in the spatializer), the next preferred\n mode (which is either `iso-sw` or `le-acl`) determines the latency mode (which\n is either `DYNAMIC_SPATIAL_AUDIO_SOFTWARE` or `LOW`).\n\n If the next preferred mode isn't specified, the system reports a product\n configuration error."]]