低功耗蓝牙LE Audio Profile 详细介绍

简介: 2019年底,蓝牙官方组织SIG发布了蓝牙5.2版本的核心协议,其中增加了一个重要的特性---LE Audio。蓝牙的应用协议都是从应用层到物理层完整包含的协议,LE Audio也不例外。但蓝牙5.2核心协议仅仅定义了蓝牙LE的链路层传输Audio的方式,上层协议以及完整的LE Audio规范迟迟未出,近日,蓝牙官方组织释放了LE Audio较为完整的规范文档。
来源 | HaaS技术社区

1、LE Audio介绍

1.1、LE Audio传输协议

2019年底,蓝牙官方组织SIG发布了蓝牙5.2版本的核心协议,其中增加了一个重要的特性---LE Audio。

蓝牙的应用协议都是从应用层到物理层完整包含的协议,LE Audio也不例外。但蓝牙5.2核心协议仅仅定义了蓝牙LE的链路层传输Audio的方式,上层协议以及完整的LE Audio规范迟迟未出,近日,蓝牙官方组织释放了LE Audio较为完整的规范文档。

1.2、LE Audio完整应用

本次Sig组织定义了如下规范和协议,这些规范协议连同核心协议组成了LE Audio的完整应用

  • Basic Audio Profile(BAP)

基础音频规范,LE Audio的关键规范,定义了各类角色以及每个角色需要支持的能力,以及如何使用如下各服务完成音频应用的传输。LE Audio支持点对点音频模式和广播音频模式,2种模式下,会使用不同的服务。

  • Published Audio Capabilities Service(PACS)

已发布音频能力服务,此服务定义了本设备支持的音频能力,包括但不限于支持的编解码器个数以及各编解码能力,通过此项服务,可获取设备的音频能力。

  • Audio Stream Control Service(ASCS)

音频流控制服务,此服务定义了一套操作指令,用于建立配置以及关闭音频流。

  • Broadcast Audio Scan Service(BASS)

广播音频扫描服务,此服务用于广播音频发布者告知周边接收器广播音频参数,这个服务仅在广播音频类

  • Low Complexity Comunication Codec(LC3)

用于LE Audio的音频编解码器,顾名思义,此编码器属于低复杂度的音频编码器。LC3编码器可选参数范围很大,应用范围从8KHz单声道语音到48KHZ多声道音乐均支持,同时相比经典蓝牙音频规范使用的编码器SBC,同码率下音质有很大的提升。

2、LE Audio详解

2.1、BAP规范

BAP规范作为LE Audio的基础音频规范,其位于如下蓝牙协议层。

image.png

BAP规范根据支持的点对点音频和广播音频,定义了如下角色

Unicast Role

Unicast Server

点对点音频从设备

Unicast Client

点对点音频主设备

Broadcast Role

Broadcast Source

广播音频发射设备

Broadcast Sink

广播音频接收设备

Broadcast Assistant

广播音频协助设备

Scan Delegator

广播音频扫描设备

每类角色支持的服务如下(注: X代表不支持,M代表必须支持,O代码可选支持)

BAP Role

Service Role

Unicast Server

Unicast Client

Broadcast Source

Broadcast Sink

Scan Delegator

Broadcast Assistant

ASCS Client

X

M

X

X

X

X

ASCS Server

M

X

X

X

X

X

PACS Client

X

M

X

X

X

O

PACS Server

M

X

X

M

X

X

BASS Client

X

X

X

X

X

M

BASS Server

X

X

X

X

M

X

2个设备处于对应角色时,即可通过BAP定义的操作步骤完成服务的连接以及音频传输服务。

以Unicast Server和Unicast Client为例,其步骤如下

  • Unicast Client通过GATT服务发现操作发现Unicast Server的PACS服务并得知音频参数。
  • Unicast Client通过GATT服务发现操作发现Unicast Server的ASCS服务并得知当前状态。
  • Unicast Client如发现其音频参数匹配且Server的状态处于IDLE状态,即可连接音频服务。
  • Unicast Client通过ASCS定义的操作码,配置音频编解码参数和音频传输参数,然后开启音频。
  • Unicast Client通过核心协议5.2定义的方式,根据配置参数,在链路层开启CIS音频传输流。
  • Unicast Sink通过ASCS操作码,通知Unicast Source已可接收音频。
  • Unicast Source开启LC3编解码器,并将编码后的音频流通过CIS传输到Unicast Sink。
  • Unicast Sink接收音频流,解码并播放。

