Loading hal/audio_extn/soundtrigger.c +1 −0 Original line number Diff line number Diff line Loading @@ -165,6 +165,7 @@ void audio_extn_sound_trigger_check_and_get_session(struct stream_in *in) in->config = st_ses_info->st_ses.config; in->channel_mask = audio_channel_in_mask_from_count(in->config.channels); in->is_st_session = true; in->is_st_session_active = true; ALOGD("%s: capture_handle %d is sound trigger", __func__, in->capture_handle); break; } Loading hal/audio_hw.c +15 −1 Original line number Diff line number Diff line Loading @@ -2571,6 +2571,12 @@ static ssize_t in_read(struct audio_stream_in *stream, void *buffer, ALOGD(" %s: sound card is not active/SSR state", __func__); ret= -EIO;; goto exit; } else { if (in->is_st_session && !in->is_st_session_active) { ALOGD(" %s: Sound trigger is not active/SSR", __func__); ret= -EIO;; goto exit; } } } Loading Loading @@ -2615,7 +2621,15 @@ exit: /* ToDo: There may be a corner case when SSR happens back to back during start/stop. Need to post different error to handle that. */ if (-ENETRESET == ret) { /* CPE SSR results in kernel returning ENETRESET for sound trigger session reading on LAB data. In this case do not set sound card state offline, instead mark this sound trigger session inactive to avoid further reading of LAB data from CPE driver. Marking the session inactive handles both CPE and ADSP SSR for sound trigger session */ if (!in->is_st_session) set_snd_card_state(adev,SND_CARD_STATE_OFFLINE); else in->is_st_session_active = false; } pthread_mutex_unlock(&in->lock); Loading hal/audio_hw.h +1 −0 Original line number Diff line number Diff line Loading @@ -232,6 +232,7 @@ struct stream_in { audio_format_t format; audio_io_handle_t capture_handle; bool is_st_session; bool is_st_session_active; struct audio_device *dev; }; Loading Loading
hal/audio_extn/soundtrigger.c +1 −0 Original line number Diff line number Diff line Loading @@ -165,6 +165,7 @@ void audio_extn_sound_trigger_check_and_get_session(struct stream_in *in) in->config = st_ses_info->st_ses.config; in->channel_mask = audio_channel_in_mask_from_count(in->config.channels); in->is_st_session = true; in->is_st_session_active = true; ALOGD("%s: capture_handle %d is sound trigger", __func__, in->capture_handle); break; } Loading
hal/audio_hw.c +15 −1 Original line number Diff line number Diff line Loading @@ -2571,6 +2571,12 @@ static ssize_t in_read(struct audio_stream_in *stream, void *buffer, ALOGD(" %s: sound card is not active/SSR state", __func__); ret= -EIO;; goto exit; } else { if (in->is_st_session && !in->is_st_session_active) { ALOGD(" %s: Sound trigger is not active/SSR", __func__); ret= -EIO;; goto exit; } } } Loading Loading @@ -2615,7 +2621,15 @@ exit: /* ToDo: There may be a corner case when SSR happens back to back during start/stop. Need to post different error to handle that. */ if (-ENETRESET == ret) { /* CPE SSR results in kernel returning ENETRESET for sound trigger session reading on LAB data. In this case do not set sound card state offline, instead mark this sound trigger session inactive to avoid further reading of LAB data from CPE driver. Marking the session inactive handles both CPE and ADSP SSR for sound trigger session */ if (!in->is_st_session) set_snd_card_state(adev,SND_CARD_STATE_OFFLINE); else in->is_st_session_active = false; } pthread_mutex_unlock(&in->lock); Loading
hal/audio_hw.h +1 −0 Original line number Diff line number Diff line Loading @@ -232,6 +232,7 @@ struct stream_in { audio_format_t format; audio_io_handle_t capture_handle; bool is_st_session; bool is_st_session_active; struct audio_device *dev; }; Loading