blob: bbc8423e633e044837560991e2f54185a54a6dba [file] [log] [blame]
Xiaoyu Ye4322f152017-03-17 12:34:03 -07001#BOARD_USES_GENERIC_AUDIO := true
2#
3#AUDIO_FEATURE_FLAGS
4BOARD_USES_ALSA_AUDIO := true
5
6ifneq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
7USE_CUSTOM_AUDIO_POLICY := 1
8AUDIO_FEATURE_ENABLED_COMPRESS_CAPTURE := false
Vikram Panduranga93f080e2017-06-07 18:16:14 -07009AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := false
Vikram Pandurangadf59cae2017-08-03 18:04:55 -070010AUDIO_FEATURE_ENABLED_DYNAMIC_ECNS := false
Xiaoyu Ye4322f152017-03-17 12:34:03 -070011AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true
12AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER := true
13AUDIO_FEATURE_ENABLED_EXTN_RESAMPLER := true
14AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true
15AUDIO_FEATURE_ENABLED_HDMI_SPK := true
16AUDIO_FEATURE_ENABLED_PCM_OFFLOAD := true
17AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24 := true
18AUDIO_FEATURE_ENABLED_FLAC_OFFLOAD := true
19AUDIO_FEATURE_ENABLED_VORBIS_OFFLOAD := true
20AUDIO_FEATURE_ENABLED_WMA_OFFLOAD := true
21AUDIO_FEATURE_ENABLED_ALAC_OFFLOAD := true
22AUDIO_FEATURE_ENABLED_APE_OFFLOAD := true
23AUDIO_FEATURE_ENABLED_AAC_ADTS_OFFLOAD := true
24AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
Ramjee Singh3a836cd2018-04-06 19:28:20 +053025AUDIO_FEATURE_ENABLED_SSR := true
Xiaoyu Ye4322f152017-03-17 12:34:03 -070026AUDIO_FEATURE_ENABLED_DTS_EAGLE := false
27BOARD_USES_SRS_TRUEMEDIA := false
28DTS_CODEC_M_ := false
29MM_AUDIO_ENABLED_SAFX := true
30AUDIO_FEATURE_ENABLED_HW_ACCELERATED_EFFECTS := false
31AUDIO_FEATURE_ENABLED_AUDIOSPHERE := true
32AUDIO_FEATURE_ENABLED_USB_TUNNEL_AUDIO := true
Satya Krishna Pindiprolif7d65712017-04-26 14:24:53 +053033AUDIO_FEATURE_ENABLED_SPLIT_A2DP := true
Weiyin Jiangb21d0942018-03-21 15:32:42 +080034AUDIO_FEATURE_ENABLED_3D_AUDIO := true
Dhananjay Kumar29b894e2017-04-05 02:41:14 +053035DOLBY_ENABLE := false
Soumil Shah196157e2018-01-22 17:39:48 -080036TARGET_USES_QCOM_MM_AUDIO := true
Xiaoyu Ye4322f152017-03-17 12:34:03 -070037endif
38
39USE_XML_AUDIO_POLICY_CONF := 1
40BOARD_SUPPORTS_SOUND_TRIGGER := true
41AUDIO_USE_LL_AS_PRIMARY_OUTPUT := true
42AUDIO_FEATURE_ENABLED_VBAT_MONITOR := true
43AUDIO_FEATURE_ENABLED_ANC_HEADSET := true
44AUDIO_FEATURE_ENABLED_CUSTOMSTEREO := true
45AUDIO_FEATURE_ENABLED_FLUENCE := true
46AUDIO_FEATURE_ENABLED_HDMI_EDID := true
47AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH := true
48#AUDIO_FEATURE_ENABLED_KEEP_ALIVE := true
49AUDIO_FEATURE_ENABLED_DISPLAY_PORT := true
Aalique Grahame28395ec2017-05-18 11:12:23 -070050AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := false
Xiaoyu Ye4322f152017-03-17 12:34:03 -070051AUDIO_FEATURE_ENABLED_HFP := true
52AUDIO_FEATURE_ENABLED_INCALL_MUSIC := false
53AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
54AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE := true
55AUDIO_FEATURE_ENABLED_SPKR_PROTECTION := true
Aalique Grahame28395ec2017-05-18 11:12:23 -070056AUDIO_FEATURE_ENABLED_ACDB_LICENSE := false
Xiaoyu Ye4322f152017-03-17 12:34:03 -070057AUDIO_FEATURE_ENABLED_DEV_ARBI := false
Revathi Uddaraju074d9c62017-09-13 15:10:29 +053058AUDIO_FEATURE_ENABLED_DYNAMIC_LOG := true
Xiaoyu Ye4322f152017-03-17 12:34:03 -070059MM_AUDIO_ENABLED_FTM := true
Xiaoyu Ye4322f152017-03-17 12:34:03 -070060AUDIO_FEATURE_ENABLED_SOURCE_TRACKING := true
61AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
Aalique Grahame190cfcb2017-04-21 11:54:14 -070062BOARD_SUPPORTS_QAHW := false
Xiaoyu Ye4322f152017-03-17 12:34:03 -070063AUDIO_FEATURE_ENABLED_RAS := true
Dhananjay Kumare6293dd2017-05-25 17:25:30 +053064AUDIO_FEATURE_ENABLED_SND_MONITOR := true
Xiaoyu Ye4322f152017-03-17 12:34:03 -070065##AUDIO_FEATURE_FLAGS
66
67#Audio Specific device overlays
68DEVICE_PACKAGE_OVERLAYS += hardware/qcom/audio/configs/common/overlay
69
70# Audio configuration file
Aalique Grahame190cfcb2017-04-21 11:54:14 -070071ifeq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
Xiaoyu Ye4322f152017-03-17 12:34:03 -070072PRODUCT_COPY_FILES += \
73 device/qcom/common/media/audio_policy.conf:system/etc/audio_policy.conf
74else
75PRODUCT_COPY_FILES += \
Soumild9f5bfa2017-04-04 19:31:22 -070076 hardware/qcom/audio/configs/sdm845/audio_policy.conf:system/etc/audio_policy.conf
Xiaoyu Ye4322f152017-03-17 12:34:03 -070077endif
78
79PRODUCT_COPY_FILES += \
Aalique Grahame190cfcb2017-04-21 11:54:14 -070080 hardware/qcom/audio/configs/sdm845/audio_output_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_output_policy.conf \
81 hardware/qcom/audio/configs/sdm845/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf \
Lakshman Chaluvarajuc57b29c2018-05-08 19:42:03 +053082 hardware/qcom/audio/configs/sdm845/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
Naresh Tanniru10758b62017-06-05 21:05:53 +053083 hardware/qcom/audio/configs/sdm845/mixer_paths_tavil.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_tavil.xml \
Xiaoyu Ye319c45d2017-05-30 17:16:19 -070084 hardware/qcom/audio/configs/sdm845/mixer_paths_skuk.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_skuk.xml \
Meng Wanga0023702017-08-28 17:12:04 +080085 hardware/qcom/audio/configs/sdm845/mixer_paths_qvr.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_qvr.xml \
Naresh Tanniru10758b62017-06-05 21:05:53 +053086 hardware/qcom/audio/configs/sdm845/mixer_paths_i2s.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_i2s.xml \
Xiaoyu Ye319c45d2017-05-30 17:16:19 -070087 hardware/qcom/audio/configs/sdm845/audio_tuning_mixer_tavil.txt:$(TARGET_COPY_OUT_VENDOR)/etc/audio_tuning_mixer_tavil.txt \
Naresh Tanniru10758b62017-06-05 21:05:53 +053088 hardware/qcom/audio/configs/sdm845/audio_platform_info_i2s.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_i2s.xml \
89 hardware/qcom/audio/configs/sdm845/sound_trigger_mixer_paths_wcd9340.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_wcd9340.xml \
90 hardware/qcom/audio/configs/sdm845/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml \
91 hardware/qcom/audio/configs/sdm845/graphite_ipc_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/graphite_ipc_platform_info.xml \
Revathi Uddarajufdaeee22017-10-20 12:29:32 +053092 hardware/qcom/audio/configs/sdm845/audio_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info.xml
Xiaoyu Ye4322f152017-03-17 12:34:03 -070093
94#XML Audio configuration files
95ifeq ($(USE_XML_AUDIO_POLICY_CONF), 1)
Dhananjay Kumaraeb58fd2017-07-14 22:45:34 +053096ifneq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
Xiaoyu Ye4322f152017-03-17 12:34:03 -070097PRODUCT_COPY_FILES += \
Dhananjay Kumaraeb58fd2017-07-14 22:45:34 +053098 $(TOPDIR)hardware/qcom/audio/configs/sdm845/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/audio_policy_configuration.xml
Xiaoyu Ye4322f152017-03-17 12:34:03 -070099endif
100PRODUCT_COPY_FILES += \
Dhananjay Kumaraeb58fd2017-07-14 22:45:34 +0530101 $(TOPDIR)hardware/qcom/audio/configs/common/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
102 $(TOPDIR)frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
103 $(TOPDIR)frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
104 $(TOPDIR)frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
105 $(TOPDIR)frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
106 $(TOPDIR)frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700107endif
108
109# Listen configuration file
110PRODUCT_COPY_FILES += \
Naresh Tanniru10758b62017-06-05 21:05:53 +0530111 hardware/qcom/audio/configs/sdm845/listen_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/listen_platform_info.xml
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700112
113# Reduce client buffer size for fast audio output tracks
114PRODUCT_PROPERTY_OVERRIDES += \
115 af.fast_track_multiplier=1
116
117# Low latency audio buffer size in frames
118PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700119 vendor.audio_hal.period_size=192
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700120
121##fluencetype can be "fluence" or "fluencepro" or "none"
122PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700123ro.vendor.audio.sdk.fluencetype=none\
124persist.vendor.audio.fluence.voicecall=true\
125persist.vendor.audio.fluence.voicerec=false\
126persist.vendor.audio.fluence.speaker=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700127
128#disable tunnel encoding
129PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700130vendor.audio.tunnel.encode=false
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700131
132#Disable RAS Feature by default
133PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700134persist.vendor.audio.ras.enabled=false
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700135
136#Buffer size in kbytes for compress offload playback
137PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700138vendor.audio.offload.buffer.size.kb=32
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700139
140#Enable offload audio video playback by default
141PRODUCT_PROPERTY_OVERRIDES += \
142audio.offload.video=true
143
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700144#Enable audio track offload by default
145PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700146vendor.audio.offload.track.enable=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700147
148#Enable music through deep buffer
149PRODUCT_PROPERTY_OVERRIDES += \
150audio.deep_buffer.media=true
151
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700152#enable voice path for PCM VoIP by default
153PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700154vendor.voice.path.for.pcm.voip=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700155
156#Enable multi channel aac through offload
157PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700158vendor.audio.offload.multiaac.enable=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700159
160#Enable DS2, Hardbypass feature for Dolby
161PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700162vendor.audio.dolby.ds2.enabled=false\
163vendor.audio.dolby.ds2.hardbypass=false
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700164
165#Disable Multiple offload sesison
166PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700167vendor.audio.offload.multiple.enabled=false
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700168
169#Disable Compress passthrough playback
170PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700171vendor.audio.offload.passthrough=false
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700172
173#Disable surround sound recording
174PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700175ro.vendor.audio.sdk.ssr=false
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700176
177#enable dsp gapless mode by default
178PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700179vendor.audio.offload.gapless.enabled=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700180
181#enable pbe effects
182PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700183vendor.audio.safx.pbe.enabled=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700184
185#parser input buffer size(256kb) in byte stream mode
186PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700187vendor.audio.parser.ip.buffer.size=262144
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700188
189#flac sw decoder 24 bit decode capability
190PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700191vendor.audio.flac.sw.decoder.24bit=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700192
193#split a2dp DSP supported encoder list
194PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Lata8ea69882017-09-26 16:23:45 -0700195persist.vendor.bt.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aac
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700196
197#enable software decoders for ALAC and APE
198PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700199vendor.audio.use.sw.alac.decoder=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700200PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700201vendor.audio.use.sw.ape.decoder=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700202
203#enable hw aac encoder by default
204PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700205vendor.audio.hw.aac.encoder=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700206
207#Disable FM a2dp concurrency
208PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700209vendor.fm.a2dp.conc.disabled=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700210
211#audio becoming noisy intent broadcast delay
212PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700213vendor.audio.noisy.broadcast.delay=600
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700214
215#offload pausetime out duration to 3 secs to inline with other outputs
216PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700217vendor.audio.offload.pstimeout.secs=3
Aalique Grahame190cfcb2017-04-21 11:54:14 -0700218
Satya Krishna Pindiproli650ea152017-09-13 17:10:38 +0530219#Set AudioFlinger client heap size
220PRODUCT_PROPERTY_OVERRIDES += \
221ro.af.client_heap_size_kbyte=7168
222
Dhananjay Kumar57ceeb72017-10-11 22:49:28 +0530223#Set HAL buffer size to samples equal to 3 ms
224PRODUCT_PROPERTY_OVERRIDES += \
225vendor.audio_hal.in_period_size=144
226
227#Set HAL buffer size to 3 ms
228PRODUCT_PROPERTY_OVERRIDES += \
229vendor.audio_hal.period_multiplier=3
230
231#ADM Buffering size in ms
232PRODUCT_PROPERTY_OVERRIDES += \
233vendor.audio.adm.buffering.ms=2
234
Aniket Kumar Latac78a3432017-11-06 18:18:52 -0800235#enable keytone FR
236PRODUCT_PROPERTY_OVERRIDES += \
237vendor.audio.hal.output.suspend.supported=true
238
Aalique Grahamed941eae2017-12-01 15:36:47 -0800239#enable use of display-port for voice usecases
Aalique Grahame99d45632017-12-11 17:35:41 -0800240PRODUCT_PROPERTY_OVERRIDES += \
Aalique Grahamed941eae2017-12-01 15:36:47 -0800241vendor.audio.enable.dp.for.voice=false
242
Aalique Grahame190cfcb2017-04-21 11:54:14 -0700243# for HIDL related packages
244PRODUCT_PACKAGES += \
245 android.hardware.audio@2.0-service \
246 android.hardware.audio@2.0-impl \
247 android.hardware.audio.effect@2.0-impl \
Dallas Delaney4ee3ca32018-04-05 16:51:32 -0700248 android.hardware.soundtrigger@2.1-impl