hal: fix incorrect resume position for ADSP SSR

- Post ADSP SSR sometimes audio playback is not resuming from
  the position where SSR was triggered.
- This is because in case of considerable delay between reset error
  from write w.r.t. offline event generation by snd_monitor, data is
  getting dropped rapidly between these two events since error callback
  is not send to audioflinger until offline event, so playback can hit
  end of stream before recovery and hence switch to next track.
- To fix this trigger error callback to audioflinger even on write error
  when error is due to SSR.

Change-Id: I133bdc84c61e5984c2e006d347c86ae7508005d0
This commit is contained in:
Dhananjay Kumar 2017-07-28 21:22:16 +05:30 committed by Shiv Maliyappanahalli
parent 6bbd3bb5d0
commit 1248dd8953
1 changed files with 1 additions and 0 deletions

View File

@ -3432,6 +3432,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void *buffer,
ALOGE("copl %s: received sound card offline state on compress write", __func__);
out->card_status = CARD_STATUS_OFFLINE;
pthread_mutex_unlock(&out->lock);
out_on_error(&out->stream.common);
return ret;
}
if ( ret == (ssize_t)bytes && !out->non_blocking)