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

Commit 2e12d100 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "audio: unmute non-offload streams when device switches"

parents 92b1cafe e645ada7
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -1286,11 +1286,16 @@ int enable_audio_route(struct audio_device *adev,
    if (audio_extn_is_maxx_audio_enabled())
        audio_extn_ma_set_device(usecase);
    audio_extn_utils_send_audio_calibration(adev, usecase);
    if ((usecase->type == PCM_PLAYBACK) && is_offload_usecase(usecase->id)) {
        out = usecase->stream.out;
        if (out && out->compr)
    if ((usecase->type == PCM_PLAYBACK) &&
            ((out = usecase->stream.out) != NULL)) {
        if (!is_offload_usecase(out->usecase)) {
            pthread_mutex_lock(&out->latch_lock);
            out->muted = false;
            pthread_mutex_unlock(&out->latch_lock);
        } else if (out->compr) {
            audio_extn_utils_compress_set_clk_rec_mode(usecase);
        }
    }

    if (usecase->type == PCM_CAPTURE) {
        in = usecase->stream.in;