audio: Add dedicated streams for VoIP call
Add dedicated streams for VoIP usecase. This includes adding
a new direct output and input types that use audio playback
and record paths respectively. It falls back to compress VoIP
wherever this feature is not applicable.
Change-Id: I9b7654819b9d8deb00f8888fbfc31f0fbbae5266
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index d423919..3ffacb8 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -345,6 +345,9 @@
[USECASE_AUDIO_PLAYBACK_EXT_DISP_SILENCE] = {MULTIMEDIA9_PCM_DEVICE, -1},
[USECASE_AUDIO_TRANSCODE_LOOPBACK] = {TRANSCODE_LOOPBACK_RX_DEV_ID, TRANSCODE_LOOPBACK_TX_DEV_ID},
+ [USECASE_AUDIO_PLAYBACK_VOIP] = {AUDIO_PLAYBACK_VOIP_PCM_DEVICE, AUDIO_PLAYBACK_VOIP_PCM_DEVICE},
+ [USECASE_AUDIO_RECORD_VOIP] = {AUDIO_RECORD_VOIP_PCM_DEVICE, AUDIO_RECORD_VOIP_PCM_DEVICE},
+
};
/* Array to store sound devices */
@@ -984,9 +987,7 @@
list_for_each(node, &adev->usecase_list) {
usecase = node_to_item(node, struct audio_usecase, list);
- if (usecase != NULL &&
- usecase->type == PCM_PLAYBACK &&
- usecase->stream.out->devices & AUDIO_DEVICE_OUT_SPEAKER) {
+ if (usecase != NULL && usecase->type == PCM_PLAYBACK) {
int new_snd_device[2] = {0};
int i, num_devices = 1;