blob: 33eccb55f30714347905d997e5c0907d660c42ed [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
25AUDIO_FEATURE_ENABLED_SSR := true
26AUDIO_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 Jiang4aa38402017-07-10 18:54:07 +080034AUDIO_FEATURE_ENABLED_3D_AUDIO := true
Dhananjay Kumar29b894e2017-04-05 02:41:14 +053035DOLBY_ENABLE := false
Xiaoyu Ye4322f152017-03-17 12:34:03 -070036endif
37
38USE_XML_AUDIO_POLICY_CONF := 1
39BOARD_SUPPORTS_SOUND_TRIGGER := true
40AUDIO_USE_LL_AS_PRIMARY_OUTPUT := true
41AUDIO_FEATURE_ENABLED_VBAT_MONITOR := true
42AUDIO_FEATURE_ENABLED_ANC_HEADSET := true
43AUDIO_FEATURE_ENABLED_CUSTOMSTEREO := true
44AUDIO_FEATURE_ENABLED_FLUENCE := true
45AUDIO_FEATURE_ENABLED_HDMI_EDID := true
46AUDIO_FEATURE_ENABLED_HDMI_PASSTHROUGH := true
47#AUDIO_FEATURE_ENABLED_KEEP_ALIVE := true
48AUDIO_FEATURE_ENABLED_DISPLAY_PORT := true
Aalique Grahame28395ec2017-05-18 11:12:23 -070049AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := false
Xiaoyu Ye4322f152017-03-17 12:34:03 -070050AUDIO_FEATURE_ENABLED_HFP := true
51AUDIO_FEATURE_ENABLED_INCALL_MUSIC := false
52AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
53AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE := true
54AUDIO_FEATURE_ENABLED_SPKR_PROTECTION := true
Aalique Grahame28395ec2017-05-18 11:12:23 -070055AUDIO_FEATURE_ENABLED_ACDB_LICENSE := false
Xiaoyu Ye4322f152017-03-17 12:34:03 -070056AUDIO_FEATURE_ENABLED_DEV_ARBI := false
57MM_AUDIO_ENABLED_FTM := true
58TARGET_USES_QCOM_MM_AUDIO := true
59AUDIO_FEATURE_ENABLED_SOURCE_TRACKING := true
60AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
Aalique Grahame190cfcb2017-04-21 11:54:14 -070061BOARD_SUPPORTS_QAHW := false
Xiaoyu Ye4322f152017-03-17 12:34:03 -070062AUDIO_FEATURE_ENABLED_RAS := true
Dhananjay Kumare6293dd2017-05-25 17:25:30 +053063AUDIO_FEATURE_ENABLED_SND_MONITOR := true
Xiaoyu Ye4322f152017-03-17 12:34:03 -070064##AUDIO_FEATURE_FLAGS
65
66#Audio Specific device overlays
67DEVICE_PACKAGE_OVERLAYS += hardware/qcom/audio/configs/common/overlay
68
69# Audio configuration file
Aalique Grahame190cfcb2017-04-21 11:54:14 -070070ifeq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
Xiaoyu Ye4322f152017-03-17 12:34:03 -070071PRODUCT_COPY_FILES += \
72 device/qcom/common/media/audio_policy.conf:system/etc/audio_policy.conf
73else
74PRODUCT_COPY_FILES += \
Soumild9f5bfa2017-04-04 19:31:22 -070075 hardware/qcom/audio/configs/sdm845/audio_policy.conf:system/etc/audio_policy.conf
Xiaoyu Ye4322f152017-03-17 12:34:03 -070076endif
77
78PRODUCT_COPY_FILES += \
Aalique Grahame190cfcb2017-04-21 11:54:14 -070079 hardware/qcom/audio/configs/sdm845/audio_output_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_output_policy.conf \
80 hardware/qcom/audio/configs/sdm845/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf \
Naresh Tanniru10758b62017-06-05 21:05:53 +053081 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 -070082 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 +080083 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 +053084 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 -070085 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 +053086 hardware/qcom/audio/configs/sdm845/audio_platform_info_i2s.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_i2s.xml \
87 hardware/qcom/audio/configs/sdm845/sound_trigger_mixer_paths_wcd9340.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths_wcd9340.xml \
88 hardware/qcom/audio/configs/sdm845/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml \
89 hardware/qcom/audio/configs/sdm845/graphite_ipc_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/graphite_ipc_platform_info.xml \
90 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 -070091
92#XML Audio configuration files
93ifeq ($(USE_XML_AUDIO_POLICY_CONF), 1)
Dhananjay Kumaraeb58fd2017-07-14 22:45:34 +053094ifneq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
Xiaoyu Ye4322f152017-03-17 12:34:03 -070095PRODUCT_COPY_FILES += \
Dhananjay Kumaraeb58fd2017-07-14 22:45:34 +053096 $(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 -070097endif
98PRODUCT_COPY_FILES += \
Dhananjay Kumaraeb58fd2017-07-14 22:45:34 +053099 $(TOPDIR)hardware/qcom/audio/configs/common/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
100 $(TOPDIR)frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
101 $(TOPDIR)frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
102 $(TOPDIR)frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
103 $(TOPDIR)frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
104 $(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 -0700105endif
106
107# Listen configuration file
108PRODUCT_COPY_FILES += \
Naresh Tanniru10758b62017-06-05 21:05:53 +0530109 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 -0700110
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 += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700117 vendor.audio_hal.period_size=192
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700118
119##fluencetype can be "fluence" or "fluencepro" or "none"
120PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700121ro.vendor.audio.sdk.fluencetype=none\
122persist.vendor.audio.fluence.voicecall=true\
123persist.vendor.audio.fluence.voicerec=false\
124persist.vendor.audio.fluence.speaker=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700125
126#disable tunnel encoding
127PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700128vendor.audio.tunnel.encode=false
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700129
130#Disable RAS Feature by default
131PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700132persist.vendor.audio.ras.enabled=false
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700133
134#Buffer size in kbytes for compress offload playback
135PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700136vendor.audio.offload.buffer.size.kb=32
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700137
138#Enable offload audio video playback by default
139PRODUCT_PROPERTY_OVERRIDES += \
140audio.offload.video=true
141
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700142#Enable audio track offload by default
143PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700144vendor.audio.offload.track.enable=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700145
146#Enable music through deep buffer
147PRODUCT_PROPERTY_OVERRIDES += \
148audio.deep_buffer.media=true
149
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700150#enable voice path for PCM VoIP by default
151PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700152vendor.voice.path.for.pcm.voip=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700153
154#Enable multi channel aac through offload
155PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700156vendor.audio.offload.multiaac.enable=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700157
158#Enable DS2, Hardbypass feature for Dolby
159PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700160vendor.audio.dolby.ds2.enabled=false\
161vendor.audio.dolby.ds2.hardbypass=false
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700162
163#Disable Multiple offload sesison
164PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700165vendor.audio.offload.multiple.enabled=false
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700166
167#Disable Compress passthrough playback
168PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700169vendor.audio.offload.passthrough=false
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700170
171#Disable surround sound recording
172PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700173ro.vendor.audio.sdk.ssr=false
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700174
175#enable dsp gapless mode by default
176PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700177vendor.audio.offload.gapless.enabled=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700178
179#enable pbe effects
180PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700181vendor.audio.safx.pbe.enabled=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700182
183#parser input buffer size(256kb) in byte stream mode
184PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700185vendor.audio.parser.ip.buffer.size=262144
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700186
187#flac sw decoder 24 bit decode capability
188PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700189vendor.audio.flac.sw.decoder.24bit=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700190
191#split a2dp DSP supported encoder list
192PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700193persist.vendor.bt.a2dp_offload_cap=sbc-aptx-aptxhd-aac
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700194
195#enable software decoders for ALAC and APE
196PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700197vendor.audio.use.sw.alac.decoder=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700198PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700199vendor.audio.use.sw.ape.decoder=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700200
201#enable hw aac encoder by default
202PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700203vendor.audio.hw.aac.encoder=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700204
205#Disable FM a2dp concurrency
206PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700207vendor.fm.a2dp.conc.disabled=true
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700208
209#audio becoming noisy intent broadcast delay
210PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700211vendor.audio.noisy.broadcast.delay=600
Xiaoyu Ye4322f152017-03-17 12:34:03 -0700212
213#offload pausetime out duration to 3 secs to inline with other outputs
214PRODUCT_PROPERTY_OVERRIDES += \
Aniket Kumar Latae1fcd932017-04-25 11:19:00 -0700215vendor.audio.offload.pstimeout.secs=3
Aalique Grahame190cfcb2017-04-21 11:54:14 -0700216
Satya Krishna Pindiproli650ea152017-09-13 17:10:38 +0530217#Set AudioFlinger client heap size
218PRODUCT_PROPERTY_OVERRIDES += \
219ro.af.client_heap_size_kbyte=7168
220
Aalique Grahame190cfcb2017-04-21 11:54:14 -0700221# for HIDL related packages
222PRODUCT_PACKAGES += \
223 android.hardware.audio@2.0-service \
224 android.hardware.audio@2.0-impl \
225 android.hardware.audio.effect@2.0-impl \
226 android.hardware.soundtrigger@2.0-impl