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

Commit 4cddf8b6 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "hal: Fix for Aaudio to pick proper usecase"

parents 40c14ae3 529a027e
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -8856,13 +8856,6 @@ 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*/
@@ -8937,6 +8930,13 @@ int adev_open_output_stream(struct audio_hw_device *dev,
                adev->haptics_config.channels = 1;
            } else
                adev->haptics_config.channels = audio_channel_count_from_out_mask(out->channel_mask & AUDIO_CHANNEL_HAPTIC_ALL);
        } 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 {
            /* primary path is the default path selected if no other outputs are available/suitable */
            out->usecase = GET_USECASE_AUDIO_PLAYBACK_PRIMARY(use_db_as_primary);