From f6b5b08d29d76a9841d7174e3cac87066a71325b Mon Sep 17 00:00:00 2001 From: kunleiz Date: Mon, 18 Mar 2019 17:32:25 +0800 Subject: [PATCH] hal: avoid setting stereo channel mask to voip usecase Voip usecase is started with stereo channel mask. This is not allowed due to voip_rx profile is not supported. Fix it by setting channel mask to mono for voip usecase. CRs-Fixed: 2418048 Change-Id: I949808076a56cf2e43f0309ce1656646e0495087 --- hal/audio_hw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hal/audio_hw.c b/hal/audio_hw.c index cd8f22e0..6399cb2f 100644 --- a/hal/audio_hw.c +++ b/hal/audio_hw.c @@ -6463,8 +6463,7 @@ int adev_open_output_stream(struct audio_hw_device *dev, if (!voice_extn_is_compress_voip_supported()) { if (out->sample_rate == 8000 || out->sample_rate == 16000 || out->sample_rate == 32000 || out->sample_rate == 48000) { - //FIXME: add support for MONO stream configuration when audioflinger mixer supports it - out->channel_mask = AUDIO_CHANNEL_OUT_STEREO; + out->channel_mask = AUDIO_CHANNEL_OUT_MONO; out->usecase = USECASE_AUDIO_PLAYBACK_VOIP; out->format = AUDIO_FORMAT_PCM_16_BIT;