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

Commit 9c3fe83d authored by Ben Murdoch's avatar Ben Murdoch
Browse files

AAC: Don't fail configuration on older HALs

Older HAL may not support OMX_IndexParamAudioAndroidAacDrcPresentation.
In that case, don't fail with an error, just skip configuration.

Bug: 195659779
Test: Manual, test AAC playback on GSI with Q vendor.
Change-Id: I5049039fdd5adb2205a223940ffe629c6669ae1a
parent 918f4ad2
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
@@ -5363,9 +5363,7 @@ status_t ACodec::getPortFormat(OMX_U32 portIndex, sp<AMessage> &notify) {
                            err = mOMXNode->getParameter(
                                    (OMX_INDEXTYPE)OMX_IndexParamAudioAndroidAacDrcPresentation,
                                    &presentation, sizeof(presentation));
                            if (err != OK) {
                                return err;
                            }
                            if (err == OK) {
                                notify->setInt32("aac-encoded-target-level",
                                                 presentation.nEncodedTargetLevel);
                                notify->setInt32("aac-drc-cut-level", presentation.nDrcCut);
@@ -5374,12 +5372,14 @@ status_t ACodec::getPortFormat(OMX_U32 portIndex, sp<AMessage> &notify) {
                                                 presentation.nHeavyCompression);
                                notify->setInt32("aac-target-ref-level",
                                                 presentation.nTargetReferenceLevel);
                            notify->setInt32("aac-drc-effect-type", presentation.nDrcEffectType);
                                notify->setInt32("aac-drc-effect-type",
                                                 presentation.nDrcEffectType);
                                notify->setInt32("aac-drc-album-mode", presentation.nDrcAlbumMode);
                                notify->setInt32("aac-drc-output-loudness",
                                                 presentation.nDrcOutputLoudness);
                            }
                        }
                    }
                    break;
                }