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

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

Merge "hal: Check channel config when dropping write buffers" into audio-userspace.lnx.3.0

parents b630bbbc 31173c9c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3344,7 +3344,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void *buffer,

    if (audio_extn_passthru_should_drop_data(out)) {
        ALOGV(" %s : Drop data as compress passthrough session is going on", __func__);
        if (audio_bytes_per_sample(out->format) != 0)
        if ((audio_bytes_per_sample(out->format) != 0) && (out->config.channels != 0))
            out->written += bytes / (out->config.channels * audio_bytes_per_sample(out->format));
        ret = -EIO;
        goto exit;