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

Commit 28291bb1 authored by Eric Laurent's avatar Eric Laurent Committed by Michael Bestas
Browse files

compress offload: use new sample rate representation.

Pass directly the sample rate value to struct snd_codec
instead of the ALSA enum.

Bug: 17398311.
Change-Id: I79483773807ce3b0b146fde28d6498444c69fe89
parent 7940793f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -148,6 +148,10 @@ ifeq ($(strip $(AUDIO_FEATURE_ENABLED_COMPRESS_CAPTURE)),true)
    LOCAL_SRC_FILES += audio_extn/compress_capture.c
endif

ifneq ($(strip $(AUDIO_FEATURE_ENABLED_NEW_SAMPLE_RATE)),false)
    LOCAL_CFLAGS += -DNEW_SAMPLE_RATE_ENABLED
endif

ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DTS_EAGLE)),true)
    LOCAL_CFLAGS += -DDTS_EAGLE
    LOCAL_SRC_FILES += audio_extn/dts_eagle.c
+5 −0
Original line number Diff line number Diff line
@@ -3175,8 +3175,13 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
               platform_get_compress_offload_buffer_size(&config->offload_info);
            out->compr_config.fragments = COMPRESS_OFFLOAD_NUM_FRAGMENTS;
        }
#ifdef NEW_SAMPLE_RATE_ENABLED
        out->compr_config.codec->sample_rate =
                    config->offload_info.sample_rate;
#else
        out->compr_config.codec->sample_rate =
                    compress_get_alsa_rate(config->offload_info.sample_rate);
#endif
        out->compr_config.codec->bit_rate =
                    config->offload_info.bit_rate;
        out->compr_config.codec->ch_in =