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

Commit 4fa89d11 authored by Vignesh Kulothungan's avatar Vignesh Kulothungan Committed by Gerrit - the friendly Code Review server
Browse files

hal: update GKI flag

Update GKI flag as AUDIO_GKI_ENABLED.
Add GKI feature flag check for compress passthru module.
Use reserved variable for flags when GKI is enabled in
compress passthru.

Change-Id: Id6dfadb55590fbdbcebed34c2c235ad2da66a08b
parent 290e65b6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -327,7 +327,7 @@ ifeq ($(strip $(AUDIO_FEATURE_ENABLED_INSTANCE_ID)), true)
    LOCAL_CFLAGS += -DINSTANCE_ID_ENABLED
endif

# Hardware specific feature
# Kernel specific feature
ifeq ($(strip $(AUDIO_FEATURE_ENABLED_GKI)), true)
    LOCAL_CFLAGS += -DAUDIO_GKI_ENABLED
endif
+5 −0
Original line number Diff line number Diff line
@@ -622,6 +622,11 @@ ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DLKM)),true)
  LOCAL_ADDITIONAL_DEPENDENCIES += $(BOARD_VENDOR_KERNEL_MODULES)
endif

# Kernel specific feature
ifeq ($(strip $(AUDIO_FEATURE_ENABLED_GKI)), true)
    LOCAL_CFLAGS += -DAUDIO_GKI_ENABLED
endif

LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_HEADER_LIBRARIES += libsystem_headers
ifneq ($(filter kona lahaina,$(TARGET_BOARD_PLATFORM)),)
+8 −2
Original line number Diff line number Diff line
@@ -63,9 +63,15 @@ uint64_t timestamp;
};
#define compress_config_set_timstamp_flag(config) (-ENOSYS)
#else
#ifdef AUDIO_GKI_ENABLED
/* (config).codec->reserved[1] is for flags */
#define compress_config_set_timstamp_flag(config) \
            (config)->codec->reserved[1] |= COMPRESSED_TIMESTAMP_FLAG
#else
#define compress_config_set_timstamp_flag(config) \
            (config)->codec->flags |= COMPRESSED_TIMESTAMP_FLAG
#endif
#endif /* AUDIO_GKI_ENABLED */
#endif /* COMPRESSED_TIMESTAMP_FLAG */

#define COMPRESS_RECORD_NUM_FRAGMENTS 8

@@ -338,7 +344,7 @@ int cin_configure_input_stream(struct stream_in *in, struct audio_config *in_con
        flags |= audio_extn_utils_get_perf_mode_flag();
    }

#ifdef AUDIO_QGKI_ENABLED
#ifdef AUDIO_GKI_ENABLED
    /* out->compr_config.codec->reserved[0] is for compr_passthr */
    cin_data->compr_config.codec->reserved[0] = compr_passthr;
    /* out->compr_config.codec->reserved[1] is for flags */
+2 −2
Original line number Diff line number Diff line
@@ -250,7 +250,7 @@ bool passthru_should_drop_data(struct stream_out * out)
     *stream has PCM format or
     *if a compress offload (DSP decode) session
     */
#ifdef AUDIO_QGKI_ENABLED
#ifdef AUDIO_GKI_ENABLED
    /* out->compr_config.codec->reserved[0] is for compr_passthr */
    compr_passthr = out->compr_config.codec->reserved[0];
#else
@@ -486,7 +486,7 @@ void passthru_update_stream_configuration(
       }
    }

#ifdef AUDIO_QGKI_ENABLED
#ifdef AUDIO_GKI_ENABLED
    /* out->compr_config.codec->reserved[0] is for compr_passthr */
    out->compr_config.codec->reserved[0] = compr_passthr;
#else