Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd10201a authored by Pavlin Radoslavov's avatar Pavlin Radoslavov
Browse files

Split btif_media_task into Source, Sink and Control

* btif/include/btif_a2dp.h and btif/src/btif_a2dp.cc implement
  the entry points for the BTIF A2DP module.

* btif/include/btif_a2dp_source.h and btif/src/btif_a2dp_source.cc implement
  the BTIF A2DP Source component.

* btif/include/btif_a2dp_sink.h and btif/src/btif_a2dp_sink.cc implement
  the BTIF A2DP Sink component.

* btif/include/btif_a2dp_control.h and btif/src/btif_a2dp_control.cc
  implement the A2DP control mechanism for the audio channel from the
  Media Framework.

Also:
* Removed BTA_AV_SBC_HDR_SIZE and used A2D_SBC_MPL_HDR_LEN instead.
* Removed BTIF_AV_SINK_FOCUS_REQ_EVT, because it is not used.
* Removed many of the "#if (BTA_AV_SINK_INCLUDED == TRUE)" guards.
* Removed "#ifdef USE_AUDIO_TRACK" guard, and always compile the
  corresponding code.
* Removed tBTIF_AV_MEDIA_FEEDINGS_PCM_STATE and moved its state
  to tBTIF_AV_MEDIA_FEEDINGS_STATE .

Bug: 30958229
Test: TestTracker/65192
Change-Id: I20bc52a1d7a7f03c92628a1562f14b7df3ebb445
parent f51d6f05
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -562,9 +562,7 @@ typedef struct
    alarm_t             *link_signalling_timer;
    alarm_t             *accept_signalling_timer; /* timer to monitor signalling when accepting */
    uint32_t            sdp_a2d_handle; /* SDP record handle for audio src */
#if (BTA_AV_SINK_INCLUDED == TRUE)
    uint32_t            sdp_a2d_snk_handle; /* SDP record handle for audio snk */
#endif
    uint32_t            sdp_vdp_handle; /* SDP record handle for video src */
    tBTA_AV_FEAT        features;       /* features mask */
    tBTA_SEC            sec_mask;       /* security mask */
+0 −2
Original line number Diff line number Diff line
@@ -614,9 +614,7 @@ static void bta_av_api_register(tBTA_AV_DATA *p_data)
            if(!bta_av_cb.reg_audio)
            {
                bta_av_cb.sdp_a2d_handle = 0;
#if (BTA_AV_SINK_INCLUDED == TRUE)
                bta_av_cb.sdp_a2d_snk_handle = 0;
#endif
                if (profile_initialized == UUID_SERVCLASS_AUDIO_SOURCE)
                {
                    /* create the SDP records on the 1st audio channel */
+0 −7
Original line number Diff line number Diff line
@@ -25,13 +25,6 @@
#ifndef BTA_AV_SBC_H
#define BTA_AV_SBC_H

/*****************************************************************************
**  constants
*****************************************************************************/

/* SBC packet header size */
#define BTA_AV_SBC_HDR_SIZE         A2D_SBC_MPL_HDR_LEN

#ifdef __cplusplus
extern "C" {
#endif
+5 −1
Original line number Diff line number Diff line
@@ -28,6 +28,11 @@ btifCommonSrc += \

# BTIF implementation
btifCommonSrc += \
  ../audio_a2dp_hw/audio_a2dp_hw_utils.cc \
  src/btif_a2dp.cc \
  src/btif_a2dp_control.cc \
  src/btif_a2dp_sink.cc \
  src/btif_a2dp_source.cc \
  src/btif_av.cc \
  src/btif_avrcp_audio_track.cc \
  src/btif_ble_advertiser.cc \
@@ -48,7 +53,6 @@ btifCommonSrc += \
  src/btif_hh.cc \
  src/btif_hl.cc \
  src/btif_sdp.cc \
  src/btif_media_task.cc \
  src/btif_pan.cc \
  src/btif_profile_queue.cc \
  src/btif_rc.cc \
+5 −1
Original line number Diff line number Diff line
@@ -16,6 +16,11 @@

static_library("btif") {
  sources = [
    "//audio_a2dp_hw/audio_a2dp_hw_utils.cc",
    "src/btif_a2dp.cc",
    "src/btif_a2dp_control.cc",
    "src/btif_a2dp_sink.cc",
    "src/btif_a2dp_source.cc",
    "src/btif_av.cc",

    #TODO(jpawlowski): heavily depends on Android,
@@ -40,7 +45,6 @@ static_library("btif") {
    "src/btif_hh.cc",
    "src/btif_hl.cc",
    "src/btif_mce.cc",
    "src/btif_media_task.cc",
    "src/btif_pan.cc",
    "src/btif_profile_queue.cc",
    "src/btif_rc.cc",
Loading