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

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

Merge "hal: align fragment size to 24 instead of 1024 for PCM offload"

parents bd5ad8fc 3b79cccf
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -2927,9 +2927,8 @@ uint32_t platform_get_pcm_offload_buffer_size(audio_offload_info_t* info)
                     * info->sample_rate
                     * (bits_per_sample >> 3)
                     * popcount(info->channel_mask))/1000;

    fragment_size = ALIGN (fragment_size, 1024);

    // align with LCM of 2, 4, 6, 8
    fragment_size = ALIGN( fragment_size, 24 );
    if(fragment_size < MIN_PCM_OFFLOAD_FRAGMENT_SIZE)
        fragment_size = MIN_PCM_OFFLOAD_FRAGMENT_SIZE;
    else if(fragment_size > MAX_PCM_OFFLOAD_FRAGMENT_SIZE)