audio: correct setting sequence

Persist audio calibration delta data should be set
before sending audio calibration.

Bug: 127239681
Test: two scenarios
  - LR swap real time, LR swap offline
  - preset change real time, preset change offline
scenario#1
  1. playback and set preset with low volume
  2. reboot or kill audioserver
  3. playback again and current preset is loud setting
scenario#2
  1. playback and set loud or low volume preset
  2. pause and standby thread
  3. change volume to different preset setting (ex. low -> loud or loud -> low)
  4. resume playback and current preset is incorrect.

Change-Id: Idca3c617d03056b770dbfe8f4b9ab3080e200113
Signed-off-by: Jasmine Cha <chajasmine@google.com>
(cherry picked from commit fb2ea2c3d7e61ab4a66d3fdbf0fbdc8d099a0618)
This commit is contained in:
Jasmine Cha 2019-03-04 18:12:47 +08:00 committed by Aniket Kumar Lata
parent 94c7597422
commit 4dcc109aed
1 changed files with 2 additions and 0 deletions

View File

@ -1069,6 +1069,8 @@ int enable_audio_route(struct audio_device *adev,
audio_extn_sound_trigger_update_stream_status(usecase, ST_EVENT_STREAM_BUSY); audio_extn_sound_trigger_update_stream_status(usecase, ST_EVENT_STREAM_BUSY);
audio_extn_listen_update_stream_status(usecase, LISTEN_EVENT_STREAM_BUSY); audio_extn_listen_update_stream_status(usecase, LISTEN_EVENT_STREAM_BUSY);
audio_extn_utils_send_app_type_cfg(adev, usecase); audio_extn_utils_send_app_type_cfg(adev, usecase);
if (audio_extn_is_maxx_audio_enabled())
audio_extn_ma_set_device(usecase);
audio_extn_utils_send_audio_calibration(adev, usecase); audio_extn_utils_send_audio_calibration(adev, usecase);
if ((usecase->type == PCM_PLAYBACK) && is_offload_usecase(usecase->id)) { if ((usecase->type == PCM_PLAYBACK) && is_offload_usecase(usecase->id)) {
out = usecase->stream.out; out = usecase->stream.out;