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

Commit ca4161df authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge changes from topic "aosp-default-wrapper" am: dbb12583

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1530606

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9d8752d7ae3e70f93040565252222eb5ad5551be
parents 3fe3f23a dbb12583
Loading
Loading
Loading
Loading
+2 −14
Original line number Original line Diff line number Diff line
@@ -76,19 +76,7 @@ struct HidlUtils {
                                         const char* halDeviceAddress, DeviceAddress* device);
                                         const char* halDeviceAddress, DeviceAddress* device);
#endif
#endif


#if MAJOR_VERSION <= 6
#if MAJOR_VERSION >= 7
    // Temporary versions for compatibility with forks of the default implementation.
    // Will be removed, do not use!
    static status_t audioConfigFromHal(const audio_config_t& halConfig, AudioConfig* config) {
        return audioConfigFromHal(halConfig, false /*isInput--ignored*/, config);
    }
    static std::unique_ptr<audio_port_config[]> audioPortConfigsToHal(
            const hidl_vec<AudioPortConfig>& configs) {
        std::unique_ptr<audio_port_config[]> halConfigs;
        (void)audioPortConfigsToHal(configs, &halConfigs);
        return halConfigs;
    }
#else  // V7 and above
    static status_t audioChannelMaskFromHal(audio_channel_mask_t halChannelMask, bool isInput,
    static status_t audioChannelMaskFromHal(audio_channel_mask_t halChannelMask, bool isInput,
                                            AudioChannelMask* channelMask);
                                            AudioChannelMask* channelMask);
    static status_t audioChannelMasksFromHal(const std::vector<std::string>& halChannelMasks,
    static status_t audioChannelMasksFromHal(const std::vector<std::string>& halChannelMasks,
@@ -138,7 +126,7 @@ struct HidlUtils {
                                               struct audio_port_config_device_ext* device,
                                               struct audio_port_config_device_ext* device,
                                               struct audio_port_config_mix_ext* mix,
                                               struct audio_port_config_mix_ext* mix,
                                               struct audio_port_config_session_ext* session);
                                               struct audio_port_config_session_ext* session);
#endif
#endif  // MAJOR_VERSION >= 7


    // V4 and below have DeviceAddress defined in the 'core' interface.
    // V4 and below have DeviceAddress defined in the 'core' interface.
    // To avoid duplicating code, the implementations of deviceAddressTo/FromHal
    // To avoid duplicating code, the implementations of deviceAddressTo/FromHal