sm7125: configuration for spatial audio

Update audio configuration to enable spatial audio:
- build with spatial audio feature enabled and rondo library
- list spatializer effect in audio effect configuration file
- update audio policy configuration files to declare spatializer output
- declare immersive end point in audio platform configuration

Bug: 237677573
Test: spatial audio playback
Change-Id: Ic9c32d813a19ba2789425e12ee9016d53ab30678
Signed-off-by: Pulkit077 <pulkitagarwal2k1@gmail.com>
tirimbino
Eric Laurent 3 years ago committed by Jens Lody
parent f064762ef6
commit 90c9b9d34d
  1. 4
      audio/configs/audio_effects.xml
  2. 10
      audio/configs/audio_policy_configuration.xml
  3. 44
      audio/configs/bluetooth_audio_policy_configuration.xml
  4. 2
      common.mk
  5. 3
      proprietary-files.txt
  6. 1
      vendor.prop

@ -41,7 +41,7 @@
<library name="volume_listener" path="libvolumelistener.so"/>
<library name="audiosphere" path="libasphere.so"/>
<library name="shoebox" path="libshoebox.so"/>
<library name="spatializer" path="libswspatializer.so"/>
<library name="spatializer" path="libspatialaudio.so"/>
</libraries>
<effects>
<effectProxy name="bassboost" library="proxy" uuid="14804144-a5ee-4d24-aa88-0002a5d5c51b">
@ -89,7 +89,7 @@
<effect name="notification_helper" library="volume_listener" uuid="0b776dde-0590-11e5-81ba-0025b32654a0"/>
<effect name="audiosphere" library="audiosphere" uuid="184e62ab-2d19-4364-9d1b-c0a40733866c"/>
<effect name="shoebox" library="shoebox" uuid="1eab784c-1a36-4b2a-b7fc-e34c44cab89e"/>
<effect name="spatializer" library="spatializer" uuid="ccd4cf09-a79d-46c2-9aae-06a1698d6c8f"/>
<effect name="spatializer" library="spatializer" uuid="cc4677de-ff72-11eb-9a03-0242ac130003"/>
</effects>
<postprocess>
<stream type="music">

@ -112,6 +112,10 @@
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
<mixPort name="immersive_out" role="source" flags="AUDIO_OUTPUT_FLAG_SPATIALIZER">
<profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
<mixPort name="hifi_playback" role="source" />
<mixPort name="hifi_input" role="sink" />
</mixPorts>
@ -214,9 +218,9 @@
<route type="mix" sink="Wired Headphones"
sources="primary output,deep_buffer,fast,compressed_offload,mmap_no_irq_out"/>
<route type="mix" sink="USB Device Out"
sources="primary output,deep_buffer,fast,direct_pcm,compressed_offload,mmap_no_irq_out,hifi_playback"/>
sources="primary output,deep_buffer,fast,direct_pcm,compressed_offload,mmap_no_irq_out,hifi_playback,immersive_out"/>
<route type="mix" sink="USB Headset Out"
sources="primary output,deep_buffer,fast,direct_pcm,compressed_offload,mmap_no_irq_out,hifi_playback"/>
sources="primary output,deep_buffer,fast,direct_pcm,compressed_offload,mmap_no_irq_out,hifi_playback,immersive_out"/>
<route type="mix" sink="usb_surround_sound"
sources="USB Device In,USB Headset In"/>
<route type="mix" sink="hifi_input"
@ -248,7 +252,7 @@
<xi:include href="r_submix_audio_policy_configuration.xml"/>
<!-- Bluetooth Audio HAL -->
<xi:include href="bluetooth_audio_policy_configuration.xml"/>
<xi:include href="/vendor/etc/bluetooth_audio_policy_configuration.xml"/>
<!-- USB Audio HAL -->
<module name="usb" halVersion="2.0">

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Bluetooth Audio HAL Audio Policy Configuration file -->
<module name="bluetooth" halVersion="2.0">
<mixPorts>
<!-- A2DP Audio Ports -->
<mixPort name="a2dp output" role="source" flags="AUDIO_OUTPUT_FLAG_SPATIALIZER"/>
<!-- Hearing AIDs Audio Ports -->
<mixPort name="hearing aid output" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="24000 16000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
</mixPorts>
<devicePorts>
<!-- A2DP Audio Ports -->
<devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100 48000 88200 96000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="BT A2DP Headphones" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100 48000 88200 96000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="BT A2DP Speaker" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100 48000 88200 96000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<!-- Hearing AIDs Audio Ports -->
<devicePort tagName="BT Hearing Aid Out" type="AUDIO_DEVICE_OUT_HEARING_AID" role="sink"/>
</devicePorts>
<routes>
<route type="mix" sink="BT A2DP Out"
sources="a2dp output"/>
<route type="mix" sink="BT A2DP Headphones"
sources="a2dp output"/>
<route type="mix" sink="BT A2DP Speaker"
sources="a2dp output"/>
<route type="mix" sink="BT Hearing Aid Out"
sources="hearing aid output"/>
</routes>
</module>

@ -97,9 +97,9 @@ PRODUCT_COPY_FILES += \
$(COMMON_PATH)/audio/configs/mixer_usb_gray.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_usb_gray.xml \
$(COMMON_PATH)/audio/configs/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml \
$(COMMON_PATH)/audio/configs/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml \
$(COMMON_PATH)/audio/configs/bluetooth_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration.xml \
frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration.xml \
frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration.xml \
frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml

@ -116,6 +116,9 @@ vendor/lib64/soundfx/libshoebox.so
vendor/lib64/soundfx/libqcbassboost.so
vendor/lib64/soundfx/libswspatializer.so
# Audio (FX modules) - from cheetah-user 13 TQ2A.230405.003.E1 9802792 release-keys
vendor/lib/soundfx/libspatialaudio.so|379b98b020729d05cad4e84202f42335b96bb755
# Audio Firmware
vendor/firmware/dax_param.bin

@ -61,6 +61,7 @@ vendor.audio.feature.audiozoom.enable=false
vendor.audio.feature.incall_music.enable=true
ro.config.media_vol_steps=30
ro.config.vc_call_vol_steps=8
ro.audio.spatializer_enabled=true
# Bluetooth
persist.vendor.bt.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aac-ldac

Loading…
Cancel
Save