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
This commit is contained in:
parent
8a0d03c974
commit
445f73c7d7
|
@ -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;
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue