blob: d4443006e2a00bad34c7be427f8fff7d65e71645 [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)
15USE_CUSTOM_AUDIO_POLICY := 1
16AUDIO_FEATURE_ENABLED_COMPRESS_CAPTURE := false
17AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := false
18AUDIO_FEATURE_ENABLED_DYNAMIC_ECNS := true
19AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true
20AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER := true
21AUDIO_FEATURE_ENABLED_EXTN_RESAMPLER := true
22AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true
23AUDIO_FEATURE_ENABLED_HDMI_SPK := true
24AUDIO_FEATURE_ENABLED_PCM_OFFLOAD := true
25AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24 := true
26AUDIO_FEATURE_ENABLED_FLAC_OFFLOAD := true
27AUDIO_FEATURE_ENABLED_VORBIS_OFFLOAD := true
28AUDIO_FEATURE_ENABLED_WMA_OFFLOAD := true
29AUDIO_FEATURE_ENABLED_ALAC_OFFLOAD := true
30AUDIO_FEATURE_ENABLED_APE_OFFLOAD := true
31AUDIO_FEATURE_ENABLED_AAC_ADTS_OFFLOAD := true
32AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
33AUDIO_FEATURE_ENABLED_SSR := true
34AUDIO_FEATURE_ENABLED_DTS_EAGLE := false
35BOARD_USES_SRS_TRUEMEDIA := false
36DTS_CODEC_M_ := false
37MM_AUDIO_ENABLED_SAFX := true
38AUDIO_FEATURE_ENABLED_HW_ACCELERATED_EFFECTS := false
39AUDIO_FEATURE_ENABLED_AUDIOSPHERE := true
Aalique Grahame57058a62019-01-10 10:30:17 -080040AUDIO_FEATURE_ENABLED_USB_TUNNEL := true
41AUDIO_FEATURE_ENABLED_A2DP_OFFLOAD := true
Meng Wang595b3d02018-10-08 12:55:16 +080042AUDIO_FEATURE_ENABLED_3D_AUDIO := false
43DOLBY_ENABLE := false
44endif
45
46USE_XML_AUDIO_POLICY_CONF := 1
47AUDIO_FEATURE_ENABLED_DLKM := true
48BOARD_SUPPORTS_SOUND_TRIGGER := true
Meng Wangc688a062019-01-09 13:18:11 +080049BOARD_SUPPORTS_GCS := false
Meng Wang595b3d02018-10-08 12:55:16 +080050AUDIO_FEATURE_ENABLED_INSTANCE_ID := true
Aalique Grahame57058a62019-01-10 10:30:17 -080051AUDIO_USE_DEEP_AS_PRIMARY_OUTPUT := false
Meng Wang595b3d02018-10-08 12:55:16 +080052AUDIO_FEATURE_ENABLED_VBAT_MONITOR := true
53AUDIO_FEATURE_ENABLED_ANC_HEADSET := true
54AUDIO_FEATURE_ENABLED_CUSTOMSTEREO := true
55AUDIO_FEATURE_ENABLED_FLUENCE := true
56AUDIO_FEATURE_ENABLED_HDMI_EDID := true
57AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH := true
58#AUDIO_FEATURE_ENABLED_KEEP_ALIVE := true
59AUDIO_FEATURE_ENABLED_DISPLAY_PORT := true
60AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := false
61AUDIO_FEATURE_ENABLED_HFP := true
62AUDIO_FEATURE_ENABLED_INCALL_MUSIC := true
63AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
64AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE := true
65AUDIO_FEATURE_ENABLED_SPKR_PROTECTION := true
66AUDIO_FEATURE_ENABLED_ACDB_LICENSE := false
67AUDIO_FEATURE_ENABLED_DEV_ARBI := false
68AUDIO_FEATURE_ENABLED_DYNAMIC_LOG := true
69MM_AUDIO_ENABLED_FTM := true
70TARGET_USES_QCOM_MM_AUDIO := true
71AUDIO_FEATURE_ENABLED_SOURCE_TRACKING := true
72AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
73BOARD_SUPPORTS_QAHW := false
74AUDIO_FEATURE_ENABLED_RAS := true
75AUDIO_FEATURE_ENABLED_SND_MONITOR := true
76AUDIO_FEATURE_ENABLED_SVA_MULTI_STAGE := true
77AUDIO_FEATURE_ENABLED_BATTERY_LISTENER := true
78##AUDIO_FEATURE_FLAGS
79
shoudilb5e44a62019-02-27 10:16:07 +080080ifneq ($(strip $(TARGET_USES_RRO)), true)
Meng Wang595b3d02018-10-08 12:55:16 +080081#Audio Specific device overlays
Aalique Grahame57058a62019-01-10 10:30:17 -080082DEVICE_PACKAGE_OVERLAYS += vendor/qcom/opensource/audio-hal/primary-hal/configs/common/overlay
shoudilb5e44a62019-02-27 10:16:07 +080083endif
Meng Wang595b3d02018-10-08 12:55:16 +080084
85PRODUCT_COPY_FILES += \
Aalique Grahame57058a62019-01-10 10:30:17 -080086 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/audio_io_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_io_policy.conf \
87 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf \
88 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
89 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml \
90 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/audio_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info.xml \
91 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/audio_platform_info_qrd.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_qrd.xml \
92 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/audio_platform_info_intcodec.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_intcodec.xml \
93 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml \
94 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 \
95 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/mixer_paths_mtp.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_mtp.xml \
96 vendor/qcom/opensource/audio-hal/primary-hal/configs/kona/mixer_paths_qrd.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_qrd.xml \
Meng Wang595b3d02018-10-08 12:55:16 +080097
98#XML Audio configuration files
99ifneq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
100PRODUCT_COPY_FILES += \
Aalique Grahame57058a62019-01-10 10:30:17 -0800101 $(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 +0800102endif
103PRODUCT_COPY_FILES += \
Aalique Grahame57058a62019-01-10 10:30:17 -0800104 $(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 +0800105 $(TOPDIR)frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
106 $(TOPDIR)frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
107 $(TOPDIR)frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
108 $(TOPDIR)frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
109 $(TOPDIR)frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml
110
111# Reduce client buffer size for fast audio output tracks
112PRODUCT_PROPERTY_OVERRIDES += \
113 af.fast_track_multiplier=1
114
115# Low latency audio buffer size in frames
116PRODUCT_PROPERTY_OVERRIDES += \
117 vendor.audio_hal.period_size=192
118
119##fluencetype can be "fluence" or "fluencepro" or "none"
120PRODUCT_PROPERTY_OVERRIDES += \
121ro.vendor.audio.sdk.fluencetype=none\
122persist.vendor.audio.fluence.voicecall=true\
123persist.vendor.audio.fluence.voicerec=false\
124persist.vendor.audio.fluence.speaker=true
125
126#disable tunnel encoding
127PRODUCT_PROPERTY_OVERRIDES += \
128vendor.audio.tunnel.encode=false
129
130#Disable RAS Feature by default
131PRODUCT_PROPERTY_OVERRIDES += \
132persist.vendor.audio.ras.enabled=false
133
134#Buffer size in kbytes for compress offload playback
135PRODUCT_PROPERTY_OVERRIDES += \
136vendor.audio.offload.buffer.size.kb=32
137
138#Enable offload audio video playback by default
139PRODUCT_PROPERTY_OVERRIDES += \
140audio.offload.video=true
141
142#Enable audio track offload by default
143PRODUCT_PROPERTY_OVERRIDES += \
144vendor.audio.offload.track.enable=true
145
146#Enable music through deep buffer
147PRODUCT_PROPERTY_OVERRIDES += \
148audio.deep_buffer.media=true
149
150#enable voice path for PCM VoIP by default
151PRODUCT_PROPERTY_OVERRIDES += \
152vendor.voice.path.for.pcm.voip=true
153
154#Enable multi channel aac through offload
155PRODUCT_PROPERTY_OVERRIDES += \
156vendor.audio.offload.multiaac.enable=true
157
158#Enable DS2, Hardbypass feature for Dolby
159PRODUCT_PROPERTY_OVERRIDES += \
160vendor.audio.dolby.ds2.enabled=false\
161vendor.audio.dolby.ds2.hardbypass=false
162
163#Disable Multiple offload sesison
164PRODUCT_PROPERTY_OVERRIDES += \
165vendor.audio.offload.multiple.enabled=false
166
167#Disable Compress passthrough playback
168PRODUCT_PROPERTY_OVERRIDES += \
169vendor.audio.offload.passthrough=false
170
171#Disable surround sound recording
172PRODUCT_PROPERTY_OVERRIDES += \
173ro.vendor.audio.sdk.ssr=false
174
175#enable dsp gapless mode by default
176PRODUCT_PROPERTY_OVERRIDES += \
177vendor.audio.offload.gapless.enabled=true
178
179#enable pbe effects
180PRODUCT_PROPERTY_OVERRIDES += \
181vendor.audio.safx.pbe.enabled=true
182
183#parser input buffer size(256kb) in byte stream mode
184PRODUCT_PROPERTY_OVERRIDES += \
185vendor.audio.parser.ip.buffer.size=262144
186
187#flac sw decoder 24 bit decode capability
188PRODUCT_PROPERTY_OVERRIDES += \
189vendor.audio.flac.sw.decoder.24bit=true
190
191#split a2dp DSP supported encoder list
192PRODUCT_PROPERTY_OVERRIDES += \
193persist.vendor.bt.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aac
194
Aalique Grahame57058a62019-01-10 10:30:17 -0800195# A2DP offload support
196PRODUCT_PROPERTY_OVERRIDES += \
197ro.bluetooth.a2dp_offload.supported=true
198
199# Disable A2DP offload
200PRODUCT_PROPERTY_OVERRIDES += \
201persist.bluetooth.a2dp_offload.disabled=false
202
203# A2DP offload DSP supported encoder list
204PRODUCT_PROPERTY_OVERRIDES += \
205persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac
206
Meng Wang595b3d02018-10-08 12:55:16 +0800207#enable software decoders for ALAC and APE
208PRODUCT_PROPERTY_OVERRIDES += \
209vendor.audio.use.sw.alac.decoder=true
210PRODUCT_PROPERTY_OVERRIDES += \
211vendor.audio.use.sw.ape.decoder=true
212
213#enable hw aac encoder by default
214PRODUCT_PROPERTY_OVERRIDES += \
215vendor.audio.hw.aac.encoder=true
216
217#audio becoming noisy intent broadcast delay
218PRODUCT_PROPERTY_OVERRIDES += \
219vendor.audio.noisy.broadcast.delay=600
220
221#offload pausetime out duration to 3 secs to inline with other outputs
222PRODUCT_PROPERTY_OVERRIDES += \
223vendor.audio.offload.pstimeout.secs=3
224
225#Set AudioFlinger client heap size
226PRODUCT_PROPERTY_OVERRIDES += \
227ro.af.client_heap_size_kbyte=7168
228
229#Set HAL buffer size to samples equal to 3 ms
230PRODUCT_PROPERTY_OVERRIDES += \
231vendor.audio_hal.in_period_size=144
232
233#Set HAL buffer size to 3 ms
234PRODUCT_PROPERTY_OVERRIDES += \
235vendor.audio_hal.period_multiplier=3
236
237#ADM Buffering size in ms
238PRODUCT_PROPERTY_OVERRIDES += \
239vendor.audio.adm.buffering.ms=2
240
Aalique Grahame57058a62019-01-10 10:30:17 -0800241#enable headset calibration
242PRODUCT_PROPERTY_OVERRIDES += \
243audio.volume.headset.gain.depcal=true
244
245#enable dualmic fluence for voice communication
246PRODUCT_PROPERTY_OVERRIDES += \
247persist.audio.fluence.voicecomm=true
Naresh Tanniru5beb8132018-11-27 12:16:45 +0530248endif
Aalique Grahame57058a62019-01-10 10:30:17 -0800249
Meng Wang595b3d02018-10-08 12:55:16 +0800250# for HIDL related packages
251PRODUCT_PACKAGES += \
252 android.hardware.audio@2.0-service \
253 android.hardware.audio@2.0-impl \
254 android.hardware.audio.effect@2.0-impl \
255 android.hardware.soundtrigger@2.1-impl \
256 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