audio-hal: fixes for VTS hal v7.0
added FLAG support for media bus while VTS execution
Signed-off-by: Shimana P <quic_shimp@quicinc.com>
Change-Id: Ic239aa6ebb9259eb5b983709e8c63bdaafbebaff
diff --git a/hal/audio_extn/auto_hal.c b/hal/audio_extn/auto_hal.c
index 2f70fc5..c5b4a4e 100644
--- a/hal/audio_extn/auto_hal.c
+++ b/hal/audio_extn/auto_hal.c
@@ -379,7 +379,8 @@
switch(out->car_audio_stream) {
case CAR_AUDIO_STREAM_MEDIA:
- if (out->flags == AUDIO_OUTPUT_FLAG_PRIMARY) {
+ if (out->flags == AUDIO_OUTPUT_FLAG_PRIMARY ||
+ out->flags == AUDIO_OUTPUT_FLAG_NONE) {
/* media bus stream shares pcm device with deep-buffer */
out->usecase = USECASE_AUDIO_PLAYBACK_MEDIA;
out->config = pcm_config_media;
@@ -403,14 +404,15 @@
out->config=pcm_config_system_48KHz;
}
}
+ else if (out->flags == AUDIO_OUTPUT_FLAG_NONE ||
+ out->flags == AUDIO_OUTPUT_FLAG_PRIMARY) {
+ out->flags |= AUDIO_OUTPUT_FLAG_MEDIA;
+ }
else {
ALOGE("%s: Output profile flag(%#x) is not valid", __func__,out->flags);
ret = -EINVAL;
goto error;
}
- if (out->flags == AUDIO_OUTPUT_FLAG_NONE ||
- out->flags == AUDIO_OUTPUT_FLAG_PRIMARY)
- out->flags |= AUDIO_OUTPUT_FLAG_MEDIA;
out->volume_l = out->volume_r = MAX_VOLUME_GAIN;
break;
case CAR_AUDIO_STREAM_SYS_NOTIFICATION: