阅读A2DP SPEC V12的1.1章,可知:
- Advanced Audio Distribution Profile(A2DP)
- 典型应用是立体声音乐播放器的音乐到耳机或扬声器的播放
- 目的是用来传输高品质的单声道或立体声音频,环绕声不能用A2DP传输
- A2DP不包括遥控功能,用户需要同AVRCP组合使用
The Advanced Audio Distribution Profile (A2DP) defines the protocols and procedures that realize distribution of audio content of high-quality in mono or stereo on ACL channels. The term “advanced audio”, therefore, should be distinguished from “Bluetooth audio”, which indicates distribution of narrow band voice on SCO channels as defined in Chapter 12 of Bluetooth Baseband specification。
也就是说,A2DP的音质与bluetooth audio是有区别的。Bluetooth audio只能提供voice的音质,而A2DP能提供mono或stereo的音质。
Core spec 4.2第九章:
On the air-interface, either a 64 kb/s log PCM (Pulse Code Modulation) format (A-law or μ-law) may be used, or a 64 kb/s CVSD (Continuous Variable Slope Delta Modulation) may be used. The latter format applies an adaptive delta modulation algorithm with syllabic companding.
The voice coding on the line interface is designed to have a quality equal to or better than the quality of 64 kb/s log PCM.
Table 9.1 on page 210 summarizes the voice coding schemes supported on the air interface. The appropriate voice coding scheme is selected after negotiations between the Link Managers.
支持的编码方式如下:
其中SBC是强制支持的,其余是可选的。A2DP也支持非A2DP编码格式:
The device may support other codecs as Non-A2DP codecs. A user of the Non-A2DP codec (hereafter the Vendor) oneself defines parameters and any information necessary for use of the codec in A2DP.
CSR8670支持的部分编码格式如下:
其中aptX和faststream就属于Non-A2DP。
CSR8670在TWS模式下此注册2个SDP。在2个SDP注册成功后,再注册L2CAP连接。
阅读AVDTP_SPEC_V12:
从上表中可以得知,signalling和media在Upper Layer层处理,时间戳信息会给到Upper Layer。
一个设备可以支持多个流终端(SEPs),且每个SEPs在本地都对应一个流终端标识符SEID。
- 设备A使用Application and Transport Service Capabilities服务来获取设备的SEP。设备A在应用层决定与设备B的哪一个SEP连接。
- 如果某个SEP已经被使用,其不能被另一个设备使用。
- 不同的编码方式应使用不同的流终端,但多个流终端可以使用相同的编码方式
当CSR8670处在TWS模式下的source状态,且编码方式是SBC,其sep和capability如下:
static const sep_config_type tws_sbc_sep_src = {
SOURCE_SEID_MASK | TWS_SEID_MASK | SBC_SEID,
KALIMBA_RESOURCE_ID,
sep_media_type_audio, a2dp_source, 0, 0,
sizeof(tws_sbc_caps), tws_sbc_caps };
/*! @brief The CSR True Wireless Stereo Codec ID for SBC. */
const uint8 tws_sbc_caps[26] =
{
/* Capability 1*/
AVDTP_SERVICE_MEDIA_TRANSPORT,
0,
/* Capability 2*/
AVDTP_SERVICE_MEDIA_CODEC,
16, /* Length */
AVDTP_MEDIA_TYPE_AUDIO << 2,
AVDTP_MEDIA_CODEC_NONA2DP,
(A2DP_CSR_VENDOR_ID >> 24) & 0xFF,
(A2DP_CSR_VENDOR_ID >> 16) & 0xFF,
(A2DP_CSR_VENDOR_ID >> 8) & 0xFF,
(A2DP_CSR_VENDOR_ID >> 0) & 0xFF,
(A2DP_CSR_TWS_SBC_CODEC_ID >> 8) & 0xFF,
(A2DP_CSR_TWS_SBC_CODEC_ID >> 0) & 0xFF,
/* Capability 3*/
/* Embed SBC capabilities */
AVDTP_SERVICE_MEDIA_CODEC,
6, /* Length */
AVDTP_MEDIA_TYPE_AUDIO << 2,
AVDTP_MEDIA_CODEC_SBC,
SBC_SAMPLING_FREQ_16000 | SBC_SAMPLING_FREQ_32000 | SBC_SAMPLING_FREQ_44100 | SBC_SAMPLING_FREQ_48000 |
SBC_CHANNEL_MODE_MONO | SBC_CHANNEL_MODE_DUAL_CHAN | SBC_CHANNEL_MODE_STEREO | SBC_CHANNEL_MODE_JOINT_STEREO,
SBC_BLOCK_LENGTH_4 | SBC_BLOCK_LENGTH_8 | SBC_BLOCK_LENGTH_12 | SBC_BLOCK_LENGTH_16 |
SBC_SUBBANDS_4 | SBC_SUBBANDS_8 | SBC_ALLOCATION_SNR | SBC_ALLOCATION_LOUDNESS,
SBC_BITPOOL_MIN,
SBC_BITPOOL_HIGH_QUALITY,
/* Capability 4*/
AVDTP_SERVICE_CONTENT_PROTECTION,
2,
AVDTP_CP_TYPE_SCMS_LSB,
AVDTP_CP_TYPE_SCMS_MSB,
/* Capability 5*/
AVDTP_SERVICE_DELAY_REPORTING,
0
};
capability的详细内容参照AVDTP 8.19 Service Capability。
两个设备之间最多有4个L2CAP channel,包括signalling channel, media transport channel, reporting channel, recovery channel。
CSR8670的A2DP只使用前两个L2CAP channel。
建立signalling channel:
/* Outgoing request to a new device */
if ( (device=addDevice(&req->addr))!=NULL )
{ /* Able to support a new connection */
PanicNull( initiateSignalling( device, AVDTP_OUTGOING_CONNECTION_ID, 0 ) ); /* This should never panic */
l2capConnectRequest(CONNECT_DELAY_IMMEDIATE, device, sizeof(a2dp_conftab), (uint16 *)a2dp_conftab);
requestRemoteA2dpVersion(device);
}
建立media transport channel:
case avdtp_connection_connected:
/* Ok to request a media channel */
{ /* No media channel currently being setup, ok to request one */
media_channel *media = initiateMedia(device, AVDTP_OUTGOING_CONNECTION_ID, 0);
if (media != NULL)
{ /* Able to initiate a media connection */
l2capConnectRequest(CONNECT_DELAY_IMMEDIATE, device, sizeof(a2dp_conftab), (uint16*)a2dp_conftab);
}
else
{ /* Unable to initiate any more media connections */
a2dpMediaOpenCfm(device, NULL, a2dp_max_connections);
}
}
break;
signalling channel的建立过程:
一个特别的协议/服务复用值(PSM)被L2CAP用来处理AVDTP消息的交互。AVDTP信令和应答的传输过程:
流管理信令概览:
信令命令:
状态转移简述:
CSR8670使用了Basic Service,只用了signalling channel和media transport channel。
media transport channel是在进入AVDTP_OPEN状态时创建的。
其它service参见AVCTP 5.4 Transport procedures。
Core System Package [Host volume] Part B
The service discovery protocol (SDP) provides a means for applications to discover which services are available and to determine the characteristics of those available services.
SDP shall function while using L2CAP as its transport protocol.
All of the information about a service that is maintained by an SDP server is contained within a single service record. The service record shall only be a list of service attributes.
- 一个service record可包含多个服务属性。
- 属性ID用来指定服务种类
- 一个服务种类对应一个UUID,一个service record包含一个或多个服务种类。
- Attribute values can contain information of various types with arbitrary complexity.
- SDP defines a simple mechanism to describe the data contained within an attribute ID, attribute ID range, and attribute value. The primitive construct used is the data element.
- A data element is a typed data representation. It consists of two fields: a header field and a data field.
CSR8670注册默认Service Record:
/* Client using default library record */
if (role & A2DP_INIT_ROLE_SINK)
{
ConnectionRegisterServiceRecord(&a2dp->task, sizeof(a2dp_sink_service_record), a2dp_sink_service_record);
PRINT(("Register Sink Service Rec\n"));
a2dp->sdp_register_outstanding++;
}
if (role & A2DP_INIT_ROLE_SOURCE)
{
ConnectionRegisterServiceRecord(&a2dp->task, sizeof(a2dp_source_service_record), a2dp_source_service_record);
PRINT(("Register Source Service Rec\n"));
a2dp->sdp_register_outstanding++;
}
}
其中a2dp_source的Service Record:
/* SDP Service Record generated from a2dp_source.sdp by sdpgen.pl */
static const uint8 a2dp_source_service_record[] =
{
0x09, /* ServiceClassIDList(0x0001) */
0x00,
0x01,
0x35, /* DataElSeq 3 bytes */
0x03,
0x19, /* uuid AudioSource(0x110a) */
0x11,
0x0a,
0x09, /* ProtocolDescriptorList(0x0004) */
0x00,
0x04,
0x35, /* DataElSeq 16 bytes */
0x10,
0x35, /* DataElSeq 6 bytes */
0x06,
0x19, /* uuid L2CAP(0x0100) */
0x01,
0x00,
0x09, /* uint16 0x0019 */
0x00,
0x19,
0x35, /* DataElSeq 6 bytes */
0x06,
0x19, /* uuid AVDTP(0x0019) */
0x00,
0x19,
0x09, /* uint16 0x0102 */
0x01,
0x02,
0x09, /* BluetoothProfileDescriptorList(0x0009) */
0x00,
0x09,
0x35, /* DataElSeq 8 bytes */
0x08,
0x35, /* DataElSeq 6 bytes */
0x06,
0x19, /* uuid AdvancedAudioDistribution(0x110d) */
0x11,
0x0d,
0x09, /* uint16 0x0102 */
0x01,
0x02,
0x09, /* SupportedFeatures(0x0311) = "0x0001" */
0x03,
0x11,
0x09, /* uint16 0x0001 */
0x00,
0x01,
}; /* 48 bytes */
属性定义参考Core Spec 4.2 Vol 3, Part B, Service Discovery Protocol 5 Service Attribute Definitions。
两个Service Record注册成功后,注册L2CAP:
void a2dpHandleSdpRegisterCfm(const CL_SDP_REGISTER_CFM_T *cfm)
{
/* Log received cfm message */
a2dp->sdp_register_outstanding--;
if (cfm->status==success)
{
/* Register the l2cap psm if all service records have been registered */
if ( a2dp->sdp_register_outstanding==0 )
{
a2dpRegisterL2cap();
}
}
else
{
/* Send indication that the initialisation failed */
a2dpSendInitCfmToClient(a2dp_sdp_fail);
}
}
Core Spec Vol 3, Part A, Logic Link Control and Adaptation Protocol Specification:
- 多个位于upper layer的控制实体可复用同一个L2CAP通道
- 支持分包和重组
- 支持单个通道的流控制
- 支持错误控制和重传
- 支持音频流
- 支持QoS
CSR8670实施了L2CAP自动连接系统,目的是简少应用程序对连接过程的关注。
首先app层调用a2dpRegisterL2cap:
void a2dpRegisterL2cap(void)
{
ConnectionL2capRegisterRequest(&a2dp->task, AVDTP_PSM, 0);
}
注册成功后,通知app层:
void a2dpHandleL2capRegisterCfm(const CL_L2CAP_REGISTER_CFM_T *cfm)
{
/* Send a confirmation message to the client regardless of the outcome */
a2dpSendInitCfmToClient((cfm->status == success) ? a2dp_success : a2dp_l2cap_fail);
}
收到L2CAP连接请求后,初始化信令并通知app层:
if ( (device=addDevice(&ind->bd_addr))!=NULL )
{ /* Able to support this new connection */
initiateSignalling(device, ind->connection_id, ind->identifier);
/* This must be the signalling channel, so let the app decide whether to accept this connection */
a2dpSignallingConnectInd(device);
}
连接成功后,L2CAP层把L2CAP连接的参数提交给app层:
sink = StreamL2capSink(cfm->cid);
/* Send connect cfm to client */
sendL2capConnectCfm(
appTask,
l2cap_connect_success,
cfm->psm_local, sink,
remote_mtu,
flush_to,
p_qos,
mode,
cfm->cid,
&addr
);
/* Associate the task with its sink */
(void) MessageSinkTask(sink, appTask);
Core Spec Vol 3, Part A, Logic Link Control and Adaptation Protocol Specification:
- A channel identifier (CID) is the local name representing a logical channel endpoint on the device.
- The null identifier (0x0000) shall never be used as a destination endpoint. Identifiers from 0x0001 to 0x003F are reserved for specific L2CAP functions.
- The characteristics of each fixed channel are defined on a per channel basis.
设备间的通道类型有三种:
在CSR8670的TWS模式下,master与slave之间的是signalling channel和connection-oriented channel。
在使用L2CAP功能之前,应用必须注册此通道用到的PSM。
Core Spec 4.2对PSM的描述:
Protocol/Service Multiplexer - PSM (2 octets (minimum))
The PSM field is at least two octets in length. The structure of the PSM field is based on the ISO 3309 extension mechanism for address fields. All PSM values shall be ODD, that is, the least significant bit of the least significant octet must be 1. Also, all PSM values shall have the least significant bit of the most significant octet equal to 0. This allows the PSM field to be extended beyond 16 bits.
PSM values are separated into two ranges. Valid values in the first range are assigned by the Bluetooth SIG and indicate protocols. The second range of values are dynamically allocated and used in conjunction with the Service Discovery Protocol (SDP). The dynamically assigned values may be used to support multiple implementations of a particular protocol.
CSR8670中用到的部分PSM:
可见最后两个PSM属于dynamic。
L2CAP channels may operate in one of five different modes as selected for each L2CAP channel.
The modes are:
- Basic L2CAP Mode (equivalent to L2CAP specification in Bluetooth v1.1)
- Flow Control Mode
- Retransmission Mode
- Enhanced Retransmission Mode
- Streaming Mode
- LE Credit Based Flow Control Mode
CSR8670在注册L2CAP时的模式设置如下:
prim->mode_mask = L2CA_MODE_MASK_BASIC |
L2CA_MODE_MASK_ENHANCED_RETRANS |
L2CA_MODE_MASK_STREAMING;
Core Spec Vol 3, Part A, 5 Configuration Parameter Options:
Maximum Transmission Unit:
- This option specifies the maximum SDU size the sender of this option is capable of accepting for a channel.
- MTU is not a negotiated value, it is an informational parameter that each device can specify independently.
Flush Timeout:
- This option is used to inform the recipient of the Flush Timeout the sender is going to use.
- The Flush Timeout option is negotiable.
Quality of Service(QOS)
- This option specifies a flow specification similar to RFC 1363.
- The QoS option is negotiable. If no QoS configuration parameter is negotiated the link shall assume the default parameters.
- L2CAP implementations are only required to support ’Best Effort’ service, support for any other service type is optional.
Core Spec Vol 2, Part C, Link Manager Protocol Specification:
The Link Manager Protocol (LMP) is used to control and negotiate all aspects of the operation of the Bluetooth connection between two devices.
The Link Manager Protocol is used to communicate between the Link Managers (LM) on the two devices which are connected by the ACL logical transport.
The protocol is made up of a series of messages which shall be transferred over the ACL-C logical link on the default ACL logical transport between two devices.
CSR8670的A2DP用到了LMP的如下功能:
AVRCP SPEC V15:
The Audio/Video Remote Control Profile (AVRCP) defines the features and procedures required in order to ensure interoperability between Bluetooth devices with audio/video control functions in the Audio/Video distribution scenarios. This profile specifies the scope of the AV/C Digital Interface Command Set (AV/C command set, defined by the 1394 Trade Association) to be applied, and it realizes simple implementation and easy operability. This profile adopts the AV/C device model and command format for control messages, and those messages are transported by the Audio/Video Control Transport Protocol (AVCTP). Browsing functionality is provided over a second AVCTP channel, which does not use AV/C
The Baseband, LMP, and L2CAP are the OSI layer 1 and 2 Bluetooth protocols. AVCTP defines the procedures and messages to be exchanged for controlling A/V devices. SDP is the Bluetooth Service Discovery Protocol [10]. AV/C is the entity responsible for AV/C command-based device control signaling. The application is the AVRCP entity, exchanging control and browsing commands as defined in this specification.
The Audio/Video Distribution Control Protocol (hereafter referred to as AVCTP) defines the binary transactions issued between a pair of Bluetooth devices for A/V function discovery and control.
AVCTP uses point-to-point signalling over connection-oriented L2CAP channels that have first to be set up between both devices. L2CAP channels are the most suitable for the support of A/V applications, which require dedicated transport services for A/V content streaming and feature control on the same link.
A complete AVCTP transaction consists of one message containing a command addressed to the target and zero or more messages containing a response returned to the controller by the target.
In this transaction model the response message is not compelled: whether the target sends back one or more response message depends on the application not on the reliability of the transport.
Occasionally large messages need to be fragmented by AVCTP for the transport over more than one L2CAP packet.
Each AVCTP command or response message is transmitted in one or several AVCTP packets that consist of a packet header part and a variable length message information part.
In AVCTP transactions, a Profile Identifier field is used to represent the profile control mechanisms to which the transported message is referring.
CSR8670只使用了AVRCP,因此只有一种PID:
#define AVCTP1_PROFILE_AVRCP_HIGH 0x11
#define AVCTP2_PROFILE_AVRCP_REMOTECONTROL 0x0e
AVRCP的control channel,browsing channel与AVDTP的signal channel共用一个L2CAP channel,但是由于各自使用不同的PSM,L2CAP layer在向upper layer提交时不会混淆。
/* L2CAP AVCTP PSM as defined in the assigned numbers section of the Bluetooth spec. */
#define AVCTP_PSM 0x17
#define AVCTP_BROWSING_PSM 0x1B
/* L2CAP PSM */
#define AVDTP_PSM (0x19)
The following roles are defined for devices that comply with this profile:
The controller (CT) is a device that initiates a transaction by sending a command frame to a target. Examples for CT are a personal computer, a PDA, a mobile phone, a remote controller or an AV device (such as an in car system, headphone, player/recorder, timer, tuner, monitor etc.).
The target (TG) is a device that receives a command frame and accordingly generates a response frame. Examples for TG are an audio player/recorder, a video player/recorder, a TV, a tuner, an amplifier or a headphone.
This profile ensures interoperability by classifying the A/V functions into four categories.
Category 1: Player/Recorder
Basic operations of a player or a recorder are defined, regardless of the type of media (tape, disc, solid state, etc.) or the type of contents (audio or video, etc.).Category 2: Monitor/Amplifier
The category 2 is to define basic operations of a video monitor or an audio amplifier.Category 3: Tuner
The category 3 defines the basic operation of a video tuner or an audio tuner.Category 4: Menu
The basic operations for a menu function are defined in category 4. The method to display menu data is not specified. It may be a display panel of the device itself, or onscreen display (OSD) on an external monitor.
CSR8670的AVRCP的配置如下:
/* Initialise AVRCP library */
config.device_type = avrcp_target_and_controller;
config.supported_controller_features = AVRCP_CATEGORY_1; /* mainly operates as controller */
config.supported_target_features = AVRCP_CATEGORY_2; /* only target for volume commands */
#ifdef ENABLE_PEER
config.supported_target_features |= AVRCP_CATEGORY_1; /* Peer devices also a target for category 1 commands (play, pause etc) */
#endif
config.profile_extensions = AVRCP_VERSION_1_6; /* operate as AVRCP 1.6 device */
#ifdef ENABLE_AVRCP_BROWSING
config.profile_extensions |= AVRCP_BROWSING_SUPPORTED; /* indicate Browsing support */
#endif
设备被定义为同时支持种类1和种类2。在TWS会话当中,master相对于AV而言符合种类2,相对于slave而言符合种类1。
2.3.1.4 Mutual Remote Control within a Piconet
In the configuration shown in Figure 2.6 below, both the headphone and the portable disc player are capable of working as remote controllers.
For example, the portable disc player becomes a CT if it controls the volume of the headphone that becomes a TG. On the other hand, the headphone becomes a CT when it sends a command to start playback or stop playing to the portable disc as a TG.
如果设备支持种类1,TG状态必须支持特性10、12、17、13、14,CT状态必须支持特性13、14。如果设备支持种类2,TG和CT状态都必须支持特性16。特性22虽然是可选的,但在CSR8670的TWS模式中被作为重点使用。
An L2CAP connection establishment for AVCTP control may be initiated by the CT or by the TG. An internal event or an event generated by a user, such as turning the power on, initiates the connection establishment.
Note: Only one L2CAP connection for control and one L2CAP connection for browsing (if supported by both devices) shall be established between AVCTP entities. If the connection(s) already exist(s), the CT/TG shall not initiate the connection request.
CSR8670在建立AVCTP控制连接之前已经建立了AVDTP连接,因此只需要与AVDTP共用一个L2CAP连接。
Release of an L2CAP connection for AVCTP may be initiated by the CT or by the TG. An internal event or an event generated by a user, such as turning the power off, initiates the connection release.
If a browsing channel is present it shall be released before the control channel. If the browsing channel has been released it may be re-established if required as long as the control channel is still present.
Upon an internal or an event generated by a user, the CT shall initiate connection establishment if a connection has not been established by then. Once the connection is established it can send an AV/C command.
在收到VENDOR DEPENDENT命令时才会返回AV/C interim应答。
某些特殊情况下,TG不会返回应答。The UNIT INFO command is used to obtain information that pertains to the AV/C unit as a whole. The response frame includes information of the vendor ID of the TG and subunit type that best describes the unit. The information of vendor ID may be used to investigate the vendor of TG before using VENDOR DEPENDENT command.
The SUBUNIT INFO command is used to obtain information about the subunit(s) of an AV/C unit. A device with this profile may support other subunits than the panel subunit if other profiles co-exist in the device, which can be found with the SUBUNIT INFO command. With this command, a typical AV/C controller manipulates AV/C function discovery.
The VENDOR DEPENDENT command permits module vendors to specify their own set of commands and responses for AV/C units or subunits determined by the AV/C address that is contained in the AV/C frame.
这个情景模式的一个特性就是用面板子单元的PASS THROUGH命令完成远程控制。面板子单元提供一种用户为中心的模式以使设备动作。CT使用已确定的依赖于CT的用户操作以控制面板子单元。用户操作显示器上的用户接口或者操作按键,然后CT发送命令给面板子单元。为了回应这些命令,面板子单元完成一些动作。虽然在TG内有许多子单元,TG只能有一个面板子单元。不像许多其他AV/C子单元,面板子单元自己不会直接处理媒体音频流。使用面板子单元的主要目的是将输入的用户动作命令翻译成会影响其他子单元的内部的动作,且根据TG依赖性将这些动作分发给TG内部的合适的其它子单元。这个情景模式使用PASS THROUGH命令,这个命令属于定义于面板子单元规范内的子单元命令中的一种。CT使用PASS THROUGH命令传输一个用户操作给TG。
The procedure of AVRCP specific AV/C commands is an extension of the AV/C Digital Interface Command Set General Specification specified by 1394 Trade Association.
The extension is implemented by defining VENDOR DEPENDENT and PASS THROUGH commands within the framework of the 1394 specifications. A vendor ID for the Bluetooth SIG is used to differentiate from real vendor specific commands.
The procedure of AVRCP Browsing commands defines commands to be used directly over AVCTP. AV/C is not used. The AVCTP Browsing Channel shall not use fragmentation. These commands enable the CT to navigate the media on the TG device, then perform operations on a specific media item.
CSR8670的avrcp lib可以支持browsing。
If the unit implements only this profile, it shall return the PANEL subunit in the response frame.
In the company_ID field of a UNIT INFO response frame, the 24-bit unique ID obtained from the IEEE Registration Authority Committee shall be inserted. If the vendor of a TG device does not have the unique ID above, the value 0xFFFFFF may be used.
CSR8670的UNIT INFO命令的应答函数:
static void handleAvrcpUnitInfoInd(AVRCP_UNITINFO_IND_T *msg)
{
/* Device is a CT and TG, so send the correct response to UnitInfo requests. */
uint32 company_id = 0xffffff; /* IEEE RAC company ID can be used here */
AvrcpUnitInfoResponse(msg->avrcp, TRUE, subunit_panel, 0, company_id);
}
If the unit implements this profile, it shall return PANEL subunit in the subunit_type field, and value 0 in the max_subunit_ID field in the response frame.
CSR8670的SUBUNIT INFO命令的应答函数:
static void handleAvrcpSubUnitInfoInd(AVRCP_SUBUNITINFO_IND_T *msg)
{
/* Device is a CT and TG, so send the correct response to SubUnitInfo requests. */
uint8 page_data[4];
page_data[0] = 0x48; /* subunit_type: panel; max_subunit_ID: 0 */
page_data[1] = 0xff;
page_data[2] = 0xff;
page_data[3] = 0xff;
AvrcpSubUnitInfoResponse(msg->avrcp, TRUE, page_data);
}
It is assumed that devices that do not support this metadata transfer related features shall return a response of NOT IMPLEMENTED
CSR8670不支持公共单元和子单元的VENDOR DEPENDENT命令,其应答函数如下:
static void handleAvrcpVendorDependentInd(AVRCP_VENDORDEPENDENT_IND_T *msg)
{
/* Reject all vendor requests. */
AvrcpVendorDependentResponse(msg->avrcp, avctp_response_not_implemented);
}
The PASS THROUGH command of the Panel subunit is used in this profile.
Attention is particularly drawn to the state_flag which shall be used to convey button press and release and the timing requirements for button press and release. This facility is required to convey the concept of holding down a button for a period of time.
There are AVRCP specific vendor unique PASS THROUGH commands to handle group navigation capability.
CSR8670支持面板子单元的PASS THROUGH命令。
PASS THROUGH不仅可以传递按键值,还可以传递按键状态。
CSR8670在TWS模式下同时支持种类1和种类2。
CT应有能力获取TG的能力,包括:
Player application settings commands provide a mechanism for CT devices to query player application set.
Metadata attributes for the currently playing media element may be retrieved by the CT using the GetElementAttributes command.
CSR8670在TWS模式下支持的事件:
Continuation commands provide protocol capability for sender and receiver to be able to segment and reassemble packets over AV/C.
Note that Continuation is required due to the limit of 512 octets per AV/C frame. Continuation is therefore only necessary for AV/C commands.
Group navigation provides the ability for CT to logically view TG media storage as a flat structure. Groups are logical blocks of media tracks defined by TG. This could be play lists, folders or any other logical structure as deemed fit by TG. By doing this CT shall be able to move to next and previous groups on TG without any knowledge on the media storage mechanism of TG.
Many media players support the concept of a Now Playing list or Queue.
Although a media player application may not support the concept of a Now Playing list natively there are a variety of ways in which it could choose to populate the Now Playing list.
The Now Playing list may be examined using AVRCP browsing functionality.
Media elements are identified within the virtual filesystem by an 8 octet identifier, the UID.
The UID Counter allows the CT device to detect updates on the TG device.
The search functionality allows the CT to locate specific media elements on the TG.
Advanced search facilities, such as search on artist are not supported. However, equivalent filtering may be possible using search within folder on folders which contain specific types of content, as folders have properties which include the type of content they hold
Browsing functionality allows a CT device to navigate and view media content on the TG.
- The Media Player List contains available media players.
- The Virtual Media Filesystem is a representation of the Media Elements and Folders present on the TG.
- The Search folder contains the results of the last search performed by the CT.
- The Now Playing folder contains the list of Media Elements that are currently scheduled to be played by the Addressed Player on the TG.
所有AV/C传输都应遵循下列时间周期,除非有明确的特定。