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

Commit bad15107 authored by Mikhail Naganov's avatar Mikhail Naganov
Browse files

Add AUDIO_INPUT_FLAG_DIRECT to Audio HAL constants

This flag used to be framework only. To simplify constants
management it's better to have it defined at all layers.
Currently it is only used for MSD module but potentially
can be used for HDMI inputs.

Bug: 141273649
Test: use AOSP MSD on Pixel
      atest VtsHalAudioV6_0TargetTest

Change-Id: I19f6fdb2772878c93e41b635dc6adae83a9fecb0
parent b7a56c52
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -288,6 +288,10 @@ status_t DeviceHalHidl::openInputStream(
        if (status != OK) return status;
        sinkMetadata.tracks[0].destination.device(std::move(hidlOutputDevice));
    }
#endif
#if MAJOR_VERSION <= 5
    // Some flags were specific to framework and must not leak to the HAL.
    flags = static_cast<audio_input_flags_t>(flags & ~AUDIO_INPUT_FLAG_DIRECT);
#endif
    Return<void> ret = mDevice->openInputStream(
            handle,
+0 −3
Original line number Diff line number Diff line
@@ -2674,9 +2674,6 @@ sp<AudioFlinger::ThreadBase> AudioFlinger::openInput_l(audio_module_handle_t mod
        return 0;
    }

    // Some flags are specific to framework and must not leak to the HAL.
    flags = static_cast<audio_input_flags_t>(flags & ~AUDIO_INPUT_FRAMEWORK_FLAGS);

    // Audio Policy can request a specific handle for hardware hotword.
    // The goal here is not to re-open an already opened input.
    // It is to use a pre-assigned I/O handle.
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@
                     channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
        </mixPort>
        <!-- The HW AV Sync flag is not required, but is recommended -->
        <mixPort name="ms12 output" role="sink" flags="AUDIO_INPUT_FLAG_HW_AV_SYNC">
        <mixPort name="ms12 output" role="sink" flags="AUDIO_INPUT_FLAG_HW_AV_SYNC|AUDIO_INPUT_FLAG_DIRECT">
            <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                     samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
            <profile name="" format="AUDIO_FORMAT_AC3"