2025 年 3 月 27 日より、AOSP のビルドとコントリビューションには aosp-main
ではなく android-latest-release
を使用することをおすすめします。詳細については、AOSP の変更をご覧ください。
LE Audio を介したヘッド トラッキング
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Bluetooth(BT)Low Energy(LE)Audio には、ヘッド トラッキング(HT)データ用の非同期接続指向論理(LE-ACL)およびアイソクロナス(LE-ISO)論理の転送メカニズムが導入されています。
Android 15 では、LE-ACL または LE-ISO 転送メカニズムが使用されているかどうかに基づいて、HT のレイテンシ モードの調整がサポートされます。
このページでは、オーディオ フレームワーク、オーディオ HAL、Bluetooth スタックがどのように相互作用して、ホストとヘッドセットでサポートされている LE-ACL または LE-ISO 転送メカニズムを検出し、選択するかについて説明します。
LE-ACL および LE-ISO のサポート
Android 15 には、ベンダー定義のシステム プロパティ、オーディオ HAL のレイテンシ モード、およびスペイシャライザー接続モードを使用した LE-ACL および LE-ISO 転送メカニズムに対するサポートが含まれています。
システム プロパティ
スマートフォン ベンダーの実装では、サポートされている転送メカニズムが bluetooth.core.le.dsa_transport_preference
システム プロパティにリストされています。このプロパティの値は、カンマで区切られた文字列のリストで、サポートされている転送が優先順位の順に列挙されています。
le-acl
: 慣性計測装置(IMU)データがセンサー スタックを通じて報告される場合の LE-ACL 転送。
iso-hw
: HT データを Bluetooth コントローラから直接オーディオ DSP のスペイシャライザーにトンネリングする機能を備えた ISO 転送。
iso-sw
: IMU データがセンサー スタックを通じて報告される場合の、トンネリング機能のない ISO 転送。
レイテンシ モード
BT LE Audio の場合、BT スタックがオーディオ HAL とオーディオ フレームワークにサポートされているレイテンシ モードを示すメカニズムは、BT Classic(A2DP)に対して定義されているものと同じです。オーディオ HAL は、現在選択されているオーディオ デバイスに応じて、サポートされているレイテンシ モードを報告します。
A2DP 実装では、FREE
および LOW_LATENCY
モードのみがサポートされています。
一方、BT LE Audio の場合、LE-ACL および LE-ISO 転送メカニズムの追加をサポートするために、次のレイテンシ モードがオーディオ HAL で定義されています。
FREE
: この値は、レイテンシに特定の制約がないことを示します。このモードは、低レイテンシがサポートされていない場合(HAL によって示される)、または HT がアクティブでない場合(フレームワークによって示される)に使用されます。
LOW
: この値は、HT 操作と互換性のある比較的低いレイテンシ(100 ミリ秒未満など)を示します。このモードは、低レイテンシがサポートされ、HID が ACL プロトコルを介して伝達される場合(HAL によって示される)、または HT がアクティブで他の低レイテンシ モードが利用できない場合(フレームワークによって示される)に使用されます。
DYNAMIC_SPATIAL_AUDIO_SOFTWARE
: このモードは、次のいずれかの条件が満たされた場合に使用されます。
- 低レイテンシがサポートされ、HID が ISO プロトコルを介して伝達され、HID がスペイシャライザー エフェクト エンジンにトンネリングされない場合(HAL によって示される)。
- HT がアクティブで、オーディオ フレームワークがスペイシャライザー エフェクト エンジンに HID データを提供するときに ISO プロトコルが使用される場合(フレームワークによって示される)。
このモードでは、フレームワーク内の HT コンピューティング ライブラリが、IMU データのすべての前処理を行い、スマートフォンのセンサーによって示されたスマートフォンの動きと照合します。
DYNAMIC_SPATIAL_AUDIO_HARDWARE
: このモードは、次のいずれかの条件が満たされた場合に使用されます。
- 低レイテンシがサポートされ、HID が ISO プロトコルを介して伝達され、HID がスペイシャライザー エフェクト エンジンにトンネリングされる場合(HAL によって示される)。
- HT がアクティブで、HID データがスペイシャライザー エフェクト エンジンにトンネリングされるときに ISO プロトコルが使用される場合(フレームワークによって示される)。
このモードでは、スペイシャライザー エフェクト エンジンは、未処理の IMU データを BT スタックまたは BT コントローラから直接受信します。スペイシャライザー エフェクトの実装が、IMU データのすべての前処理を行い、スマートフォンのセンサーによって示されたスマートフォンの動きと照合します。
レイテンシ モードの列挙型は、Spatializer.cpp
の bluetooth.core.le.dsa_transport_preference
システム プロパティにマッピングされます。
スペイシャライザーのサポート
オーディオ ポリシー サービス内のスペイシャライザー コントローラは、LE Audio を介して HT トランスポート プロトコルの選択を管理します。スペイシャライザー エフェクト エンジンの実装は、HeadTracking.ConnectionMode
機能を通じて、HT データ トンネリングをサポートしていることを示します。
サポートされている HT 接続モードは次のとおりです。
FRAMEWORK_PROCESSED
: オーディオ フレームワークは、前処理された IMU データをヘッドからステージまでのベクター形式で HAL に提供します。このデフォルトのモードは、現在の BT Classic モードに対応しています。
DIRECT_TO_SENSOR_SW
: スペイシャライザー エフェクト エンジンは、センサー ソフトウェア スタックを通じてセンサーに直接接続します。オーディオ フレームワークは、センサーの有効状態のみを管理します。AOSP libheadtracking
の IMU データ前処理や、DSP をオフロードするスペイシャライザーの実装を使用しないソフトウェア実装では、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
であり、スペイシャライザーの実装が直接センサー接続をサポートしている(つまり、スペイシャライザーで 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-03-26 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-03-26 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."]]