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

Commit 302934e4 authored by juyuchen's avatar juyuchen Committed by android-build-team Robot
Browse files

audio: enable 24bits camcorder



Bug: 113776612
Bug: 118022272
Test: manaul audio test

Change-Id: I4563fbd0fb799aa4977aaf532b98844d5aa7a37f
Signed-off-by: default avatarjuyuchen <juyuchen@google.com>
(cherry picked from commit be5c67e7)
parent a384019d
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -200,6 +200,10 @@ ifeq ($(strip $(AUDIO_FEATURE_ENABLED_MAXX_AUDIO)), true)
    LOCAL_SRC_FILES += audio_extn/maxxaudio.c
    LOCAL_SRC_FILES += audio_extn/maxxaudio.c
endif
endif


ifeq ($(strip $(AUDIO_FEATURE_ENABLED_24BITS_CAMCORDER)), true)
    LOCAL_CFLAGS += -DENABLED_24BITS_CAMCORDER
endif

ifeq ($(strip $(AUDIO_FEATURE_ENABLED_BG_CAL)),true)
ifeq ($(strip $(AUDIO_FEATURE_ENABLED_BG_CAL)),true)
    LOCAL_CFLAGS += -DBG_CODEC_CAL
    LOCAL_CFLAGS += -DBG_CODEC_CAL
endif
endif
+15 −1
Original line number Original line Diff line number Diff line
@@ -540,6 +540,20 @@ static bool is_supported_format(audio_format_t format)
    return false;
    return false;
}
}


static bool is_supported_24bits_audiosource(audio_source_t source)
{
    switch (source) {
        case AUDIO_SOURCE_UNPROCESSED:
#ifdef ENABLED_24BITS_CAMCORDER
        case AUDIO_SOURCE_CAMCORDER:
#endif
            return true;
        default:
            break;
    }
    return false;
}

static inline bool is_mmap_usecase(audio_usecase_t uc_id)
static inline bool is_mmap_usecase(audio_usecase_t uc_id)
{
{
    return (uc_id == USECASE_AUDIO_RECORD_AFE_PROXY) ||
    return (uc_id == USECASE_AUDIO_RECORD_AFE_PROXY) ||
@@ -5083,7 +5097,7 @@ static int adev_open_input_stream(struct audio_hw_device *dev,


           on error flinger will retry with supported format passed
           on error flinger will retry with supported format passed
         */
         */
        if (source != AUDIO_SOURCE_UNPROCESSED) {
        if (!is_supported_24bits_audiosource(source)) {
            config->format = AUDIO_FORMAT_PCM_16_BIT;
            config->format = AUDIO_FORMAT_PCM_16_BIT;
            ret_error = true;
            ret_error = true;
        } else if (config->format != AUDIO_FORMAT_PCM_8_24_BIT) {
        } else if (config->format != AUDIO_FORMAT_PCM_8_24_BIT) {