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

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

libaudiohal: Fix initialization of SinkMetadata for HAL V7

Since 'RecordTrackMetadata.channelMask' is a non-optional field,
it must be initialized with a channel mask.

Bug: 171260360
Test: atest audio_health_tests
Change-Id: I8b9378064cd8660d64d7f58fe94377f89e92be45
parent 210105af
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -265,6 +265,10 @@ status_t DeviceHalHidl::openInputStream(
    (void)outputDevice;
    (void)outputDeviceAddress;
#else
#if MAJOR_VERSION >= 7
    (void)HidlUtils::audioChannelMaskFromHal(
            AUDIO_CHANNEL_NONE, true /*isInput*/, &sinkMetadata.tracks[0].channelMask);
#endif
    if (outputDevice != AUDIO_DEVICE_NONE) {
        DeviceAddress hidlOutputDevice;
        if (status_t status = CoreUtils::deviceAddressFromHal(