audio-hal: enable app type cfg sampling rate support for nav_guidance, and alert bus
Enable app type cfg 8, 16, 24, 32 and 48KHz sampling rate support for
nav_guidance and alert bus.
Suggested-by: Shital Jadhav (Temp) <shitjadh@qti.qualcomm.com>
Change-Id: I7078a936c020bf5ade36c905a59d62dafcbf430f
Signed-off-by: Kogara Naveen Kumar <nkogara@qti.qualcomm.com>
diff --git a/configs/msmnile_au/audio_io_policy.conf b/configs/msmnile_au/audio_io_policy.conf
index 84e1140..d02d736 100644
--- a/configs/msmnile_au/audio_io_policy.conf
+++ b/configs/msmnile_au/audio_io_policy.conf
@@ -91,7 +91,7 @@
nav_guidance {
flags AUDIO_OUTPUT_FLAG_NAV_GUIDANCE
formats AUDIO_FORMAT_PCM_16_BIT
- sampling_rates 48000
+ sampling_rates 8000|16000|24000|32000|48000
bit_width 16
app_type 69937
}
@@ -105,7 +105,7 @@
alerts {
flags AUDIO_OUTPUT_FLAG_ALERTS
formats AUDIO_FORMAT_PCM_16_BIT
- sampling_rates 48000
+ sampling_rates 8000|16000|24000|32000|48000
bit_width 16
app_type 69937
}
diff --git a/configs/msmsteppe_au/audio_io_policy.conf b/configs/msmsteppe_au/audio_io_policy.conf
index 9c387ea..1814a84 100644
--- a/configs/msmsteppe_au/audio_io_policy.conf
+++ b/configs/msmsteppe_au/audio_io_policy.conf
@@ -91,7 +91,7 @@
nav_guidance {
flags AUDIO_OUTPUT_FLAG_NAV_GUIDANCE
formats AUDIO_FORMAT_PCM_16_BIT
- sampling_rates 48000
+ sampling_rates 8000|16000|24000|32000|48000
bit_width 16
app_type 69937
}
@@ -105,7 +105,7 @@
alerts {
flags AUDIO_OUTPUT_FLAG_ALERTS
formats AUDIO_FORMAT_PCM_16_BIT
- sampling_rates 48000
+ sampling_rates 8000|16000|24000|32000|48000
bit_width 16
app_type 69937
}
diff --git a/hal/audio_extn/utils.c b/hal/audio_extn/utils.c
index d7eeb35..e1b18db 100644
--- a/hal/audio_extn/utils.c
+++ b/hal/audio_extn/utils.c
@@ -1367,7 +1367,9 @@
(compare_device_type(&usecase->stream.out->device_list,AUDIO_DEVICE_OUT_SPEAKER))) {
if (!((compare_device_type(&usecase->device_list, AUDIO_DEVICE_OUT_BUS)) && ((usecase->stream.out->flags &
(audio_output_flags_t)AUDIO_OUTPUT_FLAG_SYS_NOTIFICATION) || (usecase->stream.out->flags &
- (audio_output_flags_t)AUDIO_OUTPUT_FLAG_PHONE)))) {
+ (audio_output_flags_t)AUDIO_OUTPUT_FLAG_PHONE) || (usecase->stream.out->flags &
+ (audio_output_flags_t)AUDIO_OUTPUT_FLAG_NAV_GUIDANCE) || (usecase->stream.out->flags &
+ (audio_output_flags_t)AUDIO_OUTPUT_FLAG_ALERTS)))) {
/* Reset to default if no native stream is active or default device is speaker*/
usecase->stream.out->app_type_cfg.sample_rate = DEFAULT_OUTPUT_SAMPLING_RATE;
}
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 1fc0586..d4d1218 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -3355,7 +3355,9 @@
#ifdef PLATFORM_AUTO
if (!(compare_device_type(&usecase->device_list, AUDIO_DEVICE_OUT_BUS) && ((usecase->stream.out->flags &
(audio_output_flags_t)AUDIO_OUTPUT_FLAG_SYS_NOTIFICATION) || (usecase->stream.out->flags &
- (audio_output_flags_t)AUDIO_OUTPUT_FLAG_PHONE)))) {
+ (audio_output_flags_t)AUDIO_OUTPUT_FLAG_PHONE) || (usecase->stream.out->flags &
+ (audio_output_flags_t)AUDIO_OUTPUT_FLAG_NAV_GUIDANCE) || (usecase->stream.out->flags &
+ (audio_output_flags_t)AUDIO_OUTPUT_FLAG_ALERTS)))) {
usecase->stream.out->app_type_cfg.sample_rate = DEFAULT_OUTPUT_SAMPLING_RATE;
}
#else