For Dolby media codecs to work, add this line in your media codecs config (should be in vendor partition) and make sure your device supports c2 codecs.
<Include href="media_codecs_dolby_audio.xml" />To build, add the Dolby effects in your device's audio effects config, then inherit the Dolby config by adding this in your device's makefile:
$(call inherit-product, hardware/dolby/dolby.mk)You may want to use
inherit-product-if-exists, otherwise building will terminate ifhardware/dolby/dolby.mkdoes not exist.
Now, moving HIDL definitions in manifest to device trees is completely absurd, so stop overriding manifests in your device trees. An example for such would be changing these in BoardConfig.mk of your device tree:
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE :=To:
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE +=Be sure to include the VINTF makefile after your BoardConfig.mk VINTF declarations.
include hardware/dolby/configs/vintf/config.mkUse
-includeinstead to prevent failure if hardware/dolby isn't present.
TARGET_BUILD_DOLBY_EFFECTS :=
TARGET_BUILD_DOLBY_CODECS :=
Both of these are set to true by default by dolby.mk if not overridden. If you only want to build the effects, set TARGET_BUILD_DOLBY_CODECS := false in your device tree and vice versa.