Android Bluetooth Stack: Bluedroid(二):AVRCP演进

来源:互联网 发布:信息推广软件 编辑:程序博客网 时间:2024/06/16 05:47

    AVRCP(Audio/Video Remote Control Profile)提供了如下主要功能:

  • 通过蓝牙耳机(比如Sony WM600,SBH50)或车载控制台控制手机上音乐播放
  • 在蓝牙耳机或车载控制台上显示手机上音乐播放的状态,歌名,歌手等信息
  • 在蓝牙耳机或车载控制台上浏览手机上的音乐文件,显示播放列表
AVRCP有几个版本,随着版本的演进,功能不断增加,以下是具体每个版本的功能:

  • 1.0—Basic remote control commands (play/pause/stop, etc.)
  • 1.3—all of 1.0 plus metadata and media-player state support
    • The status of the music source (playing, stopped, etc.)
    • Metadata information on the track itself (artist, track name, etc.).
  • 1.4—all of 1.0 and 1.3 plus media browsing capabilities for multiple media players
    • Browsing and manipulation of multiple players
    • Browsing of media metadata per media player, including a "Now Playing" list
    • Basic search capabilities
  • 1.5—all of 1.0, 1.3 and 1.4 plus specification corrections and clarifications to absolute volume control, browsing and other features
目前,主流设备支持到AVRCP 1.3,少部分设备支持AVRCP 1.4。但是AVRCP 1.4有很多问题,标准不够明确和完善,因此推出了AVRCP 1.5来修正AVRCP 1.4的问题。AVRCP 1.4最终应该会被废弃,由AVRCP 1.5来取代它。AVRCP 1.5在功能上和AVRCP 1.4相比,并没有增加。现在AVRCP还在继续演进中,比如显示唱片封面。更多详细的资料请到bluetooth.org注册并下载。

    AVRCP定义了两种role:Controller和Target。蓝牙耳机或车载控制台是Controller,手机则是Target。在Android 4.3之前,AOSP(Android Open Source Project)只对AVRCP 1.0提供了支持;一些厂商,比如Sony,和第三方ROM,比如CyanogenMod,在Android上基于BlueZ实现了对AVRCP 1.3/1.4的支持。Android 4.2把Bluetooth stack换成Bluedroid之后,依然只支持AVRCP 1.0,导致一些升级到Android 4.2的手机用户非常不满。

    在最新的Android 4.3中,Bluedroid和Media Player终于提供了对AVRCP 1.3的支持。但是何时能提供对AVRCP 1.4/1.5的支持,目前还不得而知。对AVRCP 1.4/1.5的支持,需要Bluedroid和Music Player都做相应的改进,其开发难度要大于对AVRCP 1.3的支持。尤其是Browsing的功能,大量的工作是在Music Player这边。另外,BlueZ已经支持AVRCP 1.4/1.5,但是还在持续的完善和改进中。

    以下为AVRCP 1.4 spec增加的新内容

  • New Scenarios
    • Remote Control from Car Audio System
The controller(CT) is the car audio system and the mobile phone is the target(TG).
The user browsers the available media on the mobile phone via the car interface. The user may then perform actions triggering retrieval of media metadata from the phone, and perform other control operations.
  • New Feature Support
    • Connection establishment for browsing
    • Release connection for browsing
    • Absolute Volume
    • Media Player Selection
      • Supports Multiple Players
    • Browsing
      • Database Aware Players
    • Search
    • Now Playing
      • Playable Folders
  • Sections related New Features
    • 4.1.6 Procedure of AVRCP Browsing commands
    • 4.4.1 PASS THROUGH Command
    • 6.3.2 AVRCP Specific Browsing Commands
    • 6.7.2 RegisterNofitcation
      • Volume Changed 6.13.3
    • 6.9 Media Player Selection
      • SetAdressedPlayer
      • Addressed Player Changed Notification
      • SetBrowsedPlayer
      • Available Players Changed Notification
      • Notify Now Playing Content Changed
    • 6.10 Media Content Navigation
      • Scope: Media Player List, Media Player Virtual Filesystem, Search results, Now Playing
      • Browsable Items
      • UIDs
        • Database Unaware/Aware Players (Without/With UID change detection)
        • UIDs Changed Notification
      • Browsing Commands
    • 6.11 Search
    • 6.12 Item Operations
      • Play item by UID
      • Add-To Now Playing
    • 6.13 Volume Handling
      • SetAbsoluteVomume
      • Notify volume change
    • 6.15.2 Error handling for Breowsing Commands
    • 8 Service Discovery Interoperability Requirements
    • 9 L2CAP Interoperability Requirements
      • Retransmission and Flow Control
      • Configuration of the Browsing Channel
    • 25 List of defined notification events
    • 28 UID scheme

注:以上提到的蓝牙耳机特指有LCD显示和遥控的蓝牙耳机。