summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshish Jain <ashishj@codeaurora.org>2014-08-25 20:36:25 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2014-10-13 19:31:01 -0700
commit069d42eef9a0585255e0da7341667261058ce685 (patch)
treedf3d406dae0dfb9b318dbe2a53e199d4075f35fd
parentf2fadd4b6782930ed6b46439e2acec361845dd4a (diff)
downloadandroid_hardware_qcom_audio-069d42eef9a0585255e0da7341667261058ce685.tar.gz
android_hardware_qcom_audio-069d42eef9a0585255e0da7341667261058ce685.tar.bz2
android_hardware_qcom_audio-069d42eef9a0585255e0da7341667261058ce685.zip
hal: Update HAL to handle offload format with AAC profile info.
-Framework now passes AAC profile information alongwith the format. -Check for the supported AAC profiles by HW decoder. Change-Id: I5c0625d53f07c1d3374f2cbdf4848ef438883b2d
-rw-r--r--hal/audio_hw.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 0fd0aaeb..b405d769 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -195,7 +195,9 @@ static int check_and_set_gapless_mode(struct audio_device *adev) {
static bool is_supported_format(audio_format_t format)
{
if (format == AUDIO_FORMAT_MP3 ||
- format == AUDIO_FORMAT_AAC ||
+ format == AUDIO_FORMAT_AAC_LC ||
+ format == AUDIO_FORMAT_AAC_HE_V1 ||
+ format == AUDIO_FORMAT_AAC_HE_V2 ||
format == AUDIO_FORMAT_PCM_16_BIT_OFFLOAD ||
format == AUDIO_FORMAT_PCM_24_BIT_OFFLOAD)
return true;
@@ -207,15 +209,14 @@ static int get_snd_codec_id(audio_format_t format)
{
int id = 0;
- switch (format) {
+ switch (format & AUDIO_FORMAT_MAIN_MASK) {
case AUDIO_FORMAT_MP3:
id = SND_AUDIOCODEC_MP3;
break;
case AUDIO_FORMAT_AAC:
id = SND_AUDIOCODEC_AAC;
break;
- case AUDIO_FORMAT_PCM_16_BIT_OFFLOAD:
- case AUDIO_FORMAT_PCM_24_BIT_OFFLOAD:
+ case AUDIO_FORMAT_PCM_OFFLOAD:
id = SND_AUDIOCODEC_PCM;
break;
default: