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

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

Merge "hal: send device connect, disconnect events to sound trigger hal" into...

Merge "hal: send device connect, disconnect events to sound trigger hal" into audio-userspace.lnx.2.2-dev
parents 9ef7a4d8 73dd1fdb
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -349,6 +349,18 @@ void audio_extn_sound_trigger_set_parameters(struct audio_device *adev __unused,
        event.u.value = val;
        st_dev->st_callback(AUDIO_EVENT_NUM_ST_SESSIONS, &event);
    }

    ret = str_parms_get_int(params, AUDIO_PARAMETER_DEVICE_CONNECT, &val);
    if ((ret >= 0) && audio_is_input_device(val)) {
        event.u.value = val;
        st_dev->st_callback(AUDIO_EVENT_DEVICE_CONNECT, &event);
    }

    ret = str_parms_get_int(params, AUDIO_PARAMETER_DEVICE_DISCONNECT, &val);
    if ((ret >= 0) && audio_is_input_device(val)) {
        event.u.value = val;
        st_dev->st_callback(AUDIO_EVENT_DEVICE_DISCONNECT, &event);
    }
}

int audio_extn_sound_trigger_init(struct audio_device *adev)