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

Commit 13388a25 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "hal: Add property to set TrueHD buffer size"

parents 6bf47a6f f911152d
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -6339,9 +6339,18 @@ uint32_t platform_get_compress_passthrough_buffer_size(
                                          audio_offload_info_t* info)
{
    uint32_t fragment_size = MIN_COMPRESS_PASSTHROUGH_FRAGMENT_SIZE;
    char value[PROPERTY_VALUE_MAX] = {0};

    if (((info->format == AUDIO_FORMAT_DOLBY_TRUEHD) ||
            (info->format == AUDIO_FORMAT_IEC61937)) &&
            property_get("audio.truehd.buffer.size.kb", value, "") &&
            atoi(value)) {
        fragment_size = atoi(value) * 1024;
        goto done;
    }
    if (!info->has_video)
        fragment_size = MIN_COMPRESS_PASSTHROUGH_FRAGMENT_SIZE;

done:
    return fragment_size;
}

+10 −1
Original line number Diff line number Diff line
@@ -6008,9 +6008,18 @@ uint32_t platform_get_compress_passthrough_buffer_size(
                                          audio_offload_info_t* info)
{
    uint32_t fragment_size = MIN_COMPRESS_PASSTHROUGH_FRAGMENT_SIZE;
    char value[PROPERTY_VALUE_MAX] = {0};

    if (((info->format == AUDIO_FORMAT_DOLBY_TRUEHD) ||
            (info->format == AUDIO_FORMAT_IEC61937)) &&
            property_get("audio.truehd.buffer.size.kb", value, "") &&
            atoi(value)) {
        fragment_size = atoi(value) * 1024;
        goto done;
    }
    if (!info->has_video)
        fragment_size = MIN_COMPRESS_PASSTHROUGH_FRAGMENT_SIZE;

done:
    return fragment_size;
}