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

Commit b27354b1 authored by Sharad Sangle's avatar Sharad Sangle Committed by Gerrit - the friendly Code Review server
Browse files

hal: compilation fix for extended feature flags

- Fix compilation error for offload, Dolby,
  HDMI pass through, FLAC decoder, and hardware
  accelerated effects when extended feature
  flags are disabled.

Change-Id: If64d5fa5d124b42d40d7e123b887db8e0a5d7426
parent f22706d0
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -46,6 +46,9 @@
#define AUDIO_FORMAT_PCM_24_BIT_OFFLOAD (AUDIO_FORMAT_PCM_OFFLOAD | AUDIO_FORMAT_PCM_SUB_8_24_BIT)
#define AUDIO_OFFLOAD_CODEC_FORMAT  "music_offload_codec_format"
#define audio_is_offload_pcm(format) (0)
#define OFFLOAD_USE_SMALL_BUFFER false
#else
#define OFFLOAD_USE_SMALL_BUFFER (info->use_small_bufs)
#endif

#ifndef AFE_PROXY_ENABLED
@@ -314,6 +317,9 @@ void audio_extn_check_and_set_dts_hpx_state(const struct audio_device *adev);
void audio_extn_dolby_set_dmid(struct audio_device *adev);
#else
#define audio_extn_dolby_set_dmid(adev)                 (0)
#define AUDIO_CHANNEL_OUT_PENTA (AUDIO_CHANNEL_OUT_QUAD | AUDIO_CHANNEL_OUT_FRONT_CENTER)
#define AUDIO_CHANNEL_OUT_SURROUND (AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT | \
                                    AUDIO_CHANNEL_OUT_FRONT_CENTER | AUDIO_CHANNEL_OUT_BACK_CENTER)
#endif


@@ -360,6 +366,7 @@ void audio_extn_dolby_send_ddp_endp_params(struct audio_device *adev);
#define audio_extn_dolby_get_passt_buffer_size(info)                       (0)
#define audio_extn_dolby_set_passt_volume(out, mute)                       (0)
#define audio_extn_dolby_set_passt_latency(out, latency)                   (0)
#define AUDIO_OUTPUT_FLAG_COMPRESS_PASSTHROUGH  0x4000
#else
int audio_extn_dolby_update_passt_formats(struct audio_device *adev,
                                          struct stream_out *out);
+1 −1
Original line number Diff line number Diff line
@@ -2903,7 +2903,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
        if (flags & AUDIO_OUTPUT_FLAG_NON_BLOCKING)
            out->non_blocking = 1;

        if (config->offload_info.use_small_bufs) {
        if (platform_use_small_buffer(&config->offload_info)) {
            //this flag is set from framework only if its for PCM formats
            //no need to check for PCM format again
            out->non_blocking = 0;
+5 −1
Original line number Diff line number Diff line
@@ -3345,7 +3345,7 @@ uint32_t platform_get_pcm_offload_buffer_size(audio_offload_info_t* info)
        bits_per_sample = 32;
    }

    if (info->use_small_bufs) {
    if (platform_use_small_buffer(info)) {
        pcm_offload_time = PCM_OFFLOAD_BUFFER_DURATION_FOR_SMALL_BUFFERS;
    } else {
        if (!info->has_video) {
@@ -3609,6 +3609,10 @@ int platform_set_usecase_pcm_id(audio_usecase_t usecase, int32_t type, int32_t p
done:
    return ret;
}
bool platform_use_small_buffer(audio_offload_info_t* info)
{
    return OFFLOAD_USE_SMALL_BUFFER;
}

void platform_get_device_to_be_id_map(int **device_to_be_id, int *length)
{
+5 −0
Original line number Diff line number Diff line
@@ -1107,6 +1107,11 @@ uint32_t platform_get_pcm_offload_buffer_size(audio_offload_info_t* info __unuse
    return 0;
}

bool platform_use_small_buffer(audio_offload_info_t* info)
{
    return false;
}

int platform_get_edid_info(void *platform __unused)
{
   return -ENOSYS;
+5 −0
Original line number Diff line number Diff line
@@ -3064,6 +3064,11 @@ uint32_t platform_get_pcm_offload_buffer_size(audio_offload_info_t* info)
    return fragment_size;
}

bool platform_use_small_buffer(audio_offload_info_t* info)
{
    return OFFLOAD_USE_SMALL_BUFFER;
}

int platform_set_codec_backend_cfg(struct audio_device* adev,
                         unsigned int bit_width, unsigned int sample_rate)
{
Loading