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

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

Merge "audio_extn: sound_trigger: Send device events to ST HAL"

parents c829dc34 2573bd71
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -334,6 +334,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)