From 376e38b36d14f48820436acfea1367d938501860 Mon Sep 17 00:00:00 2001 From: Dhananjay Kumar Date: Thu, 28 Sep 2017 22:26:23 +0530 Subject: [PATCH] hal: support five parallel compress record session Add two additional compress input usecases to support five parallel compressed record sessions. Change-Id: Iaddb4a7ec833ea1c5d5c1ce820a5b31080b6b75d --- hal/audio_extn/compress_in.c | 4 +++- hal/audio_hw.c | 2 ++ hal/audio_hw.h | 2 ++ hal/msm8916/platform.c | 5 +++++ hal/msm8974/platform.c | 4 ++++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/hal/audio_extn/compress_in.c b/hal/audio_extn/compress_in.c index 49997f51..305ed5bd 100644 --- a/hal/audio_extn/compress_in.c +++ b/hal/audio_extn/compress_in.c @@ -82,7 +82,9 @@ static unsigned int cin_usecases_state; static const audio_usecase_t cin_usecases[] = { USECASE_AUDIO_RECORD_COMPRESS2, USECASE_AUDIO_RECORD_COMPRESS3, - USECASE_AUDIO_RECORD_COMPRESS4 + USECASE_AUDIO_RECORD_COMPRESS4, + USECASE_AUDIO_RECORD_COMPRESS5, + USECASE_AUDIO_RECORD_COMPRESS6 }; static pthread_mutex_t cin_lock = PTHREAD_MUTEX_INITIALIZER; diff --git a/hal/audio_hw.c b/hal/audio_hw.c index 1de5484c..c7ebc96a 100644 --- a/hal/audio_hw.c +++ b/hal/audio_hw.c @@ -300,6 +300,8 @@ const char * const use_case_table[AUDIO_USECASE_MAX] = { [USECASE_AUDIO_RECORD_COMPRESS2] = "audio-record-compress2", [USECASE_AUDIO_RECORD_COMPRESS3] = "audio-record-compress3", [USECASE_AUDIO_RECORD_COMPRESS4] = "audio-record-compress4", + [USECASE_AUDIO_RECORD_COMPRESS5] = "audio-record-compress5", + [USECASE_AUDIO_RECORD_COMPRESS6] = "audio-record-compress6", [USECASE_AUDIO_RECORD_LOW_LATENCY] = "low-latency-record", [USECASE_AUDIO_RECORD_FM_VIRTUAL] = "fm-virtual-record", [USECASE_AUDIO_RECORD_MMAP] = "mmap-record", diff --git a/hal/audio_hw.h b/hal/audio_hw.h index 56ee9d02..ea2d40d7 100644 --- a/hal/audio_hw.h +++ b/hal/audio_hw.h @@ -147,6 +147,8 @@ enum { USECASE_AUDIO_RECORD_COMPRESS2, USECASE_AUDIO_RECORD_COMPRESS3, USECASE_AUDIO_RECORD_COMPRESS4, + USECASE_AUDIO_RECORD_COMPRESS5, + USECASE_AUDIO_RECORD_COMPRESS6, USECASE_AUDIO_RECORD_LOW_LATENCY, USECASE_AUDIO_RECORD_FM_VIRTUAL, USECASE_AUDIO_RECORD_HIFI, diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c index 2739ab5f..e0a51afb 100644 --- a/hal/msm8916/platform.c +++ b/hal/msm8916/platform.c @@ -336,6 +336,9 @@ int pcm_device_table[AUDIO_USECASE_MAX][2] = { [USECASE_AUDIO_RECORD_COMPRESS2] = {-1, -1}, [USECASE_AUDIO_RECORD_COMPRESS3] = {-1, -1}, [USECASE_AUDIO_RECORD_COMPRESS4] = {-1, -1}, + [USECASE_AUDIO_RECORD_COMPRESS5] = {-1, -1}, + [USECASE_AUDIO_RECORD_COMPRESS6] = {-1, -1}, + [USECASE_AUDIO_RECORD_LOW_LATENCY] = {LOWLATENCY_PCM_DEVICE, LOWLATENCY_PCM_DEVICE}, [USECASE_AUDIO_RECORD_FM_VIRTUAL] = {MULTIMEDIA2_PCM_DEVICE, @@ -884,6 +887,8 @@ static struct name_to_index usecase_name_index[AUDIO_USECASE_MAX] = { {TO_NAME_INDEX(USECASE_AUDIO_RECORD_COMPRESS2)}, {TO_NAME_INDEX(USECASE_AUDIO_RECORD_COMPRESS3)}, {TO_NAME_INDEX(USECASE_AUDIO_RECORD_COMPRESS4)}, + {TO_NAME_INDEX(USECASE_AUDIO_RECORD_COMPRESS5)}, + {TO_NAME_INDEX(USECASE_AUDIO_RECORD_COMPRESS6)}, {TO_NAME_INDEX(USECASE_AUDIO_RECORD_LOW_LATENCY)}, {TO_NAME_INDEX(USECASE_AUDIO_RECORD_MMAP)}, {TO_NAME_INDEX(USECASE_VOICE_CALL)}, diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c index 59472fc4..f40fab6d 100644 --- a/hal/msm8974/platform.c +++ b/hal/msm8974/platform.c @@ -313,6 +313,8 @@ static int pcm_device_table[AUDIO_USECASE_MAX][2] = { [USECASE_AUDIO_RECORD_COMPRESS2] = {-1, -1}, [USECASE_AUDIO_RECORD_COMPRESS3] = {-1, -1}, [USECASE_AUDIO_RECORD_COMPRESS4] = {-1, -1}, + [USECASE_AUDIO_RECORD_COMPRESS5] = {-1, -1}, + [USECASE_AUDIO_RECORD_COMPRESS6] = {-1, -1}, [USECASE_AUDIO_RECORD_LOW_LATENCY] = {LOWLATENCY_PCM_DEVICE, LOWLATENCY_PCM_DEVICE}, [USECASE_AUDIO_RECORD_FM_VIRTUAL] = {MULTIMEDIA2_PCM_DEVICE, @@ -849,6 +851,8 @@ static struct name_to_index usecase_name_index[AUDIO_USECASE_MAX] = { {TO_NAME_INDEX(USECASE_AUDIO_RECORD_COMPRESS2)}, {TO_NAME_INDEX(USECASE_AUDIO_RECORD_COMPRESS3)}, {TO_NAME_INDEX(USECASE_AUDIO_RECORD_COMPRESS4)}, + {TO_NAME_INDEX(USECASE_AUDIO_RECORD_COMPRESS5)}, + {TO_NAME_INDEX(USECASE_AUDIO_RECORD_COMPRESS6)}, {TO_NAME_INDEX(USECASE_AUDIO_RECORD_LOW_LATENCY)}, {TO_NAME_INDEX(USECASE_AUDIO_RECORD_MMAP)}, {TO_NAME_INDEX(USECASE_VOICE_CALL)},