From 4dcc109aed015588075786b0ce866020b3d33f34 Mon Sep 17 00:00:00 2001 From: Jasmine Cha Date: Mon, 4 Mar 2019 18:12:47 +0800 Subject: [PATCH] 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 (cherry picked from commit fb2ea2c3d7e61ab4a66d3fdbf0fbdc8d099a0618) --- hal/audio_hw.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hal/audio_hw.c b/hal/audio_hw.c index 9f90d934..b68f3aa0 100644 --- a/hal/audio_hw.c +++ b/hal/audio_hw.c @@ -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_listen_update_stream_status(usecase, LISTEN_EVENT_STREAM_BUSY); 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); if ((usecase->type == PCM_PLAYBACK) && is_offload_usecase(usecase->id)) { out = usecase->stream.out;