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

Commit 0cddf15d authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

audioflinger: Allow bundling the A2DP interface

The A2DP interface is usually built into the audiointerface static
lib, which gets integrated into libaudio.
However, if we're using a proprietary binary libaudio, we may not
want to use the A2DP implementation that comes with it; this
patch (enabled by the BOARD_FORCE_STATIC_A2DP option) forces
libaudioflinger to include its own A2DP implementation and ignore
the proprietary one.

Change-Id: Ib807109f668854bcae1dbf3f1e870c969f6c30c0
parent 3a0c73d3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@
#include <utils/Log.h>
#include <utils/String8.h>

#include "A2dpAudioInterface.h"
#include <A2dpAudioInterface.h>
#include "audio/liba2dp.h"


+6 −0
Original line number Diff line number Diff line
@@ -103,11 +103,17 @@ else
 LOCAL_SHARED_LIBRARIES += libdl
endif


LOCAL_MODULE:= libaudioflinger

ifeq ($(BOARD_HAVE_BLUETOOTH),true)
  LOCAL_CFLAGS += -DWITH_BLUETOOTH -DWITH_A2DP
  LOCAL_SHARED_LIBRARIES += liba2dp
ifeq ($(BOARD_FORCE_STATIC_A2DP),true)
  LOCAL_CFLAGS += -DWITH_STATIC_A2DP
  LOCAL_SRC_FILES += A2dpAudioInterface.cpp
  LOCAL_C_INCLUDES += $(call include-path-for, bluez)
endif
endif

ifeq ($(AUDIO_POLICY_TEST),true)
+5 −0
Original line number Diff line number Diff line
@@ -138,6 +138,11 @@ AudioFlinger::AudioFlinger()

    mAudioHardware = AudioHardwareInterface::create();

#ifdef WITH_STATIC_A2DP
    mAudioHardware = new A2dpAudioInterface(mAudioHardware);
#endif


    mHardwareStatus = AUDIO_HW_INIT;
    if (mAudioHardware->initCheck() == NO_ERROR) {
        // open 16-bit output stream for s/w mixer