Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df80f867 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "hal: Remove checks for 24 bit platform support"

parents 94d782cf 445f73c7
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -2671,11 +2671,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;

+0 −4
Original line number Diff line number Diff line
@@ -2281,10 +2281,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)
{
+0 −4
Original line number Diff line number Diff line
@@ -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)
{
+0 −17
Original line number Diff line number Diff line
@@ -2538,17 +2538,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)
{
@@ -2698,12 +2687,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;
+0 −1
Original line number Diff line number Diff line
@@ -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);