اعتبارًا من 27 آذار (مارس) 2025، ننصحك باستخدام android-latest-release
بدلاً من aosp-main
لإنشاء AOSP والمساهمة فيه. لمزيد من المعلومات، يُرجى الاطّلاع على التغييرات في AOSP.
تتبُّع حركة الرأس عبر LE Audio
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
الصوت عبر تقنية Bluetooth (BT) منخفضة الطاقة (LE):
يستخدم آليات النقل المنطقية المستندة إلى الاتصال غير المتزامن (LE-ACL) والمتزامن
(LE-ISO) لبيانات تتبُّع الرأس (HT).
يتيح نظام التشغيل Android 15 تعديلات وضع وقت الاستجابة لبروتوكول HT استنادًا إلى ما إذا كان يتم استخدام آلية النقل LE-ACL أو LE-ISO.
توضِّح هذه الصفحة كيفية تفاعل إطار عمل الصوت وواجهة HAL للصوت وحزمة Bluetooth
لاكتشاف آليات النقل 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 مباشرةً من معالج تحكم برمجي في تقنية Bluetooth إلى أداة وضع الصوت المكاني في وحدة معالجة الإشارات الرقمية للصوت
-
iso-sw
: نقل بيانات ISO بدون إمكانية النفق، عندما يتم تسجيل بيانات وحدة قياس السرعة والاتجاه (IMU)
من خلال حزمة الاستشعار
أوضاع وقت الاستجابة
في ما يتعلّق بالصوت عبر Bluetooth LE، فإنّ آلية حِزمة Bluetooth للإشارة إلى
أوضاع وقت الاستجابة المتوافقة مع HAL للصوت وإطار العمل الصوتي هي نفسها المُحدّدة لبروتوكول Bluetooth Classic (A2DP). يُبلغ HAL للصوت عن أوضاع وقت الاستجابة المتوافقة
وفقًا لجهاز الصوت المحدّد حاليًا.
لا تتوافق عمليات تنفيذ A2DP إلا مع الوضعَين FREE
وLOW_LATENCY
.
في المقابل، بالنسبة إلى تقنية BT LE Audio، يتم تحديد أوضاع وقت الاستجابة التالية
في HAL للصوت لدعم إضافة آليات النقل LE-ACL وLE-ISO:
FREE
: تشير هذه القيمة إلى أنّه ما مِن قيد محدّد على وقت الاستجابة. يتم استخدام هذا الوضع عندما لا يكون وقت الاستجابة المنخفض متاحًا (يُشار إليه فيHAL) أو عندما لا يكون وضع "العرض الفائق السرعة" مفعّلاً (يُشار إليه في إطار العمل).
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
غير المعالجة مباشرةً من حِزمة بلوتوث أو وحدة تحكّم بلوتوث. عند تنفيذ تأثير "المحوِّل المكاني"، تتم جميع عمليات المعالجة المُسبَقة لبيانات وحدة IMU ومطابقتها
مع حركات الهاتف التي تشير إليها أدوات استشعار الهاتف.
يتم ربط القيم المحدَّدة لوضع الاستجابة بخاصية النظام bluetooth.core.le.dsa_transport_preference
في Spatializer.cpp
.
إتاحة ميزة "الصوت المكاني"
يتحكّم عنصر التحكّم في التأثير المكاني
في خدمة سياسة الصوت في اختيار بروتوكول نقل HT بدلاً من صوت LE. يشير تنفيذ محرّك تأثير "المحوِّل المكاني" إلى
توفّر إمكانية إنشاء نفق لبيانات HT باستخدام HeadTracking.ConnectionMode
.
في ما يلي أوضاع الاتصال المتاحة في HT:
FRAMEWORK_PROCESSED
: يقدّم إطار العمل الصوتي بيانات وحدة قياس التسارع والانحراف (IMU) التي تمت معالجتها مسبقًا في
تنسيق متجه من البداية إلى النهاية إلى HAL. يتوافق هذا الوضع التلقائي مع
الوضع الحالي في تطبيق BT الكلاسيكي.
DIRECT_TO_SENSOR_SW
: يتصل محرّك تأثير "الصوت المكاني" مباشرةً بالجهاز من خلال حِزمة برامج الجهاز. يتحكّم إطار عمل الصوت في
حالة تفعيل جهاز الاستشعار فقط. يمكن أن تستخدم عمليات تنفيذ البرامج التي لا تستخدم
عمليات معالجة البيانات في وحدة التحكّم في الحركة (IMU) من AOSP libheadtracking
أو عمليات تنفيذ أداة معالجة الصوت المجسم التي تم نقلها إلى وحدة المعالجة الرقمية (DSP)
وضع DIRECT_TO_SENSOR_SW
.
DIRECT_TO_SENSOR_TUNNEL
: يتصل محرّك تأثير "المحوِّل المكاني" مباشرةً
بالمستشعر من خلال النفق في الجهاز. لا يتحكّم إطار العمل الصوتي إلا في
حالة تفعيل أداة الاستشعار. يمكن استخدام وضع DIRECT_TO_SENSOR_TUNNEL
في عمليات تنفيذ أدوات ضبط الصوت المكاني التي تم نقلها إلى وحدة التحكّم في الصوت (DSP).
اختيار وضع وقت الاستجابة
يختار إطار العمل أحد أوضاع وقت الاستجابة من قائمة أوضاع وقت الاستجابة المتوافقة التي يُبلغ عنها HAL.
يتم ضبط وضع وقت الاستجابة
استنادًا إلى حالة تفعيل HT الحالية ودعم أداة وضع الصوت المكاني الحالي
وخاصية النظام التي يحدّدها المورّد والتي
تُحدِّد ترتيب الأولوية بين آليات النقل.
يستخدم إطار العمل العملية التالية في selectHeadtrackingConnectionMode_l
لاختيار وضع وقت الاستجابة:
- تحمِّل الإطار المرجعي الإعداد المفضّل لنقل البيانات من
bluetooth.core.le.dsa_transport_preference
property system.
- يتم فلترة أوضاع وقت الاستجابة المتوافقة التي يُبلغ عنها HAL الصوتي وترتيبها وفقًا للقائمة التي تم تحميلها في الخطوة 1.
- إذا كان وضع وقت الاستجابة المنخفض ذو الأولوية الأعلى هو
iso-hw
وكان تنفيذ أداة ضبط الصوت المكاني
يتوافق مع الاتصال المباشر بجهاز الاستشعار (أي تم ضبط DIRECT_TO_SENSOR_SW
أو DIRECT_TO_SENSOR_TUNNEL
في أداة ضبط الصوت المكاني)، يتم ضبط وضع وقت الاستجابة
على DYNAMIC_SPATIAL_AUDIO_HARDWARE
.
إذا كان وضع وقت الاستجابة المنخفض ذو الأولوية الأعلى هو iso-hw
ولم يكن تنفيذ أداة تحديد الموقع الجغرافي بالاستناد إلى الصوت
يتوافق مع الاتصال المباشر بجهاز الاستشعار (لم يتم ضبط DIRECT_TO_SENSOR_SW
أو DIRECT_TO_SENSOR_TUNNEL
في أداة تحديد الموقع الجغرافي بالاستناد إلى الصوت)، سيحدِّد الوضع التالي المفضَّل (iso-sw
أو le-acl
) وضع وقت الاستجابة (DYNAMIC_SPATIAL_AUDIO_SOFTWARE
أو LOW
).
في حال عدم تحديد الوضع المفضّل التالي، يُبلغ النظام عن خطأ في إعدادات المنتج.
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ 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,["# 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."]]