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

Commit 4f069973 authored by sasevs's avatar sasevs
Browse files

hal: fixing wrong usecase picking for aiff format



Fix for AIFF and PCM format to pick compress-offload-playback2.

Change-Id: I99a37cfbf51fd19b0b018f427153fa9f849ace8c
Suggested-by: default avatarBhargavi Belagod Manjunatha <bbelagod@qti.qualcomm.com>
parent 2e7dda21
Loading
Loading
Loading
Loading
+7 −8
Original line number Diff line number Diff line
@@ -8462,14 +8462,6 @@ int adev_open_output_stream(struct audio_hw_device *dev,
        out->config.period_size = HDMI_MULTI_PERIOD_BYTES / (out->config.channels *
                                                         audio_bytes_per_sample(config->format));
        out->config.format = pcm_format_from_audio_format(out->format);
    } else if ((!(out->flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD)) &&
                compare_device_type(&out->device_list, AUDIO_DEVICE_OUT_BUS)) {
            ret = audio_extn_auto_hal_open_output_stream(out);
            if (ret) {
                ALOGE("%s: Failed to open output stream for bus device", __func__);
                ret = -EINVAL;
                goto error_open;
            }
     }else if ((out->flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) ||
               (out->flags == AUDIO_OUTPUT_FLAG_DIRECT)) {
        pthread_mutex_lock(&adev->lock);
@@ -8864,6 +8856,13 @@ int adev_open_output_stream(struct audio_hw_device *dev,
                audio_channel_count_from_out_mask(out->channel_mask);
        out->config.format = pcm_format_from_audio_format(out->format);
        adev->voice_tx_output = out;
    } else if (compare_device_type(&out->device_list, AUDIO_DEVICE_OUT_BUS)) {
            ret = audio_extn_auto_hal_open_output_stream(out);
            if (ret) {
                ALOGE("%s: Failed to open output stream for bus device", __func__);
                ret = -EINVAL;
                goto error_open;
            }
    } else {
        unsigned int channels = 0;
        /*Update config params to default if not set by the caller*/