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

Commit b85f2d94 authored by Aalique Grahame's avatar Aalique Grahame
Browse files

hal: revert alignment logic

Revert buffer alignment logic. Current logic results
in a buffer size that is not a multiple of 32 in some 
cases.

CRs-Fixed: 2118810
Change-Id: Ibf3e965a3d575965ff48768c7440b18298db5316
parent a64cbf64
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1246,8 +1246,7 @@ uint32_t get_alsa_fragment_size(uint32_t bytes_per_sample,
     *be multiple of (number of channels * bytes per sample)
     *For writes to succeed, the buffer must be written at address which is multiple of 32
     */
    fragment_size = ALIGN(fragment_size, (bytes_per_sample * noOfChannels));
    fragment_size = ALIGN(fragment_size, 32);
    fragment_size = ALIGN(fragment_size, (bytes_per_sample * noOfChannels * 32));

    ALOGI("PCM offload Fragment size to %d bytes", fragment_size);
    return fragment_size;