summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmit Shekhar <ashekhar@codeaurora.org>2014-10-16 14:33:15 -0700
committerAmit Shekhar <ashekhar@codeaurora.org>2014-10-16 15:03:23 -0700
commit445f73c7d77851c323ac284581e67718d7d5edfb (patch)
treedb8b394a3bc5e99c80ef2ca5a4bb6592ade5325d
parent8a0d03c974c3f2752d865069ca8ef12d7ceb0f0a (diff)
downloadandroid_hardware_qcom_audio-445f73c7d77851c323ac284581e67718d7d5edfb.tar.gz
android_hardware_qcom_audio-445f73c7d77851c323ac284581e67718d7d5edfb.tar.bz2
android_hardware_qcom_audio-445f73c7d77851c323ac284581e67718d7d5edfb.zip
hal: Remove checks for 24 bit platform support
Check for 24 bit in HAL is not needed as the check for 24 bit platform support is achieved through flags in frameworks. Change-Id: Icc590dfc1c4b831399435c19dd505ddebf6503cd
-rw-r--r--hal/audio_hw.c5
-rw-r--r--hal/msm8916/platform.c4
-rw-r--r--hal/msm8960/platform.c4
-rw-r--r--hal/msm8974/platform.c17
-rw-r--r--hal/platform_api.h1
5 files changed, 0 insertions, 31 deletions
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 627900bb..f88282c4 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -2577,11 +2577,6 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
out->compr_config.codec->format = SNDRV_PCM_FORMAT_S24_LE;
}
- if (out->bit_width == 24 && !platform_check_24_bit_support()) {
- ALOGW("24 bit support is not enabled, using 16 bit backend");
- out->compr_config.codec->format = SNDRV_PCM_FORMAT_S16_LE;
- }
-
if (config->offload_info.format == AUDIO_FORMAT_FLAC)
out->compr_config.codec->options.flac_dec.sample_size = PCM_OUTPUT_BIT_WIDTH;
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index 2bca793d..f1dd6ccb 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -2275,10 +2275,6 @@ uint32_t platform_get_pcm_offload_buffer_size(audio_offload_info_t* info)
return fragment_size;
}
-bool platform_check_24_bit_support() {
- return false;
-}
-
bool platform_check_and_set_codec_backend_cfg(struct audio_device* adev __unused,
struct audio_usecase *usecase __unused)
{
diff --git a/hal/msm8960/platform.c b/hal/msm8960/platform.c
index e2c30f4b..eea10dad 100644
--- a/hal/msm8960/platform.c
+++ b/hal/msm8960/platform.c
@@ -1030,10 +1030,6 @@ bool platform_listen_usecase_needs_event(audio_usecase_t uc_id __unused)
return false;
}
-bool platform_check_24_bit_support() {
- return false;
-}
-
bool platform_check_and_set_codec_backend_cfg(struct audio_device* adev __unused,
struct audio_usecase *usecase __unused)
{
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 92c80bd1..b9c32ecb 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -2421,17 +2421,6 @@ uint32_t platform_get_pcm_offload_buffer_size(audio_offload_info_t* info)
return fragment_size;
}
-bool platform_check_24_bit_support() {
-
- char value[PROPERTY_VALUE_MAX] = {0};
- property_get("audio.offload.24bit.enable", value, "0");
- if (atoi(value)) {
- ALOGW("Property audio.offload.24bit.enable is set");
- return true;
- }
- return false;
-}
-
int platform_set_codec_backend_cfg(struct audio_device* adev,
unsigned int bit_width, unsigned int sample_rate)
{
@@ -2581,12 +2570,6 @@ bool platform_check_codec_backend_cfg(struct audio_device* adev,
bool platform_check_and_set_codec_backend_cfg(struct audio_device* adev, struct audio_usecase *usecase)
{
- // check if 24bit configuration is enabled first
- if (!platform_check_24_bit_support()) {
- ALOGW("24bit not enable, no need to check for backend change");
- return false;
- }
-
ALOGV("platform_check_and_set_codec_backend_cfg usecase = %d",usecase->id );
unsigned int new_bit_width, old_bit_width;
diff --git a/hal/platform_api.h b/hal/platform_api.h
index b11a0c7c..520b27b2 100644
--- a/hal/platform_api.h
+++ b/hal/platform_api.h
@@ -89,7 +89,6 @@ uint32_t platform_get_compress_offload_buffer_size(audio_offload_info_t* info);
uint32_t platform_get_pcm_offload_buffer_size(audio_offload_info_t* info);
bool platform_check_and_set_codec_backend_cfg(struct audio_device* adev, struct audio_usecase *usecase);
-bool platform_check_24_bit_support();
int platform_get_usecase_index(const char * usecase);
int platform_set_usecase_pcm_id(audio_usecase_t usecase, int32_t type, int32_t pcm_id);
void platform_set_echo_reference(void *platform, bool enable);