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

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

Merge "audio_hal: increase written frames size when HAL is in SSR"

parents 52f8653d 0b2e5dc8
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2069,6 +2069,11 @@ static ssize_t out_write(struct audio_stream_out *stream, const void *buffer,
    pthread_mutex_lock(&out->lock);

    if (SND_CARD_STATE_OFFLINE == snd_scard_state) {
        // increase written size during SSR to avoid mismatch
        // with the written frames count in AF
        if (!is_offload_usecase(out->usecase))
            out->written += bytes / (out->config.channels * sizeof(short));

        if (out->pcm) {
            ALOGD(" %s: sound card is not active/SSR state", __func__);
            ret= -EIO;