blob: 68344797a471cdec20a34b6a60f96bc73815da8e [file] [log] [blame]
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +05301#BOARD_USES_GENERIC_AUDIO := true
2#
3#AUDIO_FEATURE_FLAGS
4BOARD_USES_ALSA_AUDIO := true
Dhananjay Kumar05f20b12017-03-31 03:46:42 +05305
6ifneq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +05307USE_CUSTOM_AUDIO_POLICY := 1
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +05308AUDIO_FEATURE_ENABLED_COMPRESS_CAPTURE := false
9AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := true
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +053010AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true
11AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER := true
12AUDIO_FEATURE_ENABLED_EXTN_RESAMPLER := true
13AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +053014AUDIO_FEATURE_ENABLED_HDMI_SPK := true
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +053015AUDIO_FEATURE_ENABLED_PCM_OFFLOAD := true
16AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24 := true
17AUDIO_FEATURE_ENABLED_FLAC_OFFLOAD := true
18AUDIO_FEATURE_ENABLED_VORBIS_OFFLOAD := true
19AUDIO_FEATURE_ENABLED_WMA_OFFLOAD := true
20AUDIO_FEATURE_ENABLED_ALAC_OFFLOAD := true
21AUDIO_FEATURE_ENABLED_APE_OFFLOAD := true
22AUDIO_FEATURE_ENABLED_AAC_ADTS_OFFLOAD := true
Naresh Tanniru01223b92016-11-01 13:50:57 +053023AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +053024AUDIO_FEATURE_ENABLED_SSR := true
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +053025AUDIO_FEATURE_ENABLED_DTS_EAGLE := false
26BOARD_USES_SRS_TRUEMEDIA := false
27DTS_CODEC_M_ := false
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +053028MM_AUDIO_ENABLED_SAFX := true
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +053029AUDIO_FEATURE_ENABLED_HW_ACCELERATED_EFFECTS := false
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +053030AUDIO_FEATURE_ENABLED_AUDIOSPHERE := true
Naresh Tanniru01223b92016-11-01 13:50:57 +053031AUDIO_FEATURE_ENABLED_USB_TUNNEL_AUDIO := true
Satya Krishna Pindiprolif7d65712017-04-26 14:24:53 +053032AUDIO_FEATURE_ENABLED_SPLIT_A2DP := true
Dhananjay Kumar29b894e2017-04-05 02:41:14 +053033AUDIO_FEATURE_ENABLED_3D_AUDIO := false
Naresh Tanniru2034f1b2017-04-25 16:21:50 +053034AUDIO_FEATURE_ENABLED_VOICE_PRINT := false
35USE_LEGACY_AUDIO_DAEMON := false
36USE_LEGACY_AUDIO_MEASUREMENT := false
Dhananjay Kumar29b894e2017-04-05 02:41:14 +053037DOLBY_ENABLE := false
Dhananjay Kumar05f20b12017-03-31 03:46:42 +053038endif
39
40USE_XML_AUDIO_POLICY_CONF := 1
41BOARD_SUPPORTS_SOUND_TRIGGER := true
42AUDIO_USE_LL_AS_PRIMARY_OUTPUT := true
43AUDIO_FEATURE_ENABLED_HIFI_AUDIO := true
44AUDIO_FEATURE_ENABLED_VBAT_MONITOR := true
45AUDIO_FEATURE_ENABLED_ANC_HEADSET := true
Naresh Tanniru2034f1b2017-04-25 16:21:50 +053046AUDIO_FEATURE_ENABLED_CUSTOMSTEREO := true
Dhananjay Kumar05f20b12017-03-31 03:46:42 +053047AUDIO_FEATURE_ENABLED_FLUENCE := true
Naresh Tanniru2034f1b2017-04-25 16:21:50 +053048AUDIO_FEATURE_ENABLED_HDMI_EDID := true
49AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH := true
50#AUDIO_FEATURE_ENABLED_KEEP_ALIVE := true
51AUDIO_FEATURE_ENABLED_DISPLAY_PORT := true
Satya Krishna Pindiproli4a72ae62017-07-02 16:08:11 +053052AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := false
Naresh Tanniru2034f1b2017-04-25 16:21:50 +053053AUDIO_FEATURE_ENABLED_HFP := true
Dhananjay Kumar05f20b12017-03-31 03:46:42 +053054AUDIO_FEATURE_ENABLED_INCALL_MUSIC := false
Naresh Tanniru2034f1b2017-04-25 16:21:50 +053055AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
Dhananjay Kumar05f20b12017-03-31 03:46:42 +053056AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE := true
57AUDIO_FEATURE_ENABLED_SPKR_PROTECTION := true
58AUDIO_FEATURE_ENABLED_ACDB_LICENSE := true
59AUDIO_FEATURE_ENABLED_DEV_ARBI := false
Revathi Uddaraju074d9c62017-09-13 15:10:29 +053060AUDIO_FEATURE_ENABLED_DYNAMIC_LOG := true
Dhananjay Kumar05f20b12017-03-31 03:46:42 +053061MM_AUDIO_ENABLED_FTM := true
62TARGET_USES_QCOM_MM_AUDIO := true
Naresh Tanniru2034f1b2017-04-25 16:21:50 +053063AUDIO_FEATURE_ENABLED_SOURCE_TRACKING := true
64AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
Rohit Kumarbe6935f2017-01-20 14:58:34 +053065AUDIO_FEATURE_ENABLED_RAS := true
Dhananjay Kumare6293dd2017-05-25 17:25:30 +053066AUDIO_FEATURE_ENABLED_SND_MONITOR := true
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +053067##AUDIO_FEATURE_FLAGS
68
69#Audio Specific device overlays
70DEVICE_PACKAGE_OVERLAYS += hardware/qcom/audio/configs/common/overlay
71
72# Audio configuration file
vivek mehta02a52022017-01-27 15:36:19 -080073ifeq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +053074PRODUCT_COPY_FILES += \
75 device/qcom/common/media/audio_policy.conf:system/etc/audio_policy.conf
76else
77PRODUCT_COPY_FILES += \
Arusha Goyalfda29152016-12-26 10:53:39 +053078 hardware/qcom/audio/configs/sdm660/audio_policy.conf:system/etc/audio_policy.conf
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +053079endif
80
81PRODUCT_COPY_FILES += \
David Ng06ccd872017-03-15 11:39:33 -070082 hardware/qcom/audio/configs/sdm660/audio_output_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_output_policy.conf \
83 hardware/qcom/audio/configs/sdm660/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf \
Naresh Tanniru10758b62017-06-05 21:05:53 +053084 hardware/qcom/audio/configs/sdm660/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \
85 hardware/qcom/audio/configs/sdm660/mixer_paths_mtp.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_mtp.xml \
86 hardware/qcom/audio/configs/sdm660/mixer_paths_wcd9335.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_wcd9335.xml \
87 hardware/qcom/audio/configs/sdm660/mixer_paths_wcd9340.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_wcd9340.xml \
88 hardware/qcom/audio/configs/sdm660/mixer_paths_wcd9326.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_wcd9326.xml \
89 hardware/qcom/audio/configs/sdm660/mixer_paths_skus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_skus.xml \
90 hardware/qcom/audio/configs/sdm660/mixer_paths_skush.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_skush.xml \
91 hardware/qcom/audio/configs/sdm660/mixer_paths_i2s.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_i2s.xml \
92 hardware/qcom/audio/configs/sdm660/audio_tuning_mixer.txt:$(TARGET_COPY_OUT_VENDOR)/etc/audio_tuning_mixer.txt \
93 hardware/qcom/audio/configs/sdm660/audio_tuning_mixer_tavil.txt:$(TARGET_COPY_OUT_VENDOR)/etc/audio_tuning_mixer_tavil.txt \
94 hardware/qcom/audio/configs/sdm660/audio_tuning_mixer_tasha.txt:$(TARGET_COPY_OUT_VENDOR)/etc/audio_tuning_mixer_tasha.txt \
95 hardware/qcom/audio/configs/sdm660/audio_platform_info_extcodec.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_extcodec.xml \
96 hardware/qcom/audio/configs/sdm660/audio_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info.xml \
97 hardware/qcom/audio/configs/sdm660/audio_platform_info_skush.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_skush.xml \
98 hardware/qcom/audio/configs/sdm660/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml \
99 hardware/qcom/audio/configs/sdm660/sound_trigger_mixer_paths_wcd9330.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_wcd9330.xml \
100 hardware/qcom/audio/configs/sdm660/sound_trigger_mixer_paths_wcd9335.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_wcd9335.xml \
101 hardware/qcom/audio/configs/sdm660/sound_trigger_mixer_paths_wcd9340.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_wcd9340.xml \
102 hardware/qcom/audio/configs/sdm660/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml \
Revathi Uddarajufdaeee22017-10-20 12:29:32 +0530103 hardware/qcom/audio/configs/sdm660/graphite_ipc_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/graphite_ipc_platform_info.xml
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530104
105#XML Audio configuration files
106ifeq ($(USE_XML_AUDIO_POLICY_CONF), 1)
Dhananjay Kumaraeb58fd2017-07-14 22:45:34 +0530107ifneq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530108PRODUCT_COPY_FILES += \
Dhananjay Kumaraeb58fd2017-07-14 22:45:34 +0530109 $(TOPDIR)hardware/qcom/audio/configs/sdm660/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/audio_policy_configuration.xml
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530110endif
111PRODUCT_COPY_FILES += \
Dhananjay Kumaraeb58fd2017-07-14 22:45:34 +0530112 $(TOPDIR)hardware/qcom/audio/configs/common/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
113 $(TOPDIR)frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
114 $(TOPDIR)frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
115 $(TOPDIR)frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
116 $(TOPDIR)frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
117 $(TOPDIR)frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530118endif
119
120# Listen configuration file
121PRODUCT_COPY_FILES += \
Naresh Tanniru10758b62017-06-05 21:05:53 +0530122 hardware/qcom/audio/configs/sdm660/listen_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/listen_platform_info.xml
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530123
124# Reduce client buffer size for fast audio output tracks
125PRODUCT_PROPERTY_OVERRIDES += \
126 af.fast_track_multiplier=1
127
128# Low latency audio buffer size in frames
129PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700130 vendor.audio_hal.period_size=192
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530131
132##fluencetype can be "fluence" or "fluencepro" or "none"
133PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700134ro.vendor.audio.sdk.fluencetype=none\
135persist.vendor.audio.fluence.voicecall=true\
136persist.vendor.audio.fluence.voicerec=false\
137persist.vendor.audio.fluence.speaker=true
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530138
139#disable tunnel encoding
140PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700141vendor.audio.tunnel.encode=false
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530142
Rohit Kumarbe6935f2017-01-20 14:58:34 +0530143#Disable RAS Feature by default
144PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700145persist.vendor.audio.ras.enabled=false
Rohit Kumarbe6935f2017-01-20 14:58:34 +0530146
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530147#Buffer size in kbytes for compress offload playback
148PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700149vendor.audio.offload.buffer.size.kb=64
Ashish Jainbb44d8a2017-01-02 11:18:44 +0530150
151#Minimum duration for offload playback in secs
152PRODUCT_PROPERTY_OVERRIDES += \
153audio.offload.min.duration.secs=30
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530154
155#Enable offload audio video playback by default
156PRODUCT_PROPERTY_OVERRIDES += \
157audio.offload.video=true
158
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530159#Enable audio track offload by default
160PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700161vendor.audio.offload.track.enable=true
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530162
163#Enable music through deep buffer
164PRODUCT_PROPERTY_OVERRIDES += \
165audio.deep_buffer.media=true
166
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530167#enable voice path for PCM VoIP by default
168PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700169vendor.voice.path.for.pcm.voip=true
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530170
171#Enable multi channel aac through offload
172PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700173vendor.audio.offload.multiaac.enable=true
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530174
175#Enable DS2, Hardbypass feature for Dolby
176PRODUCT_PROPERTY_OVERRIDES += \
Satya Krishna Pindiproli4a72ae62017-07-02 16:08:11 +0530177vendor.audio.dolby.ds2.enabled=false\
178vendor.audio.dolby.ds2.hardbypass=false
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530179
180#Disable Multiple offload sesison
181PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700182vendor.audio.offload.multiple.enabled=false
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530183
Garmond Leunge3e61082017-02-06 15:08:26 -0800184#Disable Compress passthrough playback
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530185PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700186vendor.audio.offload.passthrough=false
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530187
188#Disable surround sound recording
189PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700190ro.vendor.audio.sdk.ssr=false
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530191
192#enable dsp gapless mode by default
193PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700194vendor.audio.offload.gapless.enabled=true
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530195
196#enable pbe effects
197PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700198vendor.audio.safx.pbe.enabled=true
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530199
200#parser input buffer size(256kb) in byte stream mode
201PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700202vendor.audio.parser.ip.buffer.size=262144
Dhananjay Kumard3ab9f42016-07-20 17:05:47 +0530203
Naresh Tanniru01223b92016-11-01 13:50:57 +0530204#flac sw decoder 24 bit decode capability
205PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700206vendor.audio.flac.sw.decoder.24bit=true
Naresh Tanniru01223b92016-11-01 13:50:57 +0530207
208#split a2dp DSP supported encoder list
209PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700210persist.vendor.bt.a2dp_offload_cap=sbc-aptx-aptxhd-aac
Naresh Tanniru01223b92016-11-01 13:50:57 +0530211
212#enable software decoders for ALAC and APE
213PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700214vendor.audio.use.sw.alac.decoder=true
Naresh Tanniru01223b92016-11-01 13:50:57 +0530215PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700216vendor.audio.use.sw.ape.decoder=true
Naresh Tanniru01223b92016-11-01 13:50:57 +0530217
218#enable hw aac encoder by default
219PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700220vendor.audio.hw.aac.encoder=true
Naresh Tanniru01223b92016-11-01 13:50:57 +0530221
222#Disable FM a2dp concurrency
223PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700224vendor.fm.a2dp.conc.disabled=true
Naresh Tanniru01223b92016-11-01 13:50:57 +0530225
226#audio becoming noisy intent broadcast delay
227PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700228vendor.audio.noisy.broadcast.delay=600
Naresh Tanniru01223b92016-11-01 13:50:57 +0530229
230#Enable HIFI audio support for internal codec
231PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700232persist.vendor.audio.hifi.int_codec=true
Naresh Tanniruec59ba32016-12-21 19:11:50 +0530233
234#offload pausetime out duration to 3 secs to inline with other outputs
235PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700236vendor.audio.offload.pstimeout.secs=3
Dhananjay Kumar05f20b12017-03-31 03:46:42 +0530237
Satya Krishna Pindiproli650ea152017-09-13 17:10:38 +0530238#Set AudioFlinger client heap size
239PRODUCT_PROPERTY_OVERRIDES += \
240ro.af.client_heap_size_kbyte=7168
241
Dhananjay Kumar05f20b12017-03-31 03:46:42 +0530242# for HIDL related packages
243PRODUCT_PACKAGES += \
244 android.hardware.audio@2.0-service \
245 android.hardware.audio@2.0-impl \
246 android.hardware.audio.effect@2.0-impl \
247 android.hardware.soundtrigger@2.0-impl