Merge "hal: fix hal build error for LE platform"
diff --git a/configs/audio_vendor_product.mk b/configs/audio_vendor_product.mk
new file mode 100644
index 0000000..569ed66
--- /dev/null
+++ b/configs/audio_vendor_product.mk
@@ -0,0 +1,173 @@
+#MM_AUDIO product packages
+MM_AUDIO += audiod
+MM_AUDIO += libacdbloader
+MM_AUDIO += libalsautils
+MM_AUDIO += libaudcal
+MM_AUDIO += libaudioalsa
+MM_AUDIO += libaudioparsers
+MM_AUDIO += libaudioconfigstore
+MM_AUDIO += libcsd-client
+MM_AUDIO += lib_iec_60958_61937
+MM_AUDIO += libmm-audio-resampler
+MM_AUDIO += libstagefright_soft_qtiflacdec
+MM_AUDIO += QCAudioManager
+MM_AUDIO += liblistensoundmodel
+MM_AUDIO += liblistensoundmodel2
+MM_AUDIO += liblsmclient
+MM_AUDIO += libcapiv2svacnn
+MM_AUDIO += libcapiv2vop
+MM_AUDIO += libcapiv2svarnn
+MM_AUDIO += liblisten
+MM_AUDIO += liblistenhardware
+MM_AUDIO += STApp
+MM_AUDIO += libqtigef
+MM_AUDIO += libqcbassboost
+MM_AUDIO += libqcvirt
+MM_AUDIO += libqcreverb
+MM_AUDIO += libasphere
+MM_AUDIO += audio_effects.conf
+MM_AUDIO += ftm_test_config
+MM_AUDIO += libFlacSwDec
+MM_AUDIO += libAlacSwDec
+MM_AUDIO += libApeSwDec
+MM_AUDIO += libMpeghSwEnc
+MM_AUDIO += libdsd2pcm
+MM_AUDIO += audioflacapp
+MM_AUDIO += libqct_resampler
+MM_AUDIO += libaudiodevarb
+MM_AUDIO += audiod
+MM_AUDIO += libsmwrapper
+MM_AUDIO += libadpcmdec
+MM_AUDIO += libmulawdec
+MM_AUDIO += sound_trigger.primary.$(TARGET_BOARD_PLATFORM)
+MM_AUDIO += sound_trigger_test
+MM_AUDIO += libhwdaphal
+MM_AUDIO += libqcomvisualizer
+MM_AUDIO += libqcomvoiceprocessing
+MM_AUDIO += libqcompostprocbundle
+MM_AUDIO += libqvop-service
+MM_AUDIO += libqvop-algo-jni.qti
+MM_AUDIO += qvop-daemon
+MM_AUDIO += VoicePrintSDK
+MM_AUDIO += libadm
+MM_AUDIO += libsurround_3mic_proc
+MM_AUDIO += surround_sound_rec_AZ.cfg
+MM_AUDIO += surround_sound_rec_5.1.cfg
+MM_AUDIO += libdrc
+MM_AUDIO += drc_cfg_AZ.txt
+MM_AUDIO += drc_cfg_5.1.txt
+MM_AUDIO += libgcs-osal
+MM_AUDIO += libgcs-calwrapper
+MM_AUDIO += libgcs-ipc
+MM_AUDIO += libgcs
+MM_AUDIO += noisesample.bin
+MM_AUDIO += antispoofing.bin
+MM_AUDIO += libshoebox
+MM_AUDIO += libdolby_ms12_wrapper
+MM_AUDIO += silence.ac3
+MM_AUDIO += libaudio_ip_handler
+MM_AUDIO += libsndmonitor
+MM_AUDIO += libcomprcapture
+MM_AUDIO += libssrec
+MM_AUDIO += libhdmiedid
+MM_AUDIO += libspkrprot
+MM_AUDIO += libcirrusspkrprot
+MM_AUDIO += liba2dpoffload
+MM_AUDIO += libexthwplugin
+MM_AUDIO += libhfp
+MM_AUDIO += libhdmipassthru
+MM_AUDIO += libbatterylistener
+MM_AUDIO += libhwdepcal
+MM_AUDIO += libmediaplayerservice
+MM_AUDIO += libaudiohal_deathhandler
+MM_AUDIO += libstagefright_httplive
+MM_AUDIO += libautohal
+ifeq ($(TARGET_BOARD_AUTO),true)
+MM_AUDIO += adsp_avs_config.acdb
+MM_AUDIO += Bluetooth_cal.acdb
+MM_AUDIO += Codec_cal.acdb
+MM_AUDIO += General_cal.acdb
+MM_AUDIO += Global_cal.acdb
+MM_AUDIO += Handset_cal.acdb
+MM_AUDIO += Hdmi_cal.acdb
+MM_AUDIO += Headset_cal.acdb
+MM_AUDIO += Speaker_cal.acdb
+
+MM_AUDIO += libaudiohalplugin
+MM_AUDIO += libcdcdriver
+MM_AUDIO += libvad
+MM_AUDIO += capi_v2_bmt
+MM_AUDIO += capi_v2_fnb
+MM_AUDIO += capi_v2_loud
+MM_AUDIO += capi_v2_peq
+MM_AUDIO += capi_v2_sumx
+MM_AUDIO += capi_v2_synth
+MM_AUDIO += capi_v2_avc
+MM_AUDIO += capi_v2_asrc
+MM_AUDIO += icc_module.so.1
+MM_AUDIO += sec_module.so.1
+MM_AUDIO += audio-nxp-auto
+MM_AUDIO += libaudio-nxp-auto
+MM_AUDIO += mercuryflasher
+MM_AUDIO += liba2bplugin-master
+MM_AUDIO += liba2bplugin-slave
+MM_AUDIO += liba2bstack
+MM_AUDIO += liba2bstack-pal
+MM_AUDIO += liba2bstack-protobuf
+MM_AUDIO += a2b-app
+MM_AUDIO += liba2bdriver
+MM_AUDIO += libacdbloaderclient
+MM_AUDIO += acdb_loader_service
+MM_AUDIO += libaudiohalpluginclient
+MM_AUDIO += audio_hal_plugin_service
+MM_AUDIO += audio_chime
+MM_AUDIO += libqtiautobundle
+MM_AUDIO += autoeffects
+MM_AUDIO += autoeffects.xml
+MM_AUDIO += audcalparam_commands.cfg
+MM_AUDIO += libsynth
+
+MM_AUDIO += android.hardware.automotive.audiocontrol-service.example
+MM_AUDIO += libaudiopowerpolicy
+endif
+
+ifeq ($(ENABLE_HYP), true)
+MM_AUDIO += amfsservice
+endif
+
+#MM_AUDIO_DBG
+MM_AUDIO_DBG += libstagefright_soft_ddpdec
+MM_AUDIO_DBG += libsurround_proc
+MM_AUDIO_DBG += surround_sound_headers
+MM_AUDIO_DBG += filter1i.pcm
+MM_AUDIO_DBG += filter1r.pcm
+MM_AUDIO_DBG += filter2i.pcm
+MM_AUDIO_DBG += filter2r.pcm
+MM_AUDIO_DBG += filter3i.pcm
+MM_AUDIO_DBG += filter3r.pcm
+MM_AUDIO_DBG += filter4i.pcm
+MM_AUDIO_DBG += filter4r.pcm
+MM_AUDIO_DBG += mm-audio-ftm
+MM_AUDIO_DBG += mm-audio-alsa-test
+MM_AUDIO_DBG += avs_test_ker.ko
+MM_AUDIO_DBG += libsrsprocessing_libs
+MM_AUDIO_DBG += libsrsprocessing
+MM_AUDIO_DBG += libacdbrtac
+MM_AUDIO_DBG += libadiertac
+
+PRODUCT_PACKAGES += $(MM_AUDIO)
+
+PRODUCT_PACKAGES_DEBUG += $(MM_AUDIO_DBG)
+
+#-------
+# audio specific
+# ------
+TARGET_USES_AOSP := true
+TARGET_USES_AOSP_FOR_AUDIO := true
+
+#Audio sample file for early services
+PRODUCT_COPY_FILES += device/qcom/$(TARGET_BOARD_PLATFORM)$(TARGET_BOARD_SUFFIX)/bike_bell.wav:$(TARGET_COPY_OUT_VENDOR)/etc/bike_bell.wav
+
+# Audio configuration file
+-include $(TOPDIR)vendor/qcom/opensource/audio-hal/primary-hal/configs/$(TARGET_BOARD_PLATFORM)$(TARGET_BOARD_SUFFIX)/$(TARGET_BOARD_PLATFORM)$(TARGET_BOARD_SUFFIX).mk
+
diff --git a/configs/msm8998/audio_policy_configuration.xml b/configs/msm8998/audio_policy_configuration.xml
index 10190ac..d53f1f5 100644
--- a/configs/msm8998/audio_policy_configuration.xml
+++ b/configs/msm8998/audio_policy_configuration.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!-- Copyright (c) 2016-2020, The Linux Foundation. All rights reserved
+<!-- Copyright (c) 2016-2021, The Linux Foundation. All rights reserved
Not a Contribution.
-->
<!-- Copyright (C) 2015 The Android Open Source Project
@@ -352,7 +352,7 @@
<route type="mix" sink="primary input"
sources="Wired Headset Mic,BT SCO Headset Mic,FM Tuner,USB Device In,USB Headset In,Telephony Rx"/>
<route type="mix" sink="voip_tx"
- sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
+ sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In,Wired Headset Mic"/>
<route type="mix" sink="surround_sound"
sources="Built-In Mic,Built-In Back Mic"/>
<route type="mix" sink="record_24"
diff --git a/configs/msmnile_au/msmnile_au.mk b/configs/msmnile_au/msmnile_au.mk
old mode 100644
new mode 100755
index 41205cc..5f7545a
--- a/configs/msmnile_au/msmnile_au.mk
+++ b/configs/msmnile_au/msmnile_au.mk
@@ -91,6 +91,23 @@
AUDIO_FEATURE_ENABLED_BATTERY_LISTENER := false
##AUDIO_FEATURE_FLAGS
+AUDIO_HARDWARE += audio.a2dp.default
+AUDIO_HARDWARE += audio.usb.default
+AUDIO_HARDWARE += audio.r_submix.default
+AUDIO_HARDWARE += audio.primary.msmnile
+
+#HAL Wrapper
+AUDIO_WRAPPER := libqahw
+AUDIO_WRAPPER += libqahwwrapper
+
+#HAL Test app
+AUDIO_HAL_TEST_APPS := hal_play_test
+AUDIO_HAL_TEST_APPS += hal_rec_test
+
+PRODUCT_PACKAGES += $(AUDIO_HARDWARE)
+PRODUCT_PACKAGES += $(AUDIO_WRAPPER)
+PRODUCT_PACKAGES += $(AUDIO_HAL_TEST_APPS)
+
AUDIO_FEATURE_ENABLED_AUTO_HAL := true
AUDIO_FEATURE_ENABLED_EXT_HW_PLUGIN := true
AUDIO_FEATURE_ENABLED_AUDIO_CONTROL_HAL := true
@@ -286,7 +303,7 @@
#enable hw aac encoder by default
PRODUCT_PROPERTY_OVERRIDES += \
-vendor.audio.hw.aac.encoder=true
+vendor.audio.hw.aac.encoder=false
#force offload using hardware decoders for FLAC, WMA & APE
PRODUCT_PROPERTY_OVERRIDES += \
@@ -365,7 +382,7 @@
vendor.audio.feature.compress_in.enable=false \
vendor.audio.feature.compress_meta_data.enable=false \
vendor.audio.feature.compr_voip.enable=false \
-vendor.audio.feature.concurrent_capture.enable=true \
+vendor.audio.feature.concurrent_capture.enable=false \
vendor.audio.feature.custom_stereo.enable=false \
vendor.audio.feature.display_port.enable=false \
vendor.audio.feature.dsm_feedback.enable=false \
@@ -413,7 +430,7 @@
vendor.audio.feature.compress_in.enable=true \
vendor.audio.feature.compress_meta_data.enable=true \
vendor.audio.feature.compr_voip.enable=false \
-vendor.audio.feature.concurrent_capture.enable=true \
+vendor.audio.feature.concurrent_capture.enable=false \
vendor.audio.feature.custom_stereo.enable=true \
vendor.audio.feature.display_port.enable=true \
vendor.audio.feature.dsm_feedback.enable=false \
diff --git a/configs/msmsteppe/audio_policy_configuration.xml b/configs/msmsteppe/audio_policy_configuration.xml
index 4629b81..de9baf8 100644
--- a/configs/msmsteppe/audio_policy_configuration.xml
+++ b/configs/msmsteppe/audio_policy_configuration.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!-- Copyright (c) 2016-2020, The Linux Foundation. All rights reserved
+<!-- Copyright (c) 2016-2021, The Linux Foundation. All rights reserved
Not a Contribution.
-->
<!-- Copyright (C) 2015 The Android Open Source Project
@@ -356,7 +356,7 @@
<route type="mix" sink="primary input"
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic,FM Tuner,USB Device In,USB Headset In"/>
<route type="mix" sink="voip_tx"
- sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
+ sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In,Wired Headset Mic"/>
<route type="mix" sink="usb_surround_sound"
sources="USB Device In,USB Headset In"/>
<route type="mix" sink="record_24"
diff --git a/configs/msmsteppe_au/msmsteppe_au.mk b/configs/msmsteppe_au/msmsteppe_au.mk
index 07455b8..31e7091 100644
--- a/configs/msmsteppe_au/msmsteppe_au.mk
+++ b/configs/msmsteppe_au/msmsteppe_au.mk
@@ -80,6 +80,23 @@
AUDIO_FEATURE_ENABLED_BATTERY_LISTENER := false
##AUDIO_FEATURE_FLAGS
+AUDIO_HARDWARE += audio.a2dp.default
+AUDIO_HARDWARE += audio.usb.default
+AUDIO_HARDWARE += audio.r_submix.default
+AUDIO_HARDWARE += audio.primary.$(MSMSTEPPE)
+
+#HAL Wrapper
+AUDIO_WRAPPER := libqahw
+AUDIO_WRAPPER += libqahwwrapper
+
+#HAL Test app
+AUDIO_HAL_TEST_APPS := hal_play_test
+AUDIO_HAL_TEST_APPS += hal_rec_test
+
+PRODUCT_PACKAGES += $(AUDIO_HARDWARE)
+PRODUCT_PACKAGES += $(AUDIO_WRAPPER)
+PRODUCT_PACKAGES += $(AUDIO_HAL_TEST_APPS)
+
AUDIO_FEATURE_ENABLED_AUTO_HAL := true
AUDIO_FEATURE_ENABLED_EXT_HW_PLUGIN := true
AUDIO_FEATURE_ENABLED_AUDIO_CONTROL_HAL := true
diff --git a/configs/sdm660/audio_policy_configuration.xml b/configs/sdm660/audio_policy_configuration.xml
index 1d70af6..09b1b1e 100644
--- a/configs/sdm660/audio_policy_configuration.xml
+++ b/configs/sdm660/audio_policy_configuration.xml
@@ -356,7 +356,7 @@
<route type="mix" sink="usb_surround_sound"
sources="USB Device In,USB Headset In"/>
<route type="mix" sink="voip_tx"
- sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
+ sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In,Wired Headset Mic"/>
<route type="mix" sink="surround_sound"
sources="Built-In Mic,Built-In Back Mic"/>
<route type="mix" sink="record_24"
diff --git a/configs/sdm710/audio_policy_configuration.xml b/configs/sdm710/audio_policy_configuration.xml
index 57a3d7e..789d673 100644
--- a/configs/sdm710/audio_policy_configuration.xml
+++ b/configs/sdm710/audio_policy_configuration.xml
@@ -364,7 +364,7 @@
<route type="mix" sink="usb_surround_sound"
sources="USB Device In,USB Headset In"/>
<route type="mix" sink="voip_tx"
- sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
+ sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In,Wired Headset Mic"/>
<route type="mix" sink="surround_sound"
sources="Built-In Mic,Built-In Back Mic"/>
<route type="mix" sink="record_24"
diff --git a/configs/sdm845/audio_platform_info.xml b/configs/sdm845/audio_platform_info.xml
index 9d0c9e6..b8c2ad8 100644
--- a/configs/sdm845/audio_platform_info.xml
+++ b/configs/sdm845/audio_platform_info.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!-- Copyright (c) 2014, 2016-2020, The Linux Foundation. All rights reserved. -->
+<!-- Copyright (c) 2014, 2016-2021, The Linux Foundation. All rights reserved. -->
<!-- -->
<!-- Redistribution and use in source and binary forms, with or without -->
<!-- modification, are permitted provided that the following conditions are -->
@@ -99,6 +99,8 @@
<usecase name="USECASE_INCALL_REC_UPLINK" type="in" id="27" />
<usecase name="USECASE_INCALL_REC_DOWNLINK" type="in" id="27" />
<usecase name="USECASE_INCALL_REC_UPLINK_AND_DOWNLINK" type="in" id="27" />
+ <usecase name="USECASE_INCALL_MUSIC_UPLINK" type="out" id="27" />
+ <usecase name="USECASE_INCALL_MUSIC_UPLINK2" type="out" id="27" />
</pcm_ids>
<config_params>
<param key="spkr_1_tz_name" value="wsatz.13"/>
diff --git a/configs/sdm845/audio_policy_configuration.xml b/configs/sdm845/audio_policy_configuration.xml
index d1e77a7..7e0d2cb 100644
--- a/configs/sdm845/audio_policy_configuration.xml
+++ b/configs/sdm845/audio_policy_configuration.xml
@@ -21,7 +21,7 @@
<!-- version section contains a “version” tag in the form “major.minor” e.g version=”1.0” -->
<!-- Global configuration Decalaration -->
- <globalConfiguration speaker_drc_enabled="true"/>
+ <globalConfiguration speaker_drc_enabled="true" call_screen_mode_supported="true"/>
<!-- Modules section:
@@ -172,6 +172,12 @@
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,88200,96000,176400,192000"
channelMasks="AUDIO_CHANNEL_IN_5POINT1,AUDIO_CHANNEL_INDEX_MASK_6,AUDIO_CHANNEL_IN_7POINT1,AUDIO_CHANNEL_INDEX_MASK_8"/>
</mixPort>
+ <mixPort name="incall_music_uplink" role="source"
+ flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="8000,16000,48000"
+ channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+ </mixPort>
<mixPort name="primary input" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
@@ -343,7 +349,7 @@
<route type="mix" sink="USB Headset Out"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,hifi_playback"/>
<route type="mix" sink="Telephony Tx"
- sources="voice_tx"/>
+ sources="voice_tx,incall_music_uplink"/>
<route type="mix" sink="voice_rx"
sources="Telephony Rx"/>
<route type="mix" sink="primary input"
@@ -351,7 +357,7 @@
<route type="mix" sink="usb_surround_sound"
sources="USB Device In,USB Headset In"/>
<route type="mix" sink="voip_tx"
- sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
+ sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In,Wired Headset Mic"/>
<route type="mix" sink="record_24"
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic"/>
<route type="mix" sink="mmap_no_irq_in"
diff --git a/configs/sdm845/sdm845.mk b/configs/sdm845/sdm845.mk
index 4762cad..0fefe53 100644
--- a/configs/sdm845/sdm845.mk
+++ b/configs/sdm845/sdm845.mk
@@ -52,7 +52,7 @@
AUDIO_FEATURE_ENABLED_DISPLAY_PORT := true
AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := false
AUDIO_FEATURE_ENABLED_HFP := true
-AUDIO_FEATURE_ENABLED_INCALL_MUSIC := false
+AUDIO_FEATURE_ENABLED_INCALL_MUSIC := true
AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE := true
AUDIO_FEATURE_ENABLED_SPKR_PROTECTION := true
diff --git a/configs/trinket/audio_policy_configuration.xml b/configs/trinket/audio_policy_configuration.xml
index aec4edb..7427e68 100755
--- a/configs/trinket/audio_policy_configuration.xml
+++ b/configs/trinket/audio_policy_configuration.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!-- Copyright (c) 2016-2020, The Linux Foundation. All rights reserved
+<!-- Copyright (c) 2016-2021, The Linux Foundation. All rights reserved
Not a Contribution.
-->
<!-- Copyright (C) 2015 The Android Open Source Project
@@ -362,7 +362,7 @@
<route type="mix" sink="primary input"
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic,FM Tuner,USB Device In,USB Headset In"/>
<route type="mix" sink="voip_tx"
- sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In"/>
+ sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In,Wired Headset Mic"/>
<route type="mix" sink="usb_surround_sound"
sources="USB Device In,USB Headset In"/>
<route type="mix" sink="record_24"
diff --git a/configure.ac b/configure.ac
index 8810f0b..997c53d 100755
--- a/configure.ac
+++ b/configure.ac
@@ -49,6 +49,7 @@
[qtiquingvm], [TARGET_SUPPORT=msmnile_au],
[sa81*], [TARGET_SUPPORT=msmnile_au],
[sa61*], [TARGET_SUPPORT=msmsteppe_au],
+ [qrbx210], [TARGET_SUPPORT=qrbx210],
[TARGET_SUPPORT=none])],
[TARGET_SUPPORT=none]
)
@@ -104,6 +105,12 @@
AC_SUBST([TARGET_PLATFORM], ["msm8974"])
TARGET_CFLAGS="-DPLATFORM_MSMSTEPPE"
fi
+if (test x$TARGET_SUPPORT = xqrbx210); then
+ AC_SUBST([TARGET_PLATFORM], ["msm8974"])
+ TARGET_CFLAGS=" -DPLATFORM_BENGAL"
+ TARGET_CFLAGS+=" -DMAX_TARGET_SPECIFIC_CHANNEL_CNT=\"4\""
+ TARGET_CFLAGS+=" -DINCALL_STEREO_CAPTURE_ENABLED"
+fi
if (test x$TARGET_SUPPORT = xmsmnile_au); then
AC_SUBST([TARGET_PLATFORM], ["msm8974"])
TARGET_CFLAGS="-DPLATFORM_MSMNILE"
@@ -161,6 +168,7 @@
AM_CONDITIONAL([INSTANCE_ID], [test x$AUDIO_FEATURE_ENABLED_INSTANCE_ID = xtrue])
AM_CONDITIONAL([LL_AS_PRIMARY_OUTPUT], [test x$AUDIO_USE_LL_AS_PRIMARY_OUTPUT = xtrue])
AM_CONDITIONAL([QAHW_V1], [test x$AUDIO_FEATURE_ENABLED_QAHW_1_0 = xtrue])
+AM_CONDITIONAL([DISABLE_COMPRESS_FORMAT], [test x$AUDIO_FEATURE_DISABLE_COMPRESS_FORMAT = xtrue])
AC_CONFIG_FILES([ \
Makefile \
diff --git a/hal/Makefile.am b/hal/Makefile.am
index b60e4d4..f0d44cb 100755
--- a/hal/Makefile.am
+++ b/hal/Makefile.am
@@ -188,6 +188,10 @@
AM_CFLAGS += -DUSE_LL_AS_PRIMARY_OUTPUT
endif
+if DISABLE_COMPRESS_FORMAT
+AM_CFLAGS += -DAUDIO_DISABLE_COMPRESS_FORMAT
+endif
+
h_sources = audio_extn/audio_defs.h \
audio_extn/audio_extn.h \
audio_hw.h \
diff --git a/hal/audio_extn/audio_defs.h b/hal/audio_extn/audio_defs.h
index d8d1bbb..3ed869b 100644
--- a/hal/audio_extn/audio_defs.h
+++ b/hal/audio_extn/audio_defs.h
@@ -212,6 +212,15 @@
*/
} audio_extn_callback_id;
+typedef int audio_stream_callback_t(audio_extn_callback_id event,
+ void *param,
+ void *cookie);
+
+struct audio_stream_callback_param {
+ audio_stream_callback_t *cb; /* callback function */
+ void *cookie; /* callback context */
+};
+
#define AUDIO_MAX_ADSP_STREAM_CMD_PAYLOAD_LEN 504
typedef enum {
@@ -317,6 +326,7 @@
typedef union {
struct audio_out_render_window_param render_window_params;
+ struct audio_stream_callback_param stream_callback_params;
} audio_extn_loopback_param_payload;
typedef enum {
diff --git a/hal/audio_extn/utils.c b/hal/audio_extn/utils.c
index f71f2b2..756faf5 100755
--- a/hal/audio_extn/utils.c
+++ b/hal/audio_extn/utils.c
@@ -2000,9 +2000,11 @@
case AUDIO_FORMAT_WMA:
id = SND_AUDIOCODEC_WMA;
break;
+#ifndef AUDIO_DISABLE_COMPRESS_FORMAT
case AUDIO_FORMAT_WMA_PRO:
id = SND_AUDIOCODEC_WMA_PRO;
break;
+#endif
case AUDIO_FORMAT_MP2:
id = SND_AUDIOCODEC_MP2;
break;
@@ -2023,12 +2025,14 @@
case AUDIO_FORMAT_IEC61937:
id = SND_AUDIOCODEC_IEC61937;
break;
+#ifndef AUDIO_DISABLE_COMPRESS_FORMAT
case AUDIO_FORMAT_DSD:
id = SND_AUDIOCODEC_DSD;
break;
case AUDIO_FORMAT_APTX:
id = SND_AUDIOCODEC_APTX;
break;
+#endif
default:
ALOGE("%s: Unsupported audio format :%x", __func__, format);
}
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 82d2fb0..96c007d 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -4969,7 +4969,10 @@
if (is_usb_out_device_type(&out->device_list) &&
list_empty(&new_devices) &&
!audio_extn_usb_connected(NULL)) {
- reassign_device_list(&new_devices, AUDIO_DEVICE_OUT_SPEAKER, "");
+ if (adev->mode == AUDIO_MODE_IN_CALL || adev->mode == AUDIO_MODE_IN_COMMUNICATION)
+ reassign_device_list(&new_devices, AUDIO_DEVICE_OUT_EARPIECE, "");
+ else
+ reassign_device_list(&new_devices, AUDIO_DEVICE_OUT_SPEAKER, "");
}
/* To avoid a2dp to sco overlapping / BT device improper state
* check with BT lib about a2dp streaming support before routing
@@ -8841,13 +8844,13 @@
usecase = node_to_item(node, struct audio_usecase, list);
if (usecase->stream.in && (usecase->type == PCM_CAPTURE ||
usecase->type == VOICE_CALL) &&
- (!is_btsco_device(SND_DEVICE_NONE, usecase->in_snd_device))) {
+ (!is_btsco_device(SND_DEVICE_NONE, usecase->in_snd_device)) && (is_sco_in_device_type(&usecase->stream.in->device_list))) {
ALOGD("BT_SCO ON, switch all in use case to it");
select_devices(adev, usecase->id);
}
if (usecase->stream.out && (usecase->type == PCM_PLAYBACK ||
usecase->type == VOICE_CALL) &&
- (!is_btsco_device(usecase->out_snd_device, SND_DEVICE_NONE))) {
+ (!is_btsco_device(usecase->out_snd_device, SND_DEVICE_NONE)) && (is_sco_out_device_type(&usecase->stream.out->device_list))) {
ALOGD("BT_SCO ON, switch all out use case to it");
select_devices(adev, usecase->id);
}
diff --git a/mm-audio/configure.ac b/mm-audio/configure.ac
index 6eabd87..c8140e6 100644
--- a/mm-audio/configure.ac
+++ b/mm-audio/configure.ac
@@ -26,6 +26,16 @@
[Specify the location of the sanitized Linux headers]),
[CPPFLAGS="$CPPFLAGS -idirafter $withval"])
+AC_ARG_WITH(sanitized-audio-headers,
+ AS_HELP_STRING([--with-sanitized-headers-audio=DIR],
+ [Specify the location of the sanitized Linux audio headers]),
+ [CPPFLAGS="$CPPFLAGS -idirafter $withval"])
+
+AC_ARG_WITH(audio-kernel-headers,
+ AS_HELP_STRING([--with-audio-kernel-headers=DIR],
+ [Specify the location of the sanitized Linux headers]),
+ [CPPFLAGS="$CPPFLAGS -idirafter $withval"])
+
AC_ARG_WITH([glib],
AC_HELP_STRING([--with-glib],
[enable glib, Build against glib. Use this when building for HLOS systems which use glib]))
diff --git a/post_proc/Makefile.am b/post_proc/Makefile.am
index 8bd41ae..993058e 100644
--- a/post_proc/Makefile.am
+++ b/post_proc/Makefile.am
@@ -14,6 +14,8 @@
AM_CFLAGS += -DAFE_PROXY_ENABLED
endif
+AM_CFLAGS += -DAUDIO_GKI_ENABLED
+
if HW_ACC_EFFECT
AM_CFLAGS += -DHW_ACCELERATED_EFFECTS
c_sources += hw_accelerator.c
diff --git a/qahw/inc/qahw.h b/qahw/inc/qahw.h
index dd920e2..0950c92 100644
--- a/qahw/inc/qahw.h
+++ b/qahw/inc/qahw.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
* Not a Contribution.
*
* Copyright (C) 2011 The Android Open Source Project *
@@ -364,6 +364,12 @@
* Stop input stream. Returns zero on success.
*/
int qahw_in_stop_l(qahw_stream_handle_t *in_handle);
+
+/* API to set capture stream specific config parameters */
+int qahw_in_set_param_data_l(qahw_stream_handle_t *in_handle,
+ qahw_param_id param_id,
+ qahw_param_payload *payload);
+
/*
* Return the amount of input frames lost in the audio driver since the
* last call of this function.
@@ -467,6 +473,11 @@
const struct audio_port_config *sinks,
audio_patch_handle_t *handle);
+int qahw_create_audio_patch_v2_l(qahw_module_handle_t *hw_module,
+ qahw_source_port_config_t *source_port_config,
+ qahw_sink_port_config_t *sink_port_config,
+ audio_patch_handle_t *handle);
+
/* Release an audio patch */
int qahw_release_audio_patch_l(qahw_module_handle_t *hw_module,
audio_patch_handle_t handle);
diff --git a/qahw/inc/qahw_defs.h b/qahw/inc/qahw_defs.h
index b0eb332..b7bbaa5 100644
--- a/qahw/inc/qahw_defs.h
+++ b/qahw/inc/qahw_defs.h
@@ -176,6 +176,9 @@
#define QAHW_AUDIO_FLAG_HPCM_TX 0x00020000
#define QAHW_AUDIO_FLAG_HPCM_RX 0x00040000
+/* audio output flag for timestamp mode */
+#define QAHW_OUTPUT_FLAG_TIMESTAMP 0x20000000
+
/* Query fm volume */
#define QAHW_PARAMETER_KEY_FM_VOLUME "fm_volume"
@@ -223,6 +226,13 @@
#define QAHW_AUDIO_DEVICE_OUT_SPEAKER2 0x10000000
#define QAHW_AUDIO_DEVICE_OUT_SPEAKER3 0x20000000
+#define QAHW_AUDIO_DEVICE_OUT_OPTICAL 0x40000
+
+#define QAHW_PCM_CUSTOM_CHANNEL_MAP_12 59
+#define QAHW_PCM_CUSTOM_CHANNEL_MAP_13 60
+#define QAHW_PCM_CUSTOM_CHANNEL_MAP_14 61
+#define QAHW_PCM_CUSTOM_CHANNEL_MAP_15 62
+#define QAHW_PCM_CUSTOM_CHANNEL_MAP_16 63
/* type of asynchronous write callback events. Mutually exclusive */
typedef enum {
@@ -240,6 +250,11 @@
void *param,
void *cookie);
+struct qahw_stream_callback_param {
+ qahw_stream_callback_t *cb; /* callback function */
+ void *cookie; /* callback context */
+};
+
/* type of drain requested to audio_stream_out->drain(). Mutually exclusive */
typedef enum {
QAHW_DRAIN_ALL, /* drain() returns when all data has been played */
@@ -252,6 +267,8 @@
/*TBD: Extend this based on stb requirement*/
typedef enum {
QAHW_META_DATA_FLAGS_NONE = 0,
+ QAHW_META_DATA_FLAGS_TIMESTAMP_VALID,
+ QAHW_META_DATA_FLAGS_TIMESTAMP_CONTINUE,
} qahw_meta_data_flags_t;
typedef struct {
@@ -358,6 +375,7 @@
typedef enum {
QAHW_STREAM_PP_EVENT = 0,
QAHW_STREAM_ENCDEC_EVENT = 1,
+ QAHW_STREAM_IEC_61937_FMT_UPDATE_EVENT = 2,
} qahw_event_id;
/* payload format for HAL parameter
@@ -369,6 +387,11 @@
void *payload; /* the actual payload */
};
+struct qahw_in_channel_map_param {
+ uint8_t channels; /* Input Channels */
+ uint8_t channel_map[AUDIO_CHANNEL_COUNT_MAX]; /* Input Channel Map */
+};
+
struct qahw_out_channel_map_param {
uint8_t channels; /* Input Channels */
uint8_t channel_map[AUDIO_CHANNEL_COUNT_MAX]; /* Input Channel Map */
@@ -439,6 +462,21 @@
qahw_hpcm_direction direction;
} qahw_hpcm_params_t;
+struct qahw_in_ttp_offset_param {
+ uint64_t ttp_offset; /* TTP value is derived from ttp offset*/
+};
+
+struct qahw_out_channel_status_info {
+ /* Channel status is 192 bits each for CH A and CH B*/
+ char channel_status[48];
+};
+
+struct qahw_device_channel_bit_mask {
+ audio_devices_t device;
+ /* Channel status bit mask is 192 bits each for CH A and CH B*/
+ char bit_mask[48];
+};
+
typedef union {
struct qahw_source_tracking_param st_params;
struct qahw_sound_focus_param sf_params;
@@ -449,6 +487,7 @@
struct qahw_out_enable_drift_correction drift_enable_param;
struct qahw_out_correct_drift drift_correction_param;
struct qahw_adsp_event adsp_event_params;
+ struct qahw_in_channel_map_param in_channel_map_params;
struct qahw_out_channel_map_param channel_map_params;
struct qahw_device_cfg_param device_cfg_params;
struct qahw_mix_matrix_params mix_matrix_params;
@@ -457,6 +496,9 @@
struct qahw_dtmf_gen_params dtmf_gen_params;
struct qahw_tty_params tty_mode_params;
struct qahw_hpcm_params hpcm_params;
+ struct qahw_in_ttp_offset_param ttp_offset;
+ struct qahw_out_channel_status_info ch_status_info;
+ struct qahw_device_channel_bit_mask ch_bit_mask;
} qahw_param_payload;
typedef enum {
@@ -480,16 +522,34 @@
QAHW_PARAM_DTMF_GEN,
QAHW_PARAM_TTY_MODE,
QAHW_PARAM_HPCM,
+ QAHW_PARAM_IN_TTP_OFFSET,
+ QAHW_PARAM_IN_CHANNEL_MAP, /* PARAM to set i/p channel map */
+ QAHW_PARAM_CHANNEL_STATUS_INFO,
+ QAHW_PARAM_CHANNEL_BIT_MASK,
} qahw_param_id;
typedef union {
struct qahw_out_render_window_param render_window_params;
+ struct qahw_stream_callback_param stream_callback_params;
} qahw_loopback_param_payload;
typedef enum {
- QAHW_PARAM_LOOPBACK_RENDER_WINDOW /* PARAM to set render window */
+ QAHW_PARAM_LOOPBACK_RENDER_WINDOW, /* PARAM to set render window */
+ QAHW_PARAM_LOOPBACK_SET_CALLBACK
} qahw_loopback_param_id;
+typedef struct {
+ uint32_t num_sources;
+ audio_input_flags_t flags;
+ struct audio_port_config *source_config;
+} qahw_source_port_config_t;
+
+typedef struct {
+ uint32_t num_sinks;
+ audio_output_flags_t flags;
+ struct audio_port_config *sink_config;
+} qahw_sink_port_config_t;
+
/** stream direction enumeration */
typedef enum {
QAHW_STREAM_INPUT,
diff --git a/qahw/src/qahw.c b/qahw/src/qahw.c
index 2ae6906..0502f2f 100644
--- a/qahw/src/qahw.c
+++ b/qahw/src/qahw.c
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
+* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -80,6 +80,15 @@
qahw_loopback_param_id param_id,
qahw_loopback_param_payload *payload);
+typedef int (*qahwi_create_audio_patch_v2_t)(const audio_hw_device_t *,
+ qahw_source_port_config_t *source_port_config,
+ qahw_sink_port_config_t *sink_port_config,
+ audio_patch_handle_t *);
+
+typedef int (*qahwi_in_set_param_data_t)(struct audio_stream_in *in,
+ qahw_param_id param_id,
+ qahw_param_payload *payload);
+
typedef struct {
audio_hw_device_t *audio_device;
char module_name[MAX_MODULE_NAME_LENGTH];
@@ -92,6 +101,7 @@
qahwi_get_param_data_t qahwi_get_param_data;
qahwi_set_param_data_t qahwi_set_param_data;
qahwi_loopback_set_param_data_t qahwi_loopback_set_param_data;
+ qahwi_create_audio_patch_v2_t qahwi_create_audio_patch_v2;
} qahw_module_t;
typedef struct {
@@ -117,6 +127,7 @@
pthread_mutex_t lock;
qahwi_in_read_v2_t qahwi_in_read_v2;
qahwi_in_stop_t qahwi_in_stop;
+ qahwi_in_set_param_data_t qahwi_in_set_param_data;
} qahw_stream_in_t;
typedef enum {
@@ -1001,6 +1012,39 @@
return str_param;
}
+/* API to get capture stream specific config parameters */
+int qahw_in_set_param_data_l(qahw_stream_handle_t *in_handle,
+ qahw_param_id param_id,
+ qahw_param_payload *payload)
+{
+ int rc = -EINVAL;
+ qahw_stream_in_t *qahw_stream_in = (qahw_stream_in_t *)in_handle;
+ audio_stream_in_t *in = NULL;
+
+ if (!payload) {
+ ALOGE("%s::Invalid param", __func__);
+ goto exit;
+ }
+
+ if (!is_valid_qahw_stream_l((void *)qahw_stream_in, STREAM_DIR_IN)) {
+ ALOGE("%s::Invalid in handle %p", __func__, in_handle);
+ goto exit;
+ }
+
+ pthread_mutex_lock(&qahw_stream_in->lock);
+ in = qahw_stream_in->stream;
+ if (qahw_stream_in->qahwi_in_set_param_data) {
+ rc = qahw_stream_in->qahwi_in_set_param_data(in, param_id, payload);
+ } else {
+ rc = -ENOSYS;
+ ALOGW("%s not supported", __func__);
+ }
+ pthread_mutex_unlock(&qahw_stream_in->lock);
+
+exit:
+ return rc;
+}
+
/*
* Read audio buffer in from audio driver. Returns number of bytes read, or a
* negative status_t. If at least one frame was read prior to the error,
@@ -1445,6 +1489,38 @@
return ret;
}
+int qahw_create_audio_patch_v2_l(qahw_module_handle_t *hw_module,
+ qahw_source_port_config_t *source_port_config,
+ qahw_sink_port_config_t *sink_port_config,
+ audio_patch_handle_t *handle)
+{
+ int ret = 0;
+ qahw_module_t *qahw_module = (qahw_module_t *)hw_module;
+ qahw_module_t *qahw_module_temp;
+
+ pthread_mutex_lock(&qahw_module_init_lock);
+ qahw_module_temp = get_qahw_module_by_ptr_l(qahw_module);
+ pthread_mutex_unlock(&qahw_module_init_lock);
+ if (qahw_module_temp == NULL) {
+ ALOGE("%s:: invalid hw module %p", __func__, qahw_module);
+ goto exit;
+ }
+
+ pthread_mutex_lock(&qahw_module->lock);
+
+ if (qahw_module->qahwi_create_audio_patch_v2){
+ ret = qahw_module->qahwi_create_audio_patch_v2(qahw_module->audio_device,
+ source_port_config, sink_port_config, handle);
+ } else {
+ ret = -ENOSYS;
+ ALOGE("%s not supported\n",__func__);
+ }
+ pthread_mutex_unlock(&qahw_module->lock);
+
+exit:
+ return ret;
+}
+
/* Release an audio patch */
int qahw_release_audio_patch_l(qahw_module_handle_t *hw_module,
audio_patch_handle_t handle)
@@ -1805,6 +1881,17 @@
/* clear any existing errors */
dlerror();
+ qahw_stream_in->qahwi_in_set_param_data = (qahwi_in_set_param_data_t)
+ dlsym(qahw_module->module->dso,
+ "qahwi_in_set_param_data");
+ if ((error = dlerror()) != NULL) {
+ ALOGI("%s: dlsym error %s for qahwi_in_set_param_data",
+ __func__, error);
+ qahw_stream_in->qahwi_in_set_param_data = NULL;
+ }
+
+ /* clear any existing errors */
+ dlerror();
qahw_stream_in->qahwi_in_stop = (qahwi_in_stop_t)
dlsym(qahw_module->module->dso, "qahwi_in_stop");
if ((error = dlerror()) != NULL) {
@@ -1971,6 +2058,11 @@
if (!qahw_module->qahwi_loopback_set_param_data)
ALOGD("%s::qahwi_loopback_set_param_data api is not defined\n", __func__);
+ qahw_module->qahwi_create_audio_patch_v2 = (qahwi_create_audio_patch_v2_t) dlsym (module->dso,
+ "qahwi_create_audio_patch_v2");
+ if (!qahw_module->qahwi_create_audio_patch_v2)
+ ALOGD("%s::qahwi_create_audio_patch_v2 api is not defined\n",__func__);
+
if (!qahw_list_count)
list_init(&qahw_module_list);
qahw_list_count++;
diff --git a/qahw_api/Makefile.am b/qahw_api/Makefile.am
index e4cbdb5..5fc0849 100644
--- a/qahw_api/Makefile.am
+++ b/qahw_api/Makefile.am
@@ -5,7 +5,8 @@
inc/qahw_effect_equalizer.h \
inc/qahw_effect_presetreverb.h \
inc/qahw_effect_virtualizer.h \
- inc/qahw_effect_visualizer.h
+ inc/qahw_effect_visualizer.h \
+ inc/qahw_effect_trumpet.h
AM_CPPFLAGS := -I $(top_srcdir)/qahw_api/inc/
AM_CPPFLAGS += -I $(PKG_CONFIG_SYSROOT_DIR)/usr/include/mm-audio/audio-hal-server
diff --git a/qahw_api/inc/qahw_api.h b/qahw_api/inc/qahw_api.h
index 80d9c64..bfeefea 100644
--- a/qahw_api/inc/qahw_api.h
+++ b/qahw_api/inc/qahw_api.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
* Not a Contribution.
*
* Copyright (C) 2011 The Android Open Source Project *
@@ -386,6 +386,11 @@
int qahw_in_get_capture_position(const qahw_stream_handle_t *in_handle,
int64_t *frames, int64_t *time);
+/* API to set capture stream specific config parameters */
+int qahw_in_set_param_data(qahw_stream_handle_t *in_handle,
+ qahw_param_id param_id,
+ qahw_param_payload *payload);
+
/* Module specific APIs */
/* convenience API for opening and closing an audio HAL module */
@@ -460,6 +465,11 @@
const struct audio_port_config *sinks,
audio_patch_handle_t *handle);
+int qahw_create_audio_patch_v2(qahw_module_handle_t *hw_module,
+ qahw_source_port_config_t *source_port_config,
+ qahw_sink_port_config_t *sink_port_config,
+ audio_patch_handle_t *handle);
+
/* Release an audio patch */
int qahw_release_audio_patch(qahw_module_handle_t *hw_module,
audio_patch_handle_t handle);
diff --git a/qahw_api/inc/qahw_defs.h b/qahw_api/inc/qahw_defs.h
index f979013..942e913 100644
--- a/qahw_api/inc/qahw_defs.h
+++ b/qahw_api/inc/qahw_defs.h
@@ -470,6 +470,18 @@
QAHW_PARAM_LOOPBACK_RENDER_WINDOW /* PARAM to set render window */
} qahw_loopback_param_id;
+typedef struct {
+ uint32_t num_sources;
+ audio_input_flags_t flags;
+ struct audio_port_config *source_config;
+} qahw_source_port_config_t;
+
+typedef struct {
+ uint32_t num_sinks;
+ audio_output_flags_t flags;
+ struct audio_port_config *sink_config;
+} qahw_sink_port_config_t;
+
/** stream direction enumeration */
typedef enum {
QAHW_STREAM_INPUT,
diff --git a/qahw_api/inc/qahw_effect_trumpet.h b/qahw_api/inc/qahw_effect_trumpet.h
new file mode 100644
index 0000000..ba81f7d
--- /dev/null
+++ b/qahw_api/inc/qahw_effect_trumpet.h
@@ -0,0 +1,114 @@
+/* Copyright (c) 2018-2019,2021, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef QAHW_EFFECT_TRUMPET_H_
+#define QAHW_EFFECT_TRUMPET_H_
+
+#include <qahw_effect_api.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define QAHW_EFFECT_TRUMPET_LIBRARY "libtrumpet.so"
+
+static const qahw_effect_uuid_t SL_IID_TRUMPET_ = {0x5e46f50b, 0xcc86, 0x4d6e, 0x9610, {0x54, 0x72, 0x76, 0x1d, 0xd0, 0xe2}};
+static const qahw_effect_uuid_t * const SL_IID_TRUMPET = &SL_IID_TRUMPET_;
+
+static const qahw_effect_uuid_t SL_IID_TRUMPET_UUID_ = {0xa52a402b, 0xe254, 0x4fb9, 0xab7a, {0x7c, 0xf5, 0x83, 0x44, 0xe3, 0xf3}};
+static const qahw_effect_uuid_t * const SL_IID_TRUMPET_UUID = &SL_IID_TRUMPET_UUID_;
+
+/* enumerated parameter settings for trumpet effect used by both set and get*/
+typedef enum {
+ TRUMPET_PARAM_ENABLE,
+ TRUMPET_PARAM_PREGAIN,
+ TRUMPET_PARAM_POSTGAIN,
+ TRUMPET_PARAM_SYSTEMGAIN,
+ TRUMPET_PARAM_MI_DV_LEVELER_STEERING,
+ TRUMPET_PARAM_MI_DIALOG_ENHANCER,
+ TRUMPET_PARAM_MI_SURROUND_COMPRESSOR,
+ TRUMPET_PARAM_MI_IEQ_STEERING,
+ TRUMPET_PARAM_DIALOG_AMOUNT,
+ TRUMPET_PARAM_DIALOG_DUCKING,
+ TRUMPET_PARAM_DIALOG_ENABLE,
+ TRUMPET_PARAM_VOLUME_LEVELER_AMOUNT,
+ TRUMPET_PARAM_VOLUME_LEVELER_IN_TARGET,
+ TRUMPET_PARAM_VOLUME_LEVELER_OUT_TARGET,
+ TRUMPET_PARAM_VOLUME_LEVELER_ENABLE,
+ TRUMPET_PARAM_VOLUME_MODELER_CALIBRATION,
+ TRUMPET_PARAM_VOLUME_MODELER_ENABLE,
+ TRUMPET_PARAM_VOLMAX_BOOST,
+ TRUMPET_PARAM_BASS_BOOST,
+ TRUMPET_PARAM_BASS_CUTOFF_FREQ,
+ TRUMPET_PARAM_BASS_WIDTH,
+ TRUMPET_PARAM_BASS_ENABLE,
+ TRUMPET_PARAM_BASS_EXTRACT_CUTOFF_FREQ,
+ TRUMPET_PARAM_BASS_EXTRACT_ENABLE,
+ TRUMPET_PARAM_REGULATOR_SET,
+ TRUMPET_PARAM_REGULATOR_OVERDRIVE,
+ TRUMPET_PARAM_REGULATOR_TIMBRE_PRESERVE,
+ TRUMPET_PARAM_REGULATOR_RELAXATION_AMT,
+ TRUMPET_PARAM_REGULATOR_SPKR_DIST_ENABLE,
+ TRUMPET_PARAM_REGULATOR_ENABLE,
+ TRUMPET_PARAM_VIRTUAL_BASS_MODE,
+ TRUMPET_PARAM_VIRTUAL_BASS_SRC_FREQ,
+ TRUMPET_PARAM_VIRTUAL_BASS_MIX_FREQ,
+ TRUMPET_PARAM_VIRTUAL_BASS_OVERALL_GAIN,
+ TRUMPET_PARAM_VIRTUAL_BASS_SUBGAINS,
+ TRUMPET_PARAM_VIRTUAL_BASS_SLOPE_GAIN,
+ TRUMPET_PARAM_FRONT_SPK_ANG,
+ TRUMPET_PARAM_SURROUND_SPK_ANG,
+ TRUMPET_PARAM_HEIGHT_SPK_ANG,
+ TRUMPET_PARAM_HEIGHT_FILTER_MODE,
+ TRUMPET_PARAM_SURROUND_BOOST,
+ TRUMPET_PARAM_SURROUND_DECODER_ENABLE,
+ TRUMPET_PARAM_CALIBRATION,
+ TRUMPET_PARAM_GRAPHICS_ENABLE,
+ TRUMPET_PARAM_GRAPHICS_SET,
+ TRUMPET_PARAM_AUDIO_OPTIMIZER_ENABLE,
+ TRUMPET_PARAM_AUDIO_OPTIMIZER_SET,
+ TRUMPET_PARAM_PROCESS_OPTIMIZER_ENABLE,
+ TRUMPET_PARAM_PROCESS_OPTIMIZER_SET,
+ TRUMPET_PARAM_IEQ_ENABLE,
+ TRUMPET_PARAM_IEQ_AMOUNT,
+ TRUMPET_PARAM_IEQ_SET,
+ TRUMPET_PARAM_OP_MODE,
+ TRUMPET_PARAM_DYNAMIC_PARAMETER,
+ TRUMPET_PARAM_INIT_INFO,
+ TRUMPET_PARAM_CENTER_SPREADING,
+ TRUMPET_PARAM_METADATA_PARAM,
+ TRUMPET_PARAM_CIDK_VALIDATE = 100,
+} qahw_trumpet_params_t;
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+
+#endif /*QAHW_EFFECT_TRUMPET_H_*/
diff --git a/qahw_api/src/qahw_api.cpp b/qahw_api/src/qahw_api.cpp
index 07d2678..a56387f 100644
--- a/qahw_api/src/qahw_api.cpp
+++ b/qahw_api/src/qahw_api.cpp
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
+* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -714,6 +714,17 @@
}
}
+int qahw_in_set_param_data(qahw_stream_handle_t *in_handle,
+ qahw_param_id param_id,
+ qahw_param_payload *payload)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ if (g_binder_enabled)
+ return -ENODEV;
+ else
+ return qahw_in_set_param_data_l(in_handle, param_id, payload);
+}
+
int qahw_in_set_parameters(qahw_stream_handle_t *in_handle, const char *kv_pairs)
{
ALOGV("%d:%s",__LINE__, __func__);
@@ -1001,6 +1012,16 @@
}
}
+int qahw_create_audio_patch_v2(qahw_module_handle_t *hw_module,
+ qahw_source_port_config_t *source_port_config,
+ qahw_sink_port_config_t *sink_port_config,
+ audio_patch_handle_t *handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_create_audio_patch_v2_l(hw_module, source_port_config,
+ sink_port_config, handle);
+}
+
int qahw_release_audio_patch(qahw_module_handle_t *hw_module,
audio_patch_handle_t handle)
{
@@ -1666,6 +1687,14 @@
return qahw_in_get_capture_position_l(in_handle, frames, time);
}
+int qahw_in_set_param_data(qahw_stream_handle_t *in_handle,
+ qahw_param_id param_id,
+ qahw_param_payload *payload)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_in_set_param_data_l(in_handle, param_id, payload);
+}
+
int qahw_init_check(const qahw_module_handle_t *hw_module)
{
ALOGV("%d:%s start",__LINE__, __func__);
@@ -1812,6 +1841,16 @@
handle);
}
+int qahw_create_audio_patch_v2(qahw_module_handle_t *hw_module,
+ qahw_source_port_config_t *source_port_config,
+ qahw_sink_port_config_t *sink_port_config,
+ audio_patch_handle_t *handle)
+{
+ ALOGV("%d:%s",__LINE__, __func__);
+ return qahw_create_audio_patch_v2_l(hw_module, source_port_config,
+ sink_port_config, handle);
+}
+
int qahw_release_audio_patch(qahw_module_handle_t *hw_module,
audio_patch_handle_t handle)
{