2.2、PACS服务

PACS服务用于点对点音频,定义了设备的音频能力,其服务定义如下。

Characteristic Name

Requirement

Mandatory Properties

Optional Properties

Security Permissions

Sink PAC

C.1

Read

Notify

Encryption required

Sink Audio Locations

C.2

Read

Notify, Write

Encryption required

Source PAC

C.1

Read

Notify

Encryption required

Source Audio Locations

C.3

Read

Notify, Write

Encryption required

Available Audio Contexts

M

Read, Notify

None

Encryption required

Supported Audio Contexts

M

Read

Notify

Encryption required

其中,Source PAC为音频发送能力属性,当设备支持音频发送时才需要定义,其格式如下:

Parameter

Size (Octets)

Description

Number_of_PAC_records

1

Number of PAC records, [i], for this characteristic

Codec_ID[i]

5

Octet 0: Coding_Format value of the [ith] PAC record.

Coding_Format values are defined in Bluetooth Assigned Numbers.

Octet 1–2: Company _ID value of the [ith] PAC record. Shall be 0x0000 if octet 0 is not 0xFF.

Company_ID values are defined in Bluetooth Assigned Numbers.

Octet 3–4: Vendor-specific codec_ID value of the [ith] PAC record.

Shall be 0x0000 if octet 0 is not 0xFF.

Codec_Specific_Capabilities_Length[i]

1

Length of the Codec_Specific_Capabilities value of the [ith] PAC record.

Shall be 0x00 if the Codec_Specific_Capabilities value of the [ith] PAC record is empty.

Codec_Specific_Capabilities[i]

Varies

Codec_Specific_Capabilities value of the [ith] PAC record.

Metadata_Length[i]

1

Length of the Metadata field of the [ith] PAC record.

Shall be 0x00 if the Metadata value of the [ith] PAC record value is empty.

Metadata[i]

Varies

LTV-formatted Metadata applicable to the [ith] PAC record.

Shall exist only if the value of the Metadata_Length field is not 0x00.

Sink PAC为音频接收能力属性,当设备支持音频接收时才需要定义,其格式如下:

Parameter

Size (Octets)

Description

Number_of_PAC_records

1

Number of PAC records, [i], in this characteristic.

Codec_ID[i]

5

Octet 0: Coding Format of the [ith] PAC record.

Coding_Format values are defined in Bluetooth Assigned Numbers

Octet 1–2: Company_ID value of the [ith] PAC record.

Company_ID values are defined in Bluetooth Assigned Numbers

Shall be 0x0000 if octet 0 is not 0xFF.

Octet 3–4: Vendor-specific codec_ID value of the [ith] PAC record.

Shall be 0x0000 if octet 0 is not 0xFF.

Codec_Specific_Capabilities_Length[i]

1

Length, in octets, of the Codec_Specific_Capabilities value of the [ith] PAC record.

Shall be 0x00 if the Codec_Specific_Capabilities value of the [ith] PAC record is empty.

Codec_Specific_Capabilities[i]

Varies

Codec_Specific_Capabilities value of the [ith] PAC record.

Metadata_Length[i]

1

Length of the Metadata field of the [ith] PAC record.

Shall be 0x00 if the Metadata value of the [ith] PAC record value is empty.

Metadata[i]

Varies

Length-type-value (LTV)-formatted Metadata applicable to the [ith] PAC record.

Shall exist only if the value of the Metadata_Length field is not 0x00.

2.3、ASCS服务

ASCS服务用于音频控制,通过定义的一套操作码作交互,从而达到控制音频状态转移的目的。

image.png

ASCS的服务定义如下

Characteristic Name

Requirement

Mandatory Properties

Optional Properties

Security Permissions

Sink ASE

C.1

Read, Notify

None

Encryption required

Source ASE

C.1

Read, Notify

None

Encryption required

ASE Control Point

M

