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

Commit a80bc46b authored by Mikhail Naganov's avatar Mikhail Naganov Committed by android-build-merger
Browse files

Merge "audio VTS: Fix parametrization for compressed formats"

am: bff764d9

Change-Id: I6c7d2dd527497f979aaad15d3bf4d5411c1bbf80
parents 61f69e10 bff764d9
Loading
Loading
Loading
Loading
+6 −16
Original line number Diff line number Diff line
@@ -83,7 +83,6 @@ const std::vector<DeviceConfigParameter>& getOutputDeviceConfigParameters() {
                    for (auto& config : configs) {
                        // Some combinations of flags declared in the config file require special
                        // treatment.
                        bool special = false;
                        if (flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) {
                            config.offloadInfo.sampleRateHz = config.sampleRateHz;
                            config.offloadInfo.channelMask = config.channelMask;
@@ -94,22 +93,13 @@ const std::vector<DeviceConfigParameter>& getOutputDeviceConfigParameters() {
                            config.offloadInfo.bitWidth = 16;
                            config.offloadInfo.bufferSize = 256;  // arbitrary value
                            config.offloadInfo.usage = AudioUsage::MEDIA;
                            result.emplace_back(
                                    device, config,
                                    AudioOutputFlag(AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD));
                            special = true;
                        }
                        if ((flags & AUDIO_OUTPUT_FLAG_DIRECT) &&
                            !(flags &
                              (AUDIO_OUTPUT_FLAG_HW_AV_SYNC | AUDIO_OUTPUT_FLAG_MMAP_NOIRQ))) {
                            result.emplace_back(device, config,
                                                AudioOutputFlag(AUDIO_OUTPUT_FLAG_DIRECT));
                            special = true;
                        }
                                                AudioOutputFlag(AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD |
                                                                AUDIO_OUTPUT_FLAG_DIRECT));
                        } else {
                            if (flags & AUDIO_OUTPUT_FLAG_PRIMARY) {  // ignore the flag
                                flags &= ~AUDIO_OUTPUT_FLAG_PRIMARY;
                            }
                        if (!special) {
                            result.emplace_back(device, config, AudioOutputFlag(flags));
                        }
                    }