blob: 103516d985d5b2295dd482170e1bb1ea8a62c8ee [file] [log] [blame]
Hari Veerubhotlae56a5fa2018-10-14 16:52:10 +05301#BOARD_USES_GENERIC_AUDIO := true
2#
3#AUDIO_FEATURE_FLAGS
4BOARD_USES_ALSA_AUDIO := true
5TARGET_USES_AOSP_FOR_AUDIO := false
6
7ifneq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
8USE_CUSTOM_AUDIO_POLICY := 1
9AUDIO_FEATURE_ENABLED_COMPRESS_CAPTURE := false
10AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := false
11AUDIO_FEATURE_ENABLED_DYNAMIC_ECNS := true
12AUDIO_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
16AUDIO_FEATURE_ENABLED_HDMI_SPK := true
17AUDIO_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
24AUDIO_FEATURE_ENABLED_AAC_ADTS_OFFLOAD := true
25AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
26AUDIO_FEATURE_ENABLED_SSR := true
27AUDIO_FEATURE_ENABLED_DTS_EAGLE := false
28BOARD_USES_SRS_TRUEMEDIA := false
29DTS_CODEC_M_ := false
30MM_AUDIO_ENABLED_SAFX := true
31AUDIO_FEATURE_ENABLED_HW_ACCELERATED_EFFECTS := false
32AUDIO_FEATURE_ENABLED_AUDIOSPHERE := true
33AUDIO_FEATURE_ENABLED_USB_TUNNEL_AUDIO := true
34AUDIO_FEATURE_ENABLED_SPLIT_A2DP := true
35AUDIO_FEATURE_ENABLED_3D_AUDIO := false
36DOLBY_ENABLE := false
37endif
38
39USE_XML_AUDIO_POLICY_CONF := 1
40AUDIO_FEATURE_ENABLED_DLKM := true
41BOARD_SUPPORTS_SOUND_TRIGGER := true
42AUDIO_FEATURE_ENABLED_INSTANCE_ID := true
43AUDIO_USE_LL_AS_PRIMARY_OUTPUT := true
44AUDIO_FEATURE_ENABLED_VBAT_MONITOR := true
45AUDIO_FEATURE_ENABLED_ANC_HEADSET := true
46AUDIO_FEATURE_ENABLED_CUSTOMSTEREO := true
47AUDIO_FEATURE_ENABLED_FLUENCE := true
48AUDIO_FEATURE_ENABLED_HDMI_EDID := true
49AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH := true
50#AUDIO_FEATURE_ENABLED_KEEP_ALIVE := true
51AUDIO_FEATURE_ENABLED_DISPLAY_PORT := true
52AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := false
53AUDIO_FEATURE_ENABLED_HFP := true
Aditya Bavanaridffcdef2019-01-10 14:48:11 +053054AUDIO_FEATURE_ENABLED_INCALL_MUSIC := true
Hari Veerubhotlae56a5fa2018-10-14 16:52:10 +053055AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
56AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE := true
57AUDIO_FEATURE_ENABLED_SPKR_PROTECTION := true
58AUDIO_FEATURE_ENABLED_ACDB_LICENSE := false
59AUDIO_FEATURE_ENABLED_DEV_ARBI := false
60AUDIO_FEATURE_ENABLED_DYNAMIC_LOG := true
61MM_AUDIO_ENABLED_FTM := true
62TARGET_USES_QCOM_MM_AUDIO := true
63AUDIO_FEATURE_ENABLED_SOURCE_TRACKING := true
64AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
65BOARD_SUPPORTS_QAHW := false
66AUDIO_FEATURE_ENABLED_RAS := true
67AUDIO_FEATURE_ENABLED_SND_MONITOR := true
68AUDIO_FEATURE_ENABLED_SVA_MULTI_STAGE := true
69AUDIO_FEATURE_ENABLED_BATTERY_LISTENER := true
Aditya Bavanaridffcdef2019-01-10 14:48:11 +053070AUDIO_FEATURE_ENABLED_USB_BURST_MODE := true
Hari Veerubhotlae56a5fa2018-10-14 16:52:10 +053071##AUDIO_FEATURE_FLAGS
72
73#Audio Specific device overlays
74DEVICE_PACKAGE_OVERLAYS += hardware/qcom/audio/configs/common/overlay
75
76PRODUCT_COPY_FILES += \
Aditya Bavanaridffcdef2019-01-10 14:48:11 +053077 hardware/qcom/audio/configs/trinket/audio_io_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_io_policy.conf \
Hari Veerubhotlae56a5fa2018-10-14 16:52:10 +053078 hardware/qcom/audio/configs/trinket/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf \
79 hardware/qcom/audio/configs/trinket/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
80 hardware/qcom/audio/configs/trinket/audio_tuning_mixer_tavil.txt:$(TARGET_COPY_OUT_VENDOR)/etc/audio_tuning_mixer_tavil.txt \
81 hardware/qcom/audio/configs/trinket/sound_trigger_mixer_paths_wcd9340.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_wcd9340.xml \
82 hardware/qcom/audio/configs/trinket/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml \
83 hardware/qcom/audio/configs/trinket/graphite_ipc_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/graphite_ipc_platform_info.xml \
84 hardware/qcom/audio/configs/trinket/audio_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info.xml \
85 hardware/qcom/audio/configs/trinket/audio_platform_info_qrd.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_qrd.xml \
86 hardware/qcom/audio/configs/trinket/audio_platform_info_intcodec.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_intcodec.xml \
87 hardware/qcom/audio/configs/trinket/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml \
88 hardware/qcom/audio/configs/trinket/sound_trigger_mixer_paths_qrd.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_qrd.xml \
89 hardware/qcom/audio/configs/trinket/mixer_paths_idp.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_idp.xml \
90 hardware/qcom/audio/configs/trinket/mixer_paths_qrd.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_qrd.xml \
91 hardware/qcom/audio/configs/trinket/mixer_paths_tavil.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_tavil.xml \
Aditya Bavanari7ae4a452019-01-14 14:50:42 +053092 hardware/qcom/audio/configs/trinket/mixer_paths_tasha.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_tasha.xml \
93 hardware/qcom/audio/configs/trinket/mixer_paths_tashalite.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_tashalite.xml \
Hari Veerubhotlae56a5fa2018-10-14 16:52:10 +053094
95#XML Audio configuration files
Hari Veerubhotlae56a5fa2018-10-14 16:52:10 +053096ifneq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
97PRODUCT_COPY_FILES += \
98 $(TOPDIR)hardware/qcom/audio/configs/trinket/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/audio_policy_configuration.xml
99endif
100PRODUCT_COPY_FILES += \
101 $(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
107
108# Listen configuration file
109PRODUCT_COPY_FILES += \
110 hardware/qcom/audio/configs/trinket/listen_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/listen_platform_info.xml
111
112# Reduce client buffer size for fast audio output tracks
113PRODUCT_PROPERTY_OVERRIDES += \
114 af.fast_track_multiplier=1
115
116# Low latency audio buffer size in frames
117PRODUCT_PROPERTY_OVERRIDES += \
118 vendor.audio_hal.period_size=192
119
120##fluencetype can be "fluence" or "fluencepro" or "none"
121PRODUCT_PROPERTY_OVERRIDES += \
122ro.vendor.audio.sdk.fluencetype=none\
123persist.vendor.audio.fluence.voicecall=true\
124persist.vendor.audio.fluence.voicerec=false\
125persist.vendor.audio.fluence.speaker=true
126
127#disable tunnel encoding
128PRODUCT_PROPERTY_OVERRIDES += \
129vendor.audio.tunnel.encode=false
130
131#Disable RAS Feature by default
132PRODUCT_PROPERTY_OVERRIDES += \
133persist.vendor.audio.ras.enabled=false
134
135#Buffer size in kbytes for compress offload playback
136PRODUCT_PROPERTY_OVERRIDES += \
137vendor.audio.offload.buffer.size.kb=32
138
Aditya Bavanaridffcdef2019-01-10 14:48:11 +0530139#Minimum duration for offload playback in secs
140PRODUCT_PROPERTY_OVERRIDES += \
141audio.offload.min.duration.secs=30
142
Hari Veerubhotlae56a5fa2018-10-14 16:52:10 +0530143#Enable offload audio video playback by default
144PRODUCT_PROPERTY_OVERRIDES += \
145audio.offload.video=true
146
147#Enable audio track offload by default
148PRODUCT_PROPERTY_OVERRIDES += \
149vendor.audio.offload.track.enable=true
150
151#Enable music through deep buffer
152PRODUCT_PROPERTY_OVERRIDES += \
153audio.deep_buffer.media=true
154
155#enable voice path for PCM VoIP by default
156PRODUCT_PROPERTY_OVERRIDES += \
157vendor.voice.path.for.pcm.voip=true
158
159#Enable multi channel aac through offload
160PRODUCT_PROPERTY_OVERRIDES += \
161vendor.audio.offload.multiaac.enable=true
162
163#Enable DS2, Hardbypass feature for Dolby
164PRODUCT_PROPERTY_OVERRIDES += \
165vendor.audio.dolby.ds2.enabled=false\
166vendor.audio.dolby.ds2.hardbypass=false
167
168#Disable Multiple offload sesison
169PRODUCT_PROPERTY_OVERRIDES += \
170vendor.audio.offload.multiple.enabled=false
171
172#Disable Compress passthrough playback
173PRODUCT_PROPERTY_OVERRIDES += \
174vendor.audio.offload.passthrough=false
175
176#Disable surround sound recording
177PRODUCT_PROPERTY_OVERRIDES += \
178ro.vendor.audio.sdk.ssr=false
179
180#enable dsp gapless mode by default
181PRODUCT_PROPERTY_OVERRIDES += \
182vendor.audio.offload.gapless.enabled=true
183
184#enable pbe effects
185PRODUCT_PROPERTY_OVERRIDES += \
186vendor.audio.safx.pbe.enabled=true
187
188#parser input buffer size(256kb) in byte stream mode
189PRODUCT_PROPERTY_OVERRIDES += \
190vendor.audio.parser.ip.buffer.size=262144
191
192#flac sw decoder 24 bit decode capability
193PRODUCT_PROPERTY_OVERRIDES += \
194vendor.audio.flac.sw.decoder.24bit=true
195
196#split a2dp DSP supported encoder list
197PRODUCT_PROPERTY_OVERRIDES += \
198persist.vendor.bt.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aac
199
200#enable software decoders for ALAC and APE
201PRODUCT_PROPERTY_OVERRIDES += \
202vendor.audio.use.sw.alac.decoder=true
203PRODUCT_PROPERTY_OVERRIDES += \
204vendor.audio.use.sw.ape.decoder=true
205
206#enable hw aac encoder by default
207PRODUCT_PROPERTY_OVERRIDES += \
208vendor.audio.hw.aac.encoder=true
209
210#audio becoming noisy intent broadcast delay
211PRODUCT_PROPERTY_OVERRIDES += \
212vendor.audio.noisy.broadcast.delay=600
213
214#offload pausetime out duration to 3 secs to inline with other outputs
215PRODUCT_PROPERTY_OVERRIDES += \
216vendor.audio.offload.pstimeout.secs=3
217
218#Set AudioFlinger client heap size
219PRODUCT_PROPERTY_OVERRIDES += \
220ro.af.client_heap_size_kbyte=7168
221
222#Set HAL buffer size to samples equal to 3 ms
223PRODUCT_PROPERTY_OVERRIDES += \
224vendor.audio_hal.in_period_size=144
225
226#Set HAL buffer size to 3 ms
227PRODUCT_PROPERTY_OVERRIDES += \
228vendor.audio_hal.period_multiplier=3
229
230#ADM Buffering size in ms
231PRODUCT_PROPERTY_OVERRIDES += \
232vendor.audio.adm.buffering.ms=2
233
234# for HIDL related packages
235PRODUCT_PACKAGES += \
236 android.hardware.audio@2.0-service \
237 android.hardware.audio@2.0-impl \
238 android.hardware.audio.effect@2.0-impl \
239 android.hardware.soundtrigger@2.1-impl \
240 android.hardware.audio@4.0 \
241 android.hardware.audio.common@4.0 \
242 android.hardware.audio.common@4.0-util \
243 android.hardware.audio@4.0-impl \
244 android.hardware.audio.effect@4.0 \
245 android.hardware.audio.effect@4.0-impl