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

Commit fd4323f9 authored by Ramjee Singh's avatar Ramjee Singh Committed by Gerrit - the friendly Code Review server
Browse files

hal: fix compilation issues with audio FM extention.

- Update FM device references to match latest
  definitions to fix compilation of FM extention.
- Update FM feature flag for power optimization

Change-Id: I17a9e240e552c4089d3e9c7a25e437fb5b5433f9
parent eb605c95
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -46,8 +46,8 @@ ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PROXY_DEVICE)),true)
    LOCAL_CFLAGS += -DAFE_PROXY_ENABLED
endif

ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FM)),true)
    LOCAL_CFLAGS += -DFM_ENABLED
ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FM_POWER_OPT)),true)
    LOCAL_CFLAGS += -DFM_POWER_OPT
    LOCAL_SRC_FILES += audio_extn/fm.c
endif

+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ static struct audio_extn_module aextnmod = {
#define AUDIO_PARAMETER_KEY_ANC        "anc_enabled"
#define AUDIO_PARAMETER_KEY_WFD        "wfd_channel_cap"
#define AUDIO_PARAMETER_CAN_OPEN_PROXY "can_open_proxy"
#ifndef FM_ENABLED
#ifndef FM_POWER_OPT
#define audio_extn_fm_set_parameters(adev, parms) (0)
#else
void audio_extn_fm_set_parameters(struct audio_device *adev,
+2 −7
Original line number Diff line number Diff line
@@ -42,13 +42,8 @@
#define AUDIO_OUTPUT_FLAG_INCALL_MUSIC 0x8000
#endif

#ifndef FM_ENABLED
#define AUDIO_DEVICE_OUT_FM 0x80000
#define AUDIO_DEVICE_OUT_FM_TX 0x100000
#define AUDIO_SOURCE_FM_RX 9
#define AUDIO_SOURCE_FM_RX_A2DP 10
#define AUDIO_DEVICE_IN_FM_RX (AUDIO_DEVICE_BIT_IN | 0x8000)
#define AUDIO_DEVICE_IN_FM_RX_A2DP (AUDIO_DEVICE_BIT_IN | 0x10000)
#ifndef AUDIO_DEVICE_OUT_FM_TX
#define AUDIO_DEVICE_OUT_FM_TX 0x8000000
#endif


+2 −2
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@
#include <stdlib.h>
#include <cutils/str_parms.h>

#ifdef FM_ENABLED
#ifdef FM_POWER_OPT
#define AUDIO_PARAMETER_KEY_HANDLE_FM "handle_fm"
#define AUDIO_PARAMETER_KEY_FM_VOLUME "fm_volume"

@@ -280,4 +280,4 @@ void audio_extn_fm_set_parameters(struct audio_device *adev,
exit:
    ALOGV("%s: exit", __func__);
}
#endif /* FM_ENABLED end */
#endif /* FM_POWER_OPT end */