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

Commit 2ec445fe authored by Preetam Singh Ranawat's avatar Preetam Singh Ranawat
Browse files

hal : Avoid use of small buf flag and bit width info.

 -small buf flag and bit width info are not member of offload into
  structure.
 -avoid use of small buf flag and bit width info, use PCM offload
  format.

Change-Id: I1291e3d0ade43a0d7412e29abb2383c713d1e40f
parent 6e3883ba
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@
#define audio_is_offload_pcm(format) (0)
#define OFFLOAD_USE_SMALL_BUFFER false
#else
#define OFFLOAD_USE_SMALL_BUFFER (info->use_small_bufs)
#define OFFLOAD_USE_SMALL_BUFFER ((info->format & AUDIO_FORMAT_PCM_OFFLOAD) == AUDIO_FORMAT_PCM_OFFLOAD)
#endif

#ifndef AFE_PROXY_ENABLED
@@ -97,7 +97,8 @@ int audio_extn_parse_compress_metadata(struct stream_out *out,
#endif

#ifdef PCM_OFFLOAD_ENABLED_24
#define PCM_OUTPUT_BIT_WIDTH (config->offload_info.bit_width)
#define PCM_OUTPUT_BIT_WIDTH (((config->offload_info.format & AUDIO_FORMAT_PCM_24_BIT_OFFLOAD) ==  \
                             (AUDIO_FORMAT_PCM_24_BIT_OFFLOAD)) ? 24 : CODEC_BACKEND_DEFAULT_BIT_WIDTH)
#else
#define PCM_OUTPUT_BIT_WIDTH (CODEC_BACKEND_DEFAULT_BIT_WIDTH)
#endif
+1 −1
Original line number Diff line number Diff line
@@ -2895,7 +2895,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
        else
            out->compr_config.codec->id =
                get_snd_codec_id(config->offload_info.format);
        if (audio_is_offload_pcm(config->offload_info.format)) {
        if ((config->offload_info.format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_PCM_OFFLOAD) {
            out->compr_config.fragment_size =
               platform_get_pcm_offload_buffer_size(&config->offload_info);
        } else if (audio_extn_dolby_is_passthrough_stream(out->flags)) {