blob: e6d9e14756e6a369047ffa41650e1408fb01b73d [file] [log] [blame]
Ashish Jain1221b522016-03-30 15:09:20 +05301##AUDIO_FEATURE_FLAGS
2
3#BOARD_USES_GENERIC_AUDIO := true
4BOARD_USES_ALSA_AUDIO := true
Sharad Sangle8ecefdc2016-09-26 13:50:41 +05305
vivek mehta02a52022017-01-27 15:36:19 -08006ifneq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
Ashish Jain1221b522016-03-30 15:09:20 +05307USE_CUSTOM_AUDIO_POLICY := 1
Abhishek Ranjanc89058a2016-04-08 02:46:59 +05308#AUDIO_FEATURE_ENABLED_VOICE_CONCURRENCY := true
Ashish Jain1221b522016-03-30 15:09:20 +05309AUDIO_FEATURE_ENABLED_AAC_ADTS_OFFLOAD := true
Ashish Jain1221b522016-03-30 15:09:20 +053010AUDIO_FEATURE_ENABLED_COMPRESS_CAPTURE := false
11AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := true
Ashish Jain1221b522016-03-30 15:09:20 +053012AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true
13AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER := true
14AUDIO_FEATURE_ENABLED_EXTN_RESAMPLER := true
15AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true
Ashish Jain1221b522016-03-30 15:09:20 +053016AUDIO_FEATURE_ENABLED_HDMI_SPK := true
Ashish Jain1221b522016-03-30 15:09:20 +053017AUDIO_FEATURE_ENABLED_PCM_OFFLOAD := true
18AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24 := true
19AUDIO_FEATURE_ENABLED_FLAC_OFFLOAD := true
20AUDIO_FEATURE_ENABLED_VORBIS_OFFLOAD := true
21AUDIO_FEATURE_ENABLED_WMA_OFFLOAD := true
22AUDIO_FEATURE_ENABLED_ALAC_OFFLOAD := true
23AUDIO_FEATURE_ENABLED_APE_OFFLOAD := true
Ashish Jainad78edc2016-04-11 12:22:28 +053024AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
Ashish Jain1221b522016-03-30 15:09:20 +053025AUDIO_FEATURE_ENABLED_SSR := true
Ashish Jain1221b522016-03-30 15:09:20 +053026AUDIO_FEATURE_ENABLED_DTS_EAGLE := false
Divya Narayanan Poojary87cfbd72017-02-15 12:16:58 +053027BOARD_USES_SRS_TRUEMEDIA := false
Ashish Jain1221b522016-03-30 15:09:20 +053028DTS_CODEC_M_ := true
Ashish Jain1221b522016-03-30 15:09:20 +053029MM_AUDIO_ENABLED_SAFX := true
Ashish Jain1221b522016-03-30 15:09:20 +053030AUDIO_FEATURE_ENABLED_HW_ACCELERATED_EFFECTS := false
Satya Krishna Pindiproli4a72ae62017-07-02 16:08:11 +053031AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := false
Ashish Jain1221b522016-03-30 15:09:20 +053032AUDIO_FEATURE_ENABLED_AUDIOSPHERE := true
Dhananjay Kumar29b894e2017-04-05 02:41:14 +053033DOLBY_ENABLE := false
Sharad Sangle8ecefdc2016-09-26 13:50:41 +053034endif
35
36USE_XML_AUDIO_POLICY_CONF := 1
37BOARD_SUPPORTS_SOUND_TRIGGER := true
38AUDIO_USE_LL_AS_PRIMARY_OUTPUT := true
39AUDIO_FEATURE_ENABLED_HIFI_AUDIO := true
40AUDIO_FEATURE_ENABLED_VBAT_MONITOR := true
41AUDIO_FEATURE_ENABLED_NT_PAUSE_TIMEOUT := true
42AUDIO_FEATURE_ENABLED_ANC_HEADSET := true
43AUDIO_FEATURE_ENABLED_CUSTOMSTEREO := true
44AUDIO_FEATURE_ENABLED_FLUENCE := true
45AUDIO_FEATURE_ENABLED_HDMI_EDID := true
46AUDIO_FEATURE_ENABLED_EXT_HDMI := true
47AUDIO_FEATURE_ENABLED_HFP := true
48AUDIO_FEATURE_ENABLED_INCALL_MUSIC := false
49AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
50AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE := true
51AUDIO_FEATURE_ENABLED_SPKR_PROTECTION := true
52AUDIO_FEATURE_ENABLED_ACDB_LICENSE := true
53AUDIO_FEATURE_ENABLED_DEV_ARBI := false
54MM_AUDIO_ENABLED_FTM := true
55TARGET_USES_QCOM_MM_AUDIO := true
56AUDIO_FEATURE_ENABLED_SOURCE_TRACKING := true
Rajshekar Eashwarappa88834522018-04-02 17:20:15 +053057BOARD_SUPPORTS_QAHW := false
Revathi Uddaraju1eac8b02017-05-18 17:13:33 +053058AUDIO_FEATURE_ENABLED_DYNAMIC_LOG := true
Dhananjay Kumare6293dd2017-05-25 17:25:30 +053059AUDIO_FEATURE_ENABLED_SND_MONITOR := true
Revathi Uddaraju64f14422018-07-11 11:42:12 +053060AUDIO_FEATURE_ENABLED_SVA_MULTI_STAGE := true
Himanshu Agrawal77c6d322018-04-17 20:46:37 +053061ifeq ($(TARGET_KERNEL_VERSION), 3.18)
62 AUDIO_FEATURE_ENABLED_DLKM := false
63else
64 AUDIO_FEATURE_ENABLED_DLKM := true
65endif
Ashish Jain1221b522016-03-30 15:09:20 +053066##AUDIO_FEATURE_FLAGS
67
Ashish Jain440a4d92016-04-06 23:03:56 +053068#Audio Specific device overlays
69DEVICE_PACKAGE_OVERLAYS += hardware/qcom/audio/configs/common/overlay
70
Sharad Sangle8ecefdc2016-09-26 13:50:41 +053071# Audio configuration file
vivek mehta02a52022017-01-27 15:36:19 -080072ifeq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
Sharad Sangle8ecefdc2016-09-26 13:50:41 +053073PRODUCT_COPY_FILES += \
Divya Narayanan Poojary2c5f13a2017-07-05 16:54:41 +053074 device/qcom/common/media/audio_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy.conf
Sharad Sangle8ecefdc2016-09-26 13:50:41 +053075else
76PRODUCT_COPY_FILES += \
Divya Narayanan Poojary2c5f13a2017-07-05 16:54:41 +053077 hardware/qcom/audio/configs/msm8937/audio_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy.conf
Sharad Sangle8ecefdc2016-09-26 13:50:41 +053078endif
Ashish Jain1221b522016-03-30 15:09:20 +053079
80PRODUCT_COPY_FILES +=\
David Ng06ccd872017-03-15 11:39:33 -070081hardware/qcom/audio/configs/msm8937/audio_output_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_output_policy.conf\
82hardware/qcom/audio/configs/msm8937/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf\
Lakshman Chaluvarajuc57b29c2018-05-08 19:42:03 +053083hardware/qcom/audio/configs/msm8937/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
Divya Narayanan Poojary2c5f13a2017-07-05 16:54:41 +053084hardware/qcom/audio/configs/msm8937/mixer_paths_mtp.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_mtp.xml \
Vaishnavi Kommaraju5d1e79c2018-03-23 17:23:11 +053085hardware/qcom/audio/configs/msm8937/mixer_paths_sdm439_pm8953.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_sdm439_pm8953.xml \
Divya Narayanan Poojary2c5f13a2017-07-05 16:54:41 +053086hardware/qcom/audio/configs/msm8937/mixer_paths_qrd_skuh.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_qrd_skuh.xml \
87hardware/qcom/audio/configs/msm8937/mixer_paths_qrd_skui.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_qrd_skui.xml \
88hardware/qcom/audio/configs/msm8937/mixer_paths_qrd_skuhf.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_qrd_skuhf.xml \
89hardware/qcom/audio/configs/msm8937/mixer_paths_wcd9306.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_wcd9306.xml \
90hardware/qcom/audio/configs/msm8937/mixer_paths_skuk.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_skuk.xml \
91hardware/qcom/audio/configs/msm8937/mixer_paths_qrd_skum.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_qrd_skum.xml \
92hardware/qcom/audio/configs/msm8937/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \
93hardware/qcom/audio/configs/msm8937/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml \
94hardware/qcom/audio/configs/msm8937/sound_trigger_mixer_paths_wcd9306.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_wcd9306.xml \
95hardware/qcom/audio/configs/msm8937/sound_trigger_mixer_paths_wcd9330.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_wcd9330.xml \
96hardware/qcom/audio/configs/msm8937/sound_trigger_mixer_paths_wcd9335.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_wcd9335.xml \
97hardware/qcom/audio/configs/msm8937/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml \
98hardware/qcom/audio/configs/msm8937/mixer_paths_wcd9330.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_wcd9330.xml \
99hardware/qcom/audio/configs/msm8937/mixer_paths_wcd9335.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_wcd9335.xml \
100hardware/qcom/audio/configs/msm8937/mixer_paths_wcd9326.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_wcd9326.xml \
101hardware/qcom/audio/configs/msm8937/mixer_paths_qrd_skun.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_qrd_skun.xml \
102hardware/qcom/audio/configs/msm8937/mixer_paths_qrd_sku1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_qrd_sku1.xml \
103hardware/qcom/audio/configs/msm8937/mixer_paths_qrd_sku2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_qrd_sku2.xml \
104hardware/qcom/audio/configs/msm8937/audio_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info.xml \
105hardware/qcom/audio/configs/msm8937/audio_platform_info_extcodec.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_extcodec.xml \
Revathi Uddarajufdaeee22017-10-20 12:29:32 +0530106hardware/qcom/audio/configs/msm8937/audio_tuning_mixer.txt:$(TARGET_COPY_OUT_VENDOR)/etc/audio_tuning_mixer.txt
Ashish Jain1221b522016-03-30 15:09:20 +0530107
Satya Krishna Pindiproli013c3e42016-04-13 17:41:15 +0530108#XML Audio configuration files
109ifeq ($(USE_XML_AUDIO_POLICY_CONF), 1)
Dhananjay Kumaraeb58fd2017-07-14 22:45:34 +0530110ifneq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
Satya Krishna Pindiproli013c3e42016-04-13 17:41:15 +0530111PRODUCT_COPY_FILES += \
Dhananjay Kumaraeb58fd2017-07-14 22:45:34 +0530112 $(TOPDIR)hardware/qcom/audio/configs/msm8937/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/audio_policy_configuration.xml
Satya Krishna Pindiproli87a95f92016-05-09 19:58:33 +0530113endif
114PRODUCT_COPY_FILES += \
Dhananjay Kumaraeb58fd2017-07-14 22:45:34 +0530115 $(TOPDIR)hardware/qcom/audio/configs/common/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
Divya Narayanan Poojary2c5f13a2017-07-05 16:54:41 +0530116 $(TOPDIR)frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
117 $(TOPDIR)frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
118 $(TOPDIR)frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
119 $(TOPDIR)frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml
Srinu Jellae36e6e42019-05-15 17:59:11 +0530120
121#check for Android P (version 9)
122ifeq ($(PLATFORM_VERSION), 9)
123PRODUCT_COPY_FILES += \
124 $(TOPDIR)frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml
125else
126PRODUCT_COPY_FILES += \
127 $(TOPDIR)hardware/qcom/audio/configs/common/bluetooth_qti_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml
128endif
Satya Krishna Pindiproli013c3e42016-04-13 17:41:15 +0530129endif
130
Ashish Jain1221b522016-03-30 15:09:20 +0530131# Reduce client buffer size for fast audio output tracks
132PRODUCT_PROPERTY_OVERRIDES += \
133 af.fast_track_multiplier=1
134
135# Low latency audio buffer size in frames
136PRODUCT_PROPERTY_OVERRIDES += \
Ramjee Singh63839662017-05-10 15:27:22 +0530137 vendor.audio_hal.period_size=192
Ashish Jain1221b522016-03-30 15:09:20 +0530138
139##fluencetype can be "fluence" or "fluencepro" or "none"
140PRODUCT_PROPERTY_OVERRIDES += \
Ramjee Singh63839662017-05-10 15:27:22 +0530141ro.vendor.audio.sdk.fluencetype=none\
142persist.vendor.audio.fluence.voicecall=true\
143persist.vendor.audio.fluence.voicerec=false\
144persist.vendor.audio.fluence.speaker=true
Ashish Jain1221b522016-03-30 15:09:20 +0530145
146#disable tunnel encoding
147PRODUCT_PROPERTY_OVERRIDES += \
Ramjee Singh63839662017-05-10 15:27:22 +0530148vendor.audio.tunnel.encode=false
Ashish Jain1221b522016-03-30 15:09:20 +0530149
150#Buffer size in kbytes for compress offload playback
151PRODUCT_PROPERTY_OVERRIDES += \
Ramjee Singh63839662017-05-10 15:27:22 +0530152vendor.audio.offload.buffer.size.kb=64
Ashish Jain1221b522016-03-30 15:09:20 +0530153
154#Minimum duration for offload playback in secs
155PRODUCT_PROPERTY_OVERRIDES += \
156audio.offload.min.duration.secs=30
157
158#Enable offload audio video playback by default
159PRODUCT_PROPERTY_OVERRIDES += \
160audio.offload.video=true
161
Ashish Jain1221b522016-03-30 15:09:20 +0530162#Enable audio track offload by default
163PRODUCT_PROPERTY_OVERRIDES += \
Ramjee Singh63839662017-05-10 15:27:22 +0530164vendor.audio.offload.track.enable=true
Ashish Jain1221b522016-03-30 15:09:20 +0530165
166#Enable music through deep buffer
167PRODUCT_PROPERTY_OVERRIDES += \
168audio.deep_buffer.media=true
169
Ashish Jain1221b522016-03-30 15:09:20 +0530170#enable voice path for PCM VoIP by default
171PRODUCT_PROPERTY_OVERRIDES += \
Ramjee Singh63839662017-05-10 15:27:22 +0530172vendor.voice.path.for.pcm.voip=true
Ashish Jain1221b522016-03-30 15:09:20 +0530173
174#Enable multi channel aac through offload
175PRODUCT_PROPERTY_OVERRIDES += \
Ramjee Singh63839662017-05-10 15:27:22 +0530176vendor.audio.offload.multiaac.enable=true
Ashish Jain1221b522016-03-30 15:09:20 +0530177
178#Enable DS2, Hardbypass feature for Dolby
179PRODUCT_PROPERTY_OVERRIDES += \
Satya Krishna Pindiproli4a72ae62017-07-02 16:08:11 +0530180vendor.audio.dolby.ds2.enabled=false\
181vendor.audio.dolby.ds2.hardbypass=false
Ashish Jain1221b522016-03-30 15:09:20 +0530182
183#Disable Multiple offload sesison
184PRODUCT_PROPERTY_OVERRIDES += \
Ramjee Singh63839662017-05-10 15:27:22 +0530185vendor.audio.offload.multiple.enabled=false
Ashish Jain1221b522016-03-30 15:09:20 +0530186
187#Disable Compress passthrough playback
188PRODUCT_PROPERTY_OVERRIDES += \
Ramjee Singh63839662017-05-10 15:27:22 +0530189vendor.audio.offload.passthrough=false
Ashish Jain1221b522016-03-30 15:09:20 +0530190
191#Disable surround sound recording
192PRODUCT_PROPERTY_OVERRIDES += \
Ramjee Singh63839662017-05-10 15:27:22 +0530193ro.vendor.audio.sdk.ssr=false
Ashish Jain1221b522016-03-30 15:09:20 +0530194
195#enable dsp gapless mode by default
196PRODUCT_PROPERTY_OVERRIDES += \
Ramjee Singh63839662017-05-10 15:27:22 +0530197vendor.audio.offload.gapless.enabled=true
Ashish Jain1221b522016-03-30 15:09:20 +0530198
199#enable pbe effects
200PRODUCT_PROPERTY_OVERRIDES += \
Ramjee Singh63839662017-05-10 15:27:22 +0530201vendor.audio.safx.pbe.enabled=true
Ashish Jain1221b522016-03-30 15:09:20 +0530202
203#parser input buffer size(256kb) in byte stream mode
204PRODUCT_PROPERTY_OVERRIDES += \
Ramjee Singh63839662017-05-10 15:27:22 +0530205vendor.audio.parser.ip.buffer.size=262144
Ashish Jain1221b522016-03-30 15:09:20 +0530206
207#enable downsampling for multi-channel content > 48Khz
208PRODUCT_PROPERTY_OVERRIDES += \
Ramjee Singh63839662017-05-10 15:27:22 +0530209vendor.audio.playback.mch.downsample=true
Ashish Jain1221b522016-03-30 15:09:20 +0530210
211#enable software decoders for ALAC and APE.
212PRODUCT_PROPERTY_OVERRIDES += \
Ramjee Singh63839662017-05-10 15:27:22 +0530213vendor.audio.use.sw.alac.decoder=true\
214vendor.audio.use.sw.ape.decoder=true
Ashish Jain1221b522016-03-30 15:09:20 +0530215
216#property for AudioSphere Post processing
217PRODUCT_PROPERTY_OVERRIDES += \
Ramjee Singh63839662017-05-10 15:27:22 +0530218vendor.audio.pp.asphere.enabled=false
Ashish Jain1221b522016-03-30 15:09:20 +0530219
220#Audio voice concurrency related flags
221PRODUCT_PROPERTY_OVERRIDES += \
Ramjee Singh63839662017-05-10 15:27:22 +0530222vendor.voice.playback.conc.disabled=true\
223vendor.voice.record.conc.disabled=false\
224vendor.voice.voip.conc.disabled=true
Ashish Jain1221b522016-03-30 15:09:20 +0530225
226#Decides the audio fallback path during voice call,
227#deep-buffer and fast are the two allowed fallback paths now.
228PRODUCT_PROPERTY_OVERRIDES += \
Ramjee Singh63839662017-05-10 15:27:22 +0530229vendor.voice.conc.fallbackpath=deep-buffer
Ashish Jain1221b522016-03-30 15:09:20 +0530230
231#Disable speaker protection by default
232PRODUCT_PROPERTY_OVERRIDES += \
Ramjee Singh63839662017-05-10 15:27:22 +0530233persist.vendor.audio.speaker.prot.enable=false
Ashish Jain1221b522016-03-30 15:09:20 +0530234
235#Enable HW AAC Encoder by default
236PRODUCT_PROPERTY_OVERRIDES += \
Ramjee Singh63839662017-05-10 15:27:22 +0530237vendor.audio.hw.aac.encoder=true
Satya Krishna Pindiprolid2837402016-08-01 14:16:34 +0530238
239#flac sw decoder 24 bit decode capability
240PRODUCT_PROPERTY_OVERRIDES += \
Ramjee Singh63839662017-05-10 15:27:22 +0530241vendor.audio.flac.sw.decoder.24bit=true
Bharat Pawar50185962017-03-30 14:39:22 +0530242
Satya Krishna Pindiproli650ea152017-09-13 17:10:38 +0530243#Set AudioFlinger client heap size
244PRODUCT_PROPERTY_OVERRIDES += \
245ro.af.client_heap_size_kbyte=7168
246
Ramjee Singh43d58b22018-07-26 14:59:19 +0530247PRODUCT_PROPERTY_OVERRIDES += \
248persist.vendor.audio.hw.binder.size_kbyte=1024
249
Bharat Pawar50185962017-03-30 14:39:22 +0530250# for HIDL related packages
251PRODUCT_PACKAGES += \
Rajshekar Eashwarappa0de48032018-05-22 16:31:31 +0530252 android.hardware.audio@2.0-service \
Bharat Pawar50185962017-03-30 14:39:22 +0530253 android.hardware.audio@2.0-impl \
254 android.hardware.audio.effect@2.0-impl \
Revathi Uddaraju64f14422018-07-11 11:42:12 +0530255 android.hardware.soundtrigger@2.1-impl \
Lakshman Chaluvaraju6090b002018-07-25 18:09:15 +0530256 android.hardware.audio@4.0 \
257 android.hardware.audio.common@4.0 \
258 android.hardware.audio.common@4.0-util \
259 android.hardware.audio@4.0-impl \
260 android.hardware.audio.effect@4.0 \
261 android.hardware.audio.effect@4.0-impl