From 86b0e2b6ff6dd71ea5ef99f9ca97c9d21717ebad Mon Sep 17 00:00:00 2001 From: Ravi Kumar Alamanda Date: Wed, 20 Nov 2013 14:52:30 -0800 Subject: [PATCH] hal: Correct the multi-channel output usecase selection Both Multi-channel output on HDMI and Compress offload playback on HDMI use cases request for a stream with AUDIO_OUTPUT_FLAG_DIRECT. The current logic would then result selection MULTI_CH usecase. Fix this by checking for complete match of flags to select the use case. Change-Id: I66df94af6c3b837a6c8054282364e1acf78e6e0f --- hal/audio_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hal/audio_hw.c b/hal/audio_hw.c index 873e5e2f..00bb65dd 100644 --- a/hal/audio_hw.c +++ b/hal/audio_hw.c @@ -1975,7 +1975,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev, out->handle = handle; /* Init use case and pcm_config */ - if (out->flags & AUDIO_OUTPUT_FLAG_DIRECT && + if (out->flags == AUDIO_OUTPUT_FLAG_DIRECT && out->devices & AUDIO_DEVICE_OUT_AUX_DIGITAL) { pthread_mutex_lock(&adev->lock); ret = read_hdmi_channel_masks(out);