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
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index c394391..20862e7 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -207,7 +207,9 @@
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 ||
format == AUDIO_FORMAT_FLAC)
@@ -220,15 +222,14 @@
{
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;
case AUDIO_FORMAT_FLAC: