Merge "hal: add support to offload VORBIS, ALAC and APE formats"
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index b3812a8..3d157da 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -2875,7 +2875,7 @@
}
out->compr_config.fragments = COMPRESS_OFFLOAD_NUM_FRAGMENTS;
out->compr_config.codec->sample_rate =
- compress_get_alsa_rate(config->offload_info.sample_rate);
+ config->offload_info.sample_rate;
out->compr_config.codec->bit_rate =
config->offload_info.bit_rate;
out->compr_config.codec->ch_in =
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index e9780bc..a15d73d 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -104,6 +104,8 @@
/* fallback app type if the default app type from acdb loader fails */
#define DEFAULT_APP_TYPE 0x11130
+#define DEFAULT_APP_TYPE_RX_PATH 0x11130
+#define DEFAULT_APP_TYPE_TX_PATH 0x11132
/* Retry for delay in FW loading*/
#define RETRY_NUMBER 20
@@ -1693,6 +1695,11 @@
snd_device = usecase->in_snd_device;
acdb_dev_id = acdb_device_table[audio_extn_get_spkr_prot_snd_device(snd_device)];
+ // Do not use Rx path default app type for TX path
+ if ((usecase->type == PCM_CAPTURE) && (app_type == DEFAULT_APP_TYPE_RX_PATH)) {
+ ALOGD("Resetting app type for Tx path to default");
+ app_type = DEFAULT_APP_TYPE_TX_PATH;
+ }
if (acdb_dev_id < 0) {
ALOGE("%s: Could not find acdb id for device(%d)",
__func__, snd_device);