hal: VTS fix for supported channel mask
- HAL output stream does not override default supported
channel mask value. VTS client fails as requested
channel mask(MONO) is not listed in supported channel
mask
- HAL Output is opened based on config passed and
local supported configuration. Output supported
channel mask should be overridden with output stream
channel mask
Change-Id: Ifaee3e5756b7cfe9dd91e627826683f39473120d
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 51d34b0..868b562 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -4305,7 +4305,10 @@
format = out->format = config->format;
out->sample_rate = config->sample_rate;
out->channel_mask = config->channel_mask;
- out->supported_channel_masks[0] = AUDIO_CHANNEL_OUT_STEREO;
+ if (out->channel_mask == AUDIO_CHANNEL_NONE)
+ out->supported_channel_masks[0] = AUDIO_CHANNEL_OUT_STEREO;
+ else
+ out->supported_channel_masks[0] = out->channel_mask;
out->handle = handle;
out->bit_width = CODEC_BACKEND_DEFAULT_BIT_WIDTH;
out->non_blocking = 0;