Loading hal/audio_extn/audio_extn.h +2 −0 Original line number Diff line number Diff line Loading @@ -434,6 +434,7 @@ void audio_extn_listen_set_parameters(struct audio_device *adev, #define audio_extn_sound_trigger_update_device_status(snd_dev, event) (0) #define audio_extn_sound_trigger_update_stream_status(uc_info, event) (0) #define audio_extn_sound_trigger_update_battery_status(charging) (0) #define audio_extn_sound_trigger_update_screen_status(screen_off) (0) #define audio_extn_sound_trigger_set_parameters(adev, parms) (0) #define audio_extn_sound_trigger_get_parameters(adev, query, reply) (0) #define audio_extn_sound_trigger_check_and_get_session(in) (0) Loading @@ -458,6 +459,7 @@ void audio_extn_sound_trigger_update_device_status(snd_device_t snd_device, void audio_extn_sound_trigger_update_stream_status(struct audio_usecase *uc_info, st_event_type_t event); void audio_extn_sound_trigger_update_battery_status(bool charging); void audio_extn_sound_trigger_update_screen_status(bool screen_off); void audio_extn_sound_trigger_set_parameters(struct audio_device *adev, struct str_parms *parms); void audio_extn_sound_trigger_check_and_get_session(struct stream_in *in); Loading hal/audio_extn/soundtrigger.c +12 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ typedef enum { AUDIO_EVENT_CAPTURE_STREAM_INACTIVE, AUDIO_EVENT_CAPTURE_STREAM_ACTIVE, AUDIO_EVENT_BATTERY_STATUS_CHANGED, AUDIO_EVENT_SCREEN_STATUS_CHANGED, AUDIO_EVENT_GET_PARAM, AUDIO_EVENT_UPDATE_ECHO_REF } audio_event_type_t; Loading Loading @@ -605,6 +606,17 @@ void audio_extn_sound_trigger_update_battery_status(bool charging) st_dev->st_callback(AUDIO_EVENT_BATTERY_STATUS_CHANGED, &ev_info); } void audio_extn_sound_trigger_update_screen_status(bool screen_off) { struct audio_event_info ev_info = {{0}, {0}}; if (!st_dev) return; ev_info.u.value = screen_off; st_dev->st_callback(AUDIO_EVENT_SCREEN_STATUS_CHANGED, &ev_info); } void audio_extn_sound_trigger_set_parameters(struct audio_device *adev __unused, struct str_parms *params) Loading hal/audio_hw.c +1 −0 Original line number Diff line number Diff line Loading @@ -8079,6 +8079,7 @@ static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs) adev->screen_off = false; else adev->screen_off = true; audio_extn_sound_trigger_update_screen_status(adev->screen_off); } ret = str_parms_get_int(parms, "rotation", &val); Loading hal/msm8974/platform.c +10 −5 Original line number Diff line number Diff line Loading @@ -7896,13 +7896,18 @@ bool platform_sound_trigger_usecase_needs_event(audio_usecase_t uc_id) case USECASE_AUDIO_PLAYBACK_MULTI_CH: case USECASE_AUDIO_PLAYBACK_OFFLOAD: case USECASE_AUDIO_PLAYBACK_OFFLOAD2: case USECASE_AUDIO_PLAYBACK_FM: needs_event = true; break; /* concurrent playback in low latency allowed */ case USECASE_AUDIO_PLAYBACK_LOW_LATENCY: case USECASE_AUDIO_PLAYBACK_ULL: case USECASE_AUDIO_PLAYBACK_MMAP: if (property_get_bool("persist.vendor.audio.ull_playback_bargein", false)) needs_event = true; break; /* concurrent playback FM needs event */ case USECASE_AUDIO_PLAYBACK_FM: case USECASE_AUDIO_PLAYBACK_LOW_LATENCY: if (property_get_bool("persist.vendor.audio.ll_playback_bargein", false)) needs_event = true; break; Loading Loading
hal/audio_extn/audio_extn.h +2 −0 Original line number Diff line number Diff line Loading @@ -434,6 +434,7 @@ void audio_extn_listen_set_parameters(struct audio_device *adev, #define audio_extn_sound_trigger_update_device_status(snd_dev, event) (0) #define audio_extn_sound_trigger_update_stream_status(uc_info, event) (0) #define audio_extn_sound_trigger_update_battery_status(charging) (0) #define audio_extn_sound_trigger_update_screen_status(screen_off) (0) #define audio_extn_sound_trigger_set_parameters(adev, parms) (0) #define audio_extn_sound_trigger_get_parameters(adev, query, reply) (0) #define audio_extn_sound_trigger_check_and_get_session(in) (0) Loading @@ -458,6 +459,7 @@ void audio_extn_sound_trigger_update_device_status(snd_device_t snd_device, void audio_extn_sound_trigger_update_stream_status(struct audio_usecase *uc_info, st_event_type_t event); void audio_extn_sound_trigger_update_battery_status(bool charging); void audio_extn_sound_trigger_update_screen_status(bool screen_off); void audio_extn_sound_trigger_set_parameters(struct audio_device *adev, struct str_parms *parms); void audio_extn_sound_trigger_check_and_get_session(struct stream_in *in); Loading
hal/audio_extn/soundtrigger.c +12 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ typedef enum { AUDIO_EVENT_CAPTURE_STREAM_INACTIVE, AUDIO_EVENT_CAPTURE_STREAM_ACTIVE, AUDIO_EVENT_BATTERY_STATUS_CHANGED, AUDIO_EVENT_SCREEN_STATUS_CHANGED, AUDIO_EVENT_GET_PARAM, AUDIO_EVENT_UPDATE_ECHO_REF } audio_event_type_t; Loading Loading @@ -605,6 +606,17 @@ void audio_extn_sound_trigger_update_battery_status(bool charging) st_dev->st_callback(AUDIO_EVENT_BATTERY_STATUS_CHANGED, &ev_info); } void audio_extn_sound_trigger_update_screen_status(bool screen_off) { struct audio_event_info ev_info = {{0}, {0}}; if (!st_dev) return; ev_info.u.value = screen_off; st_dev->st_callback(AUDIO_EVENT_SCREEN_STATUS_CHANGED, &ev_info); } void audio_extn_sound_trigger_set_parameters(struct audio_device *adev __unused, struct str_parms *params) Loading
hal/audio_hw.c +1 −0 Original line number Diff line number Diff line Loading @@ -8079,6 +8079,7 @@ static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs) adev->screen_off = false; else adev->screen_off = true; audio_extn_sound_trigger_update_screen_status(adev->screen_off); } ret = str_parms_get_int(parms, "rotation", &val); Loading
hal/msm8974/platform.c +10 −5 Original line number Diff line number Diff line Loading @@ -7896,13 +7896,18 @@ bool platform_sound_trigger_usecase_needs_event(audio_usecase_t uc_id) case USECASE_AUDIO_PLAYBACK_MULTI_CH: case USECASE_AUDIO_PLAYBACK_OFFLOAD: case USECASE_AUDIO_PLAYBACK_OFFLOAD2: case USECASE_AUDIO_PLAYBACK_FM: needs_event = true; break; /* concurrent playback in low latency allowed */ case USECASE_AUDIO_PLAYBACK_LOW_LATENCY: case USECASE_AUDIO_PLAYBACK_ULL: case USECASE_AUDIO_PLAYBACK_MMAP: if (property_get_bool("persist.vendor.audio.ull_playback_bargein", false)) needs_event = true; break; /* concurrent playback FM needs event */ case USECASE_AUDIO_PLAYBACK_FM: case USECASE_AUDIO_PLAYBACK_LOW_LATENCY: if (property_get_bool("persist.vendor.audio.ll_playback_bargein", false)) needs_event = true; break; Loading