configs: add audio input/output policy config
Add audio input/output (io) policy config file.
This is to combine individual config files and
remove staging of output policy config.
Change-Id: I1a3a88654dcecc7fb558fd96edd5a86a293b783f
diff --git a/configs/msmnile_au/audio_output_policy.conf b/configs/msmnile_au/audio_io_policy.conf
similarity index 72%
copy from configs/msmnile_au/audio_output_policy.conf
copy to configs/msmnile_au/audio_io_policy.conf
index 67febfa..3362dd9 100644
--- a/configs/msmnile_au/audio_output_policy.conf
+++ b/configs/msmnile_au/audio_io_policy.conf
@@ -12,11 +12,11 @@
outputs {
default {
- flags AUDIO_OUTPUT_FLAG_PRIMARY
+ flags AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_MEDIA
formats AUDIO_FORMAT_PCM_16_BIT
sampling_rates 48000
bit_width 16
- app_type 69937
+ app_type 69936
}
proaudio {
flags AUDIO_OUTPUT_FLAG_FAST|AUDIO_OUTPUT_FLAG_RAW
@@ -81,4 +81,53 @@
bit_width 24
app_type 69940
}
+ sys_notification {
+ flags AUDIO_OUTPUT_FLAG_SYS_NOTIFICATION
+ formats AUDIO_FORMAT_PCM_16_BIT
+ sampling_rates 48000
+ bit_width 16
+ app_type 69937
+ }
+ nav_guidance {
+ flags AUDIO_OUTPUT_FLAG_NAV_GUIDANCE
+ formats AUDIO_FORMAT_PCM_16_BIT
+ sampling_rates 48000
+ bit_width 16
+ app_type 69937
+ }
+ phone {
+ flags AUDIO_OUTPUT_FLAG_PHONE
+ formats AUDIO_FORMAT_PCM_16_BIT
+ sampling_rates 48000
+ bit_width 16
+ app_type 69936
+ }
}
+
+inputs {
+ primary {
+ formats AUDIO_FORMAT_PCM_16_BIT
+ sampling_rates 8000|16000|32000|44100|48000|88200|96000|176400|192000
+ bit_width 16
+ app_type 69938
+ }
+ record_24bit {
+ formats AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_24_BIT
+ sampling_rates 44100|48000|88200|96000|176400|192000
+ bit_width 24
+ app_type 69948
+ }
+ record_32bit {
+ formats AUDIO_FORMAT_PCM_32_BIT|AUDIO_FORMAT_PCM_FLOAT
+ sampling_rates 44100|48000|88200|96000|176400|192000
+ bit_width 32
+ app_type 69949
+ }
+ record_unprocessed {
+ profile record_unprocessed
+ formats AUDIO_FORMAT_PCM_24_BIT_PACKED
+ sampling_rates 16000|48000
+ bit_width 24
+ app_type 69942
+ }
+}
\ No newline at end of file
diff --git a/configs/msmnile_au/msmnile_au.mk b/configs/msmnile_au/msmnile_au.mk
index 7d17be7..9db3404 100644
--- a/configs/msmnile_au/msmnile_au.mk
+++ b/configs/msmnile_au/msmnile_au.mk
@@ -85,7 +85,7 @@
endif
PRODUCT_COPY_FILES += \
- vendor/qcom/opensource/audio-hal/primary-hal/configs/msmnile_au/audio_output_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_output_policy.conf \
+ vendor/qcom/opensource/audio-hal/primary-hal/configs/msmnile_au/audio_io_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_io_policy.conf \
vendor/qcom/opensource/audio-hal/primary-hal/configs/msmnile_au/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf \
vendor/qcom/opensource/audio-hal/primary-hal/configs/msmnile_au/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
vendor/qcom/opensource/audio-hal/primary-hal/configs/msmnile_au/mixer_paths_adp.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_adp.xml \
diff --git a/configs/msmnile_au/audio_output_policy.conf b/configs/msmsteppe_au/audio_io_policy.conf
similarity index 75%
rename from configs/msmnile_au/audio_output_policy.conf
rename to configs/msmsteppe_au/audio_io_policy.conf
index 67febfa..56cb909 100644
--- a/configs/msmnile_au/audio_output_policy.conf
+++ b/configs/msmsteppe_au/audio_io_policy.conf
@@ -12,11 +12,11 @@
outputs {
default {
- flags AUDIO_OUTPUT_FLAG_PRIMARY
+ flags AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_MEDIA
formats AUDIO_FORMAT_PCM_16_BIT
sampling_rates 48000
bit_width 16
- app_type 69937
+ app_type 69936
}
proaudio {
flags AUDIO_OUTPUT_FLAG_FAST|AUDIO_OUTPUT_FLAG_RAW
@@ -81,4 +81,46 @@
bit_width 24
app_type 69940
}
+ sys_notification {
+ flags AUDIO_OUTPUT_FLAG_SYS_NOTIFICATION
+ formats AUDIO_FORMAT_PCM_16_BIT
+ sampling_rates 48000
+ bit_width 16
+ app_type 69937
+ }
+ nav_guidance {
+ flags AUDIO_OUTPUT_FLAG_NAV_GUIDANCE
+ formats AUDIO_FORMAT_PCM_16_BIT
+ sampling_rates 48000
+ bit_width 16
+ app_type 69937
+ }
+ phone {
+ flags AUDIO_OUTPUT_FLAG_PHONE
+ formats AUDIO_FORMAT_PCM_16_BIT
+ sampling_rates 48000
+ bit_width 16
+ app_type 69936
+ }
+}
+
+inputs {
+ record_16bit {
+ formats AUDIO_FORMAT_PCM_16_BIT
+ sampling_rates 8000|16000|32000|44100|48000|88200|96000|176400|192000
+ bit_width 16
+ app_type 69938
+ }
+ record_24bit {
+ formats AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_24_BIT
+ sampling_rates 44100|48000|88200|96000|176400|192000
+ bit_width 24
+ app_type 69948
+ }
+ record_32bit {
+ formats AUDIO_FORMAT_PCM_32_BIT|AUDIO_FORMAT_PCM_FLOAT
+ sampling_rates 44100|48000|88200|96000|176400|192000
+ bit_width 32
+ app_type 69949
+ }
}
diff --git a/configs/msmsteppe_au/audio_output_policy.conf b/configs/msmsteppe_au/audio_output_policy.conf
deleted file mode 100644
index 67febfa..0000000
--- a/configs/msmsteppe_au/audio_output_policy.conf
+++ /dev/null
@@ -1,84 +0,0 @@
-# List of profiles for the output device session where stream is routed.
-# A stream opened with the inputs attributes which match the "flags" and
-# "formats" as specified in the profile is routed to a device at
-# sample rate specified under "sampling_rates" and bit width under
-# "bit_width" and the topology extracted from the acdb data against
-# the "app_type".
-#
-# the flags and formats are specified using the strings corresponding to
-# enums in audio.h and audio_policy.h. They are concatenated with "|"
-# without space or "\n".
-# the flags and formats should match the ones in "audio_policy.conf"
-
-outputs {
- default {
- flags AUDIO_OUTPUT_FLAG_PRIMARY
- formats AUDIO_FORMAT_PCM_16_BIT
- sampling_rates 48000
- bit_width 16
- app_type 69937
- }
- proaudio {
- flags AUDIO_OUTPUT_FLAG_FAST|AUDIO_OUTPUT_FLAG_RAW
- formats AUDIO_FORMAT_PCM_16_BIT
- sampling_rates 48000
- bit_width 16
- app_type 69943
- }
- voip_rx {
- flags AUDIO_OUTPUT_FLAG_VOIP_RX|AUDIO_OUTPUT_FLAG_DIRECT
- formats AUDIO_FORMAT_PCM_16_BIT
- sampling_rates 8000|16000|32000|48000
- bit_width 16
- app_type 69946
- }
- deep_buffer {
- flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER
- formats AUDIO_FORMAT_PCM_16_BIT
- sampling_rates 48000
- bit_width 16
- app_type 69936
- }
- direct_pcm_16 {
- flags AUDIO_OUTPUT_FLAG_DIRECT
- formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_8_24_BIT|AUDIO_FORMAT_PCM_32_BIT
- sampling_rates 44100|48000|88200|96000|176400|192000
- bit_width 16
- app_type 69936
- }
- direct_pcm_24 {
- flags AUDIO_OUTPUT_FLAG_DIRECT
- formats AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_8_24_BIT|AUDIO_FORMAT_PCM_32_BIT
- sampling_rates 44100|48000|88200|96000|176400|192000|352800|384000
- bit_width 24
- app_type 69940
- }
- direct_pcm_32 {
- flags AUDIO_OUTPUT_FLAG_DIRECT
- formats AUDIO_FORMAT_PCM_32_BIT
- sampling_rates 44100|48000|88200|96000|176400|192000|352800|384000
- bit_width 32
- app_type 69942
- }
- compress_passthrough {
- flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING|AUDIO_OUTPUT_FLAG_COMPRESS_PASSTHROUGH
- formats AUDIO_FORMAT_DTS|AUDIO_FORMAT_DTS_HD|AUDIO_FORMAT_DSD
- sampling_rates 32000|44100|48000|88200|96000|176400|192000|352800
- bit_width 16
- app_type 69941
- }
- compress_offload_16 {
- flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING
- formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_PCM_16_BIT_OFFLOAD|AUDIO_FORMAT_PCM_24_BIT_OFFLOAD|AUDIO_FORMAT_FLAC|AUDIO_FORMAT_ALAC|AUDIO_FORMAT_APE|AUDIO_FORMAT_AAC_LC|AUDIO_FORMAT_AAC_HE_V1|AUDIO_FORMAT_AAC_HE_V2|AUDIO_FORMAT_WMA|AUDIO_FORMAT_WMA_PRO|AUDIO_FORMAT_VORBIS|AUDIO_FORMAT_AAC_ADTS_LC|AUDIO_FORMAT_AAC_ADTS_HE_V1|AUDIO_FORMAT_AAC_ADTS_HE_V2
- sampling_rates 44100|48000|88200|96000|176400|192000
- bit_width 16
- app_type 69936
- }
- compress_offload_24 {
- flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING
- formats AUDIO_FORMAT_PCM_24_BIT_OFFLOAD|AUDIO_FORMAT_FLAC|AUDIO_FORMAT_ALAC|AUDIO_FORMAT_APE|AUDIO_FORMAT_VORBIS|AUDIO_FORMAT_WMA|AUDIO_FORMAT_WMA_PRO
- sampling_rates 44100|48000|88200|96000|176400|192000
- bit_width 24
- app_type 69940
- }
-}
diff --git a/configs/msmsteppe_au/msmsteppe_au.mk b/configs/msmsteppe_au/msmsteppe_au.mk
index a0b9cf1..d033df9 100644
--- a/configs/msmsteppe_au/msmsteppe_au.mk
+++ b/configs/msmsteppe_au/msmsteppe_au.mk
@@ -85,7 +85,7 @@
endif
PRODUCT_COPY_FILES += \
- vendor/qcom/opensource/audio-hal/primary-hal/configs/msmsteppe_au/audio_output_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_output_policy.conf \
+ vendor/qcom/opensource/audio-hal/primary-hal/configs/msmsteppe_au/audio_io_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_io_policy.conf \
vendor/qcom/opensource/audio-hal/primary-hal/configs/msmsteppe_au/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf \
vendor/qcom/opensource/audio-hal/primary-hal/configs/msmsteppe_au/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
vendor/qcom/opensource/audio-hal/primary-hal/configs/msmsteppe_au/mixer_paths_adp.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_adp.xml \