From 19027261fcafb8ad978b04b5029464f2fcccbf28 Mon Sep 17 00:00:00 2001 From: Sujin Panicker Date: Mon, 16 Sep 2019 18:28:06 +0530 Subject: [PATCH] audio: hal: Fix cts-on-gsi test failure With GSI, voip rx path is opened at bootup time. Due to this pcm config is left unset with zero initialized pcm config causing failure when vts test client tries to create voip track. This change is to set valid pcm config, thereby sending out valid pcm config values whenever the client requests even if voip call is not started. Change-Id: Ic36faea1f5599703a05f515d30354908015ecc36 --- hal/audio_hw.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hal/audio_hw.c b/hal/audio_hw.c index 05803530..bb511e86 100644 --- a/hal/audio_hw.c +++ b/hal/audio_hw.c @@ -7475,6 +7475,9 @@ int adev_open_output_stream(struct audio_hw_device *dev, __func__, ret); goto error_open; } + } else { + out->usecase = GET_USECASE_AUDIO_PLAYBACK_PRIMARY(use_db_as_primary); + out->config = GET_PCM_CONFIG_AUDIO_PLAYBACK_PRIMARY(use_db_as_primary); } } } else if (audio_is_linear_pcm(out->format) &&