Write, WriteWithoutResponse, Notify

None

Encryption required

2.4、BASS服务

BASS为广播音频扫描服务,用于告知广播音频的一些参数,属于辅助服务,其定义如下。

Characteristic Name

Requirement

Mandatory Properties

Optional Properties

Security Permissions

Broadcast Audio Scan Control Point

M

Write, Write Without Response

None

Encryption required

Broadcast Receive State

M

Read, Notify

None

Encryption required

2.5、LC3编解码器

LC3编解码器用于LE Audio的音频编解码,与MP3,AAC类似,属于频域编码,编码效率远高于SBC子带编码,而10毫秒和7.5毫秒的短帧结构,对于音频延迟有较大改善。

LC3在频域上引入了SNS频域噪声整形,TNS时域噪声整形以及熵编码等技术,其中TNS等技术已用于AAC,这些技术对于音质有提升,整个编码过程如下:

image.png

解码是编码的逆过程,如下:

image.png

3、LE Audio支持展望

LE Audio作为一个非常重要的特性,发布至今除少量demo仍未见应用。大规模普及仍依赖于操作系统厂商是否支持,诸如苹果的IOS以及谷歌的Android,从目前的进展(IOS14以及Android11)来看,仍未看到有支持LE Audio。

但翻看AOSP的代码,在Android12(android-s-beta版)上,已能发现LE Audio的痕迹,如下

image.png

从目前的代码完整度来看,仍不算完整功能支持,预计在Android12上会完善并开始应用,等手机支持后,相信会有厂商推出支持LE Audio的耳机。

但音频应用属于一个通用应用,苹果以及其他操作系统诸如微软的windows的支持也极其重要,从这个角度讲,LE Audio要大规模普及可能仍需要时间。

相关文章
|
11月前
|
算法 Java 开发工具
Magisk模块:Audio HeadQuarter(使用前仔细阅读)
Magisk模块:Audio HeadQuarter(使用前仔细阅读)
494 0
|
3月前
|
算法
2024最新分享iZotope RX 10 Audio Editor Advanced for Mac 直装版
iZotope RX 10 Audio Editor Advanced是一款先进的音频编辑软件,由iZotope公司推出。
|
4月前
|
存储 数据库
PACS(Picture Archiving and Communications System)图像存储与传输系统源码
PACS(Picture Archiving and Communications System)图像存储与传输系统源码
35 0
|
编解码 物联网
【BLE】蓝牙5.2 新特性 - LE Audio
连接同步通道是基于蓝牙连接的,首先要先建立ble连接基于时间同步的音频传输机制,可以实现多个设备的数据同步一个master可以建立多个CIG每个CIG可以最多31个CIS每个CIS里面最多有31个subevent链路层有LL_CIS_REQ 和 LL_CIS_RSP来创建CIS无连接的单向的,无应答机制广播通道,对接收者的数量没有限制不仅可以广播数据包还可以广播控制包每个big里面最多可以包含31个bis。
1327 0
【BLE】蓝牙5.2 新特性 - LE Audio
|
9月前
|
Windows
UE DTCmd Plug-in description
UE DTCmd Plug-in description
38 0
|
传感器 物联网 数据安全/隐私保护
|
存储 缓存
ZYNQ-Video out IP和Video Timing Controller IP简介
ZYNQ-Video out IP和Video Timing Controller IP简介
620 0
ZYNQ-Video out IP和Video Timing Controller IP简介
|
编解码
Bluetooth Profile Specification之1.1 A2DP 之Audio Codec(音频编解码器)-SBC
Bluetooth Profile Specification之1.1 A2DP 之Audio Codec(音频编解码器)-SBC
394 0
Bluetooth Profile Specification之1.1 A2DP 之Audio Codec(音频编解码器)-SBC
|
编解码 安全
Bluetooth Profile Specification之1.4 A2DP 之Audio Codec(音频编解码器)-供应商特定的 A2DP Codec
Bluetooth Profile Specification之1.4 A2DP 之Audio Codec(音频编解码器)-供应商特定的 A2DP Codec
276 1
Bluetooth Profile Specification之1.4 A2DP 之Audio Codec(音频编解码器)-供应商特定的 A2DP Codec