hal: Add changes for dolby DS2
-Add device to back end mapping for APQ8084 and MSM8994.
-Set initialization info like sound card number, dmid
to ds2 dap hal.
-Add mixer control DS2 OnOff to enable or disable DS2
-A property "audio.dolby.ds2.enabled" is added to trigger
the mixer control.
-Reuse ds1 functions for checking dolby format and getting
sound codec id.
CRs-Fixed: 661095 661018
Conflicts:
hal/audio_hw.c
hal/msm8916/platform.c
Change-Id: Iff5fdc49249eb035c2ccde18e190ccc6c3ff632a
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index eb53f40..9e841df 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -210,6 +210,12 @@
STRING_TO_ENUM(AUDIO_CHANNEL_OUT_7POINT1),
};
+static const struct string_to_enum out_formats_name_to_enum_table[] = {
+ STRING_TO_ENUM(AUDIO_FORMAT_AC3),
+ STRING_TO_ENUM(AUDIO_FORMAT_E_AC3),
+ STRING_TO_ENUM(AUDIO_FORMAT_E_AC3_JOC),
+};
+
static struct audio_device *adev = NULL;
static pthread_mutex_t adev_init_lock;
static unsigned int audio_device_ref_count;
@@ -360,6 +366,7 @@
audio_extn_dolby_set_dmid(adev);
audio_extn_dolby_set_endpoint(adev);
#endif
+ audio_extn_dolby_ds2_set_endpoint(adev);
audio_extn_sound_trigger_update_stream_status(usecase, ST_EVENT_STREAM_BUSY);
audio_extn_listen_update_stream_status(usecase, LISTEN_EVENT_STREAM_BUSY);
audio_extn_utils_send_audio_calibration(adev, usecase);
@@ -3405,6 +3412,7 @@
adev->bt_wb_speech_enabled = false;
+ audio_extn_ds2_enable(adev);
*device = &adev->device.common;
audio_extn_utils_update_streams_output_cfg_list(adev->platform, adev->mixer,