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

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

Merge "hal: close compress record resource when starting fails"

parents 7fc27622 38c0e611
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -3183,7 +3183,8 @@ int start_input_stream(struct stream_in *in)
    if (get_usecase_from_list(adev, in->usecase) != NULL) {
        ALOGE("%s: use case assigned already in use, stream(%p)usecase(%d: %s)",
            __func__, &in->stream, in->usecase, use_case_table[in->usecase]);
        return -EINVAL;
        ret = -EINVAL;
        goto error_config;
    }

    in->pcm_device_id = platform_get_pcm_device_id(in->usecase, PCM_CAPTURE);
@@ -3332,6 +3333,8 @@ error_open:
    stop_input_stream(in);

error_config:
    if (audio_extn_cin_attached_usecase(in))
        audio_extn_cin_close_input_stream(in);
    /*
     * sleep 50ms to allow sufficient time for kernel
     * drivers to recover incases like SSR.