blob: 0bf64c36c7401f84d313680087960557254ca1da [file] [log] [blame]
Meng Wang595b3d02018-10-08 12:55:16 +08001#BOARD_USES_GENERIC_AUDIO := true
2#
3#AUDIO_FEATURE_FLAGS
Naresh Tanniru5beb8132018-11-27 12:16:45 +05304ifeq ($(TARGET_USES_QMAA_OVERRIDE_AUDIO), false)
5ifeq ($(TARGET_USES_QMAA),true)
6AUDIO_USE_STUB_HAL := true
7endif
8endif
9
10ifneq ($(AUDIO_USE_STUB_HAL), true)
Meng Wang595b3d02018-10-08 12:55:16 +080011BOARD_USES_ALSA_AUDIO := true
12TARGET_USES_AOSP_FOR_AUDIO := false
13
14ifneq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
Banajit Goswami526079a2019-03-18 20:48:51 -070015USE_CUSTOM_AUDIO_POLICY := 1
Banajit Goswami405ad562019-03-08 17:00:34 -080016AUDIO_FEATURE_QSSI_COMPLIANCE := false
Meng Wang595b3d02018-10-08 12:55:16 +080017AUDIO_FEATURE_ENABLED_COMPRESS_CAPTURE := false
Meng Wang267816f2019-01-16 09:48:13 +080018AUDIO_FEATURE_ENABLED_COMPRESS_INPUT := true
19AUDIO_FEATURE_ENABLED_CONCURRENT_CAPTURE := true
Meng Wang595b3d02018-10-08 12:55:16 +080020AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := false
21AUDIO_FEATURE_ENABLED_DYNAMIC_ECNS := true
22AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true
23AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER := true
24AUDIO_FEATURE_ENABLED_EXTN_RESAMPLER := true
25AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true
26AUDIO_FEATURE_ENABLED_HDMI_SPK := true
27AUDIO_FEATURE_ENABLED_PCM_OFFLOAD := true
28AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24 := true
29AUDIO_FEATURE_ENABLED_FLAC_OFFLOAD := true
30AUDIO_FEATURE_ENABLED_VORBIS_OFFLOAD := true
31AUDIO_FEATURE_ENABLED_WMA_OFFLOAD := true
32AUDIO_FEATURE_ENABLED_ALAC_OFFLOAD := true
33AUDIO_FEATURE_ENABLED_APE_OFFLOAD := true
34AUDIO_FEATURE_ENABLED_AAC_ADTS_OFFLOAD := true
35AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
36AUDIO_FEATURE_ENABLED_SSR := true
37AUDIO_FEATURE_ENABLED_DTS_EAGLE := false
38BOARD_USES_SRS_TRUEMEDIA := false
39DTS_CODEC_M_ := false
40MM_AUDIO_ENABLED_SAFX := true
41AUDIO_FEATURE_ENABLED_HW_ACCELERATED_EFFECTS := false
42AUDIO_FEATURE_ENABLED_AUDIOSPHERE := true
Aalique Grahame57058a62019-01-10 10:30:17 -080043AUDIO_FEATURE_ENABLED_USB_TUNNEL := true
44AUDIO_FEATURE_ENABLED_A2DP_OFFLOAD := true
Meng Wang595b3d02018-10-08 12:55:16 +080045AUDIO_FEATURE_ENABLED_3D_AUDIO := false
Weiyin Jiang4df6c482019-03-21 10:18:21 +080046AUDIO_FEATURE_ENABLED_AHAL_EXT := true
Meng Wang595b3d02018-10-08 12:55:16 +080047DOLBY_ENABLE := false
48endif
49
Meng Wang595b3d02018-10-08 12:55:16 +080050AUDIO_FEATURE_ENABLED_DLKM := true
51BOARD_SUPPORTS_SOUND_TRIGGER := true
Meng Wangc688a062019-01-09 13:18:11 +080052BOARD_SUPPORTS_GCS := false
Meng Wang595b3d02018-10-08 12:55:16 +080053AUDIO_FEATURE_ENABLED_INSTANCE_ID := true
Aalique Grahame57058a62019-01-10 10:30:17 -080054AUDIO_USE_DEEP_AS_PRIMARY_OUTPUT := false
Meng Wang595b3d02018-10-08 12:55:16 +080055AUDIO_FEATURE_ENABLED_VBAT_MONITOR := true
56AUDIO_FEATURE_ENABLED_ANC_HEADSET := true
57AUDIO_FEATURE_ENABLED_CUSTOMSTEREO := true
58AUDIO_FEATURE_ENABLED_FLUENCE := true
59AUDIO_FEATURE_ENABLED_HDMI_EDID := true
60AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH := true
61#AUDIO_FEATURE_ENABLED_KEEP_ALIVE := true
62AUDIO_FEATURE_ENABLED_DISPLAY_PORT := true
63AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := false
64AUDIO_FEATURE_ENABLED_HFP := true
65AUDIO_FEATURE_ENABLED_INCALL_MUSIC := true
66AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
67AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE := true
68AUDIO_FEATURE_ENABLED_SPKR_PROTECTION := true
69AUDIO_FEATURE_ENABLED_ACDB_LICENSE := false
70AUDIO_FEATURE_ENABLED_DEV_ARBI := false
71AUDIO_FEATURE_ENABLED_DYNAMIC_LOG := true
72MM_AUDIO_ENABLED_FTM := true
73TARGET_USES_QCOM_MM_AUDIO := true
74AUDIO_FEATURE_ENABLED_SOURCE_TRACKING := true
75AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
76BOARD_SUPPORTS_QAHW := false
77AUDIO_FEATURE_ENABLED_RAS := true
78AUDIO_FEATURE_ENABLED_SND_MONITOR := true
Meng Wang267816f2019-01-16 09:48:13 +080079AUDIO_FEATURE_ENABLED_USB_BURST_MODE := true
Meng Wang595b3d02018-10-08 12:55:16 +080080AUDIO_FEATURE_ENABLED_SVA_MULTI_STAGE := true
81AUDIO_FEATURE_ENABLED_BATTERY_LISTENER := true
82##AUDIO_FEATURE_FLAGS
83
shoudilb5e44a62019-02-27 10:16:07 +080084ifneq ($(strip $(TARGET_USES_RRO)), true)
Meng Wang595b3d02018-10-08 12:55:16 +080085#Audio Specific device overlays
Aalique Grahame57058a62019-01-10 10:30:17 -080086DEVICE_PACKAGE_OVERLAYS += vendor/qcom/opensource/audio-hal/primary-hal/configs/common/overlay
shoudilb5e44a62019-02-27 10:16:07 +080087endif
Meng Wang595b3d02018-10-08 12:55:16 +080088
89PRODUCT_COPY_FILES += \
Aalique Grahame57058a62019-01-10 10:30:17 -080090 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/audio_io_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_io_policy.conf \
91 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf \
92 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
93 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml \
94 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/audio_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info.xml \
95 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/audio_platform_info_qrd.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_qrd.xml \
96 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/audio_platform_info_intcodec.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_intcodec.xml \
97 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml \
98 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/sound_trigger_mixer_paths_qrd.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_qrd.xml \
Karthikeyan Mani882fb712019-03-12 13:09:33 -070099 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \
Aalique Grahame57058a62019-01-10 10:30:17 -0800100 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/mixer_paths_qrd.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_qrd.xml \
Arun Mirpuria4a3b142019-04-02 17:38:11 -0700101 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/audio_configs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_configs.xml \
102 frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml
Meng Wang595b3d02018-10-08 12:55:16 +0800103
104#XML Audio configuration files
105ifneq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
106PRODUCT_COPY_FILES += \
Aalique Grahame57058a62019-01-10 10:30:17 -0800107 $(TOPDIR)vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/audio_policy_configuration.xml
Meng Wang595b3d02018-10-08 12:55:16 +0800108endif
109PRODUCT_COPY_FILES += \
Aalique Grahame57058a62019-01-10 10:30:17 -0800110 $(TOPDIR)vendor/qcom/opensource/audio-hal/primary-hal/configs/common/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
Meng Wang595b3d02018-10-08 12:55:16 +0800111 $(TOPDIR)frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
112 $(TOPDIR)frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
113 $(TOPDIR)frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
114 $(TOPDIR)frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
115 $(TOPDIR)frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml
116
117# Reduce client buffer size for fast audio output tracks
118PRODUCT_PROPERTY_OVERRIDES += \
119 af.fast_track_multiplier=1
120
121# Low latency audio buffer size in frames
122PRODUCT_PROPERTY_OVERRIDES += \
123 vendor.audio_hal.period_size=192
124
125##fluencetype can be "fluence" or "fluencepro" or "none"
126PRODUCT_PROPERTY_OVERRIDES += \
127ro.vendor.audio.sdk.fluencetype=none\
128persist.vendor.audio.fluence.voicecall=true\
129persist.vendor.audio.fluence.voicerec=false\
Meng Wang267816f2019-01-16 09:48:13 +0800130persist.vendor.audio.fluence.speaker=true\
131persist.vendor.audio.fluence.tmic.enabled=false
Meng Wang595b3d02018-10-08 12:55:16 +0800132
133#disable tunnel encoding
134PRODUCT_PROPERTY_OVERRIDES += \
135vendor.audio.tunnel.encode=false
136
137#Disable RAS Feature by default
138PRODUCT_PROPERTY_OVERRIDES += \
139persist.vendor.audio.ras.enabled=false
140
141#Buffer size in kbytes for compress offload playback
142PRODUCT_PROPERTY_OVERRIDES += \
143vendor.audio.offload.buffer.size.kb=32
144
145#Enable offload audio video playback by default
146PRODUCT_PROPERTY_OVERRIDES += \
147audio.offload.video=true
148
149#Enable audio track offload by default
150PRODUCT_PROPERTY_OVERRIDES += \
151vendor.audio.offload.track.enable=true
152
153#Enable music through deep buffer
154PRODUCT_PROPERTY_OVERRIDES += \
155audio.deep_buffer.media=true
156
157#enable voice path for PCM VoIP by default
158PRODUCT_PROPERTY_OVERRIDES += \
159vendor.voice.path.for.pcm.voip=true
160
161#Enable multi channel aac through offload
162PRODUCT_PROPERTY_OVERRIDES += \
163vendor.audio.offload.multiaac.enable=true
164
165#Enable DS2, Hardbypass feature for Dolby
166PRODUCT_PROPERTY_OVERRIDES += \
167vendor.audio.dolby.ds2.enabled=false\
168vendor.audio.dolby.ds2.hardbypass=false
169
170#Disable Multiple offload sesison
171PRODUCT_PROPERTY_OVERRIDES += \
172vendor.audio.offload.multiple.enabled=false
173
174#Disable Compress passthrough playback
175PRODUCT_PROPERTY_OVERRIDES += \
176vendor.audio.offload.passthrough=false
177
178#Disable surround sound recording
179PRODUCT_PROPERTY_OVERRIDES += \
180ro.vendor.audio.sdk.ssr=false
181
182#enable dsp gapless mode by default
183PRODUCT_PROPERTY_OVERRIDES += \
184vendor.audio.offload.gapless.enabled=true
185
186#enable pbe effects
187PRODUCT_PROPERTY_OVERRIDES += \
188vendor.audio.safx.pbe.enabled=true
189
190#parser input buffer size(256kb) in byte stream mode
191PRODUCT_PROPERTY_OVERRIDES += \
192vendor.audio.parser.ip.buffer.size=262144
193
194#flac sw decoder 24 bit decode capability
195PRODUCT_PROPERTY_OVERRIDES += \
196vendor.audio.flac.sw.decoder.24bit=true
197
198#split a2dp DSP supported encoder list
199PRODUCT_PROPERTY_OVERRIDES += \
Meng Wang267816f2019-01-16 09:48:13 +0800200persist.vendor.bt.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aac-ldac
Meng Wang595b3d02018-10-08 12:55:16 +0800201
Aalique Grahame57058a62019-01-10 10:30:17 -0800202# A2DP offload support
203PRODUCT_PROPERTY_OVERRIDES += \
204ro.bluetooth.a2dp_offload.supported=true
205
206# Disable A2DP offload
207PRODUCT_PROPERTY_OVERRIDES += \
208persist.bluetooth.a2dp_offload.disabled=false
209
210# A2DP offload DSP supported encoder list
211PRODUCT_PROPERTY_OVERRIDES += \
212persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac
213
Meng Wang595b3d02018-10-08 12:55:16 +0800214#enable software decoders for ALAC and APE
215PRODUCT_PROPERTY_OVERRIDES += \
216vendor.audio.use.sw.alac.decoder=true
217PRODUCT_PROPERTY_OVERRIDES += \
218vendor.audio.use.sw.ape.decoder=true
219
220#enable hw aac encoder by default
221PRODUCT_PROPERTY_OVERRIDES += \
222vendor.audio.hw.aac.encoder=true
223
224#audio becoming noisy intent broadcast delay
225PRODUCT_PROPERTY_OVERRIDES += \
226vendor.audio.noisy.broadcast.delay=600
227
228#offload pausetime out duration to 3 secs to inline with other outputs
229PRODUCT_PROPERTY_OVERRIDES += \
230vendor.audio.offload.pstimeout.secs=3
231
232#Set AudioFlinger client heap size
233PRODUCT_PROPERTY_OVERRIDES += \
234ro.af.client_heap_size_kbyte=7168
235
236#Set HAL buffer size to samples equal to 3 ms
237PRODUCT_PROPERTY_OVERRIDES += \
238vendor.audio_hal.in_period_size=144
239
240#Set HAL buffer size to 3 ms
241PRODUCT_PROPERTY_OVERRIDES += \
242vendor.audio_hal.period_multiplier=3
243
244#ADM Buffering size in ms
245PRODUCT_PROPERTY_OVERRIDES += \
246vendor.audio.adm.buffering.ms=2
247
Aalique Grahame57058a62019-01-10 10:30:17 -0800248#enable headset calibration
249PRODUCT_PROPERTY_OVERRIDES += \
250audio.volume.headset.gain.depcal=true
251
252#enable dualmic fluence for voice communication
253PRODUCT_PROPERTY_OVERRIDES += \
254persist.audio.fluence.voicecomm=true
Naresh Tanniru5beb8132018-11-27 12:16:45 +0530255endif
Aalique Grahame57058a62019-01-10 10:30:17 -0800256
Meng Wangb2ab1862019-02-13 08:27:19 +0800257USE_XML_AUDIO_POLICY_CONF := 1
258
Meng Wang267816f2019-01-16 09:48:13 +0800259#enable keytone FR
260PRODUCT_PROPERTY_OVERRIDES += \
261vendor.audio.hal.output.suspend.supported=true
262
263#enable mirror-link feature
264PRODUCT_PROPERTY_OVERRIDES += \
Aalique Grahame88d69c62019-03-18 14:08:27 -0700265vendor.audio.enable.mirrorlink=true
Meng Wang267816f2019-01-16 09:48:13 +0800266
267#enable voicecall speaker stereo
268PRODUCT_PROPERTY_OVERRIDES += \
269persist.vendor.audio.voicecall.speaker.stereo=true
270
271#enable AAC frame ctl for A2DP sinks
272PRODUCT_PROPERTY_OVERRIDES += \
273persist.vendor.bt.aac_frm_ctl.enabled=true
274
Meng Wang595b3d02018-10-08 12:55:16 +0800275# for HIDL related packages
276PRODUCT_PACKAGES += \
277 android.hardware.audio@2.0-service \
278 android.hardware.audio@2.0-impl \
279 android.hardware.audio.effect@2.0-impl \
280 android.hardware.soundtrigger@2.1-impl \
281 android.hardware.audio@4.0 \
282 android.hardware.audio.common@4.0 \
283 android.hardware.audio.common@4.0-util \
284 android.hardware.audio@4.0-impl \
285 android.hardware.audio.effect@4.0 \
Weiyin Jiang239190c2019-02-26 11:51:34 +0800286 android.hardware.audio.effect@4.0-impl \
287 vendor.qti.hardware.audiohalext@1.0 \
288 vendor.qti.hardware.audiohalext@1.0-impl \
289 vendor.qti.hardware.audiohalext-utils
Samyak Jain6df8ce82019-03-22 14:26:24 +0530290
291PRODUCT_PACKAGES_ENG += \
292 VoicePrintTest \
293 VoicePrintDemo
294
295PRODUCT_PACKAGES_DEBUG += \
296 AudioSettings