Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

13 qpr3 #1

Open
wants to merge 21 commits into
base: tiramisu
Choose a base branch
from
Open

13 qpr3 #1

wants to merge 21 commits into from

Commits on May 27, 2023

  1. Force unsilence record clients on startInput

    We call startRecording unconditionally in startInput, so we must
    update the client state to be unsilenced (since we are treating as
    such). We subsequently re-update the silence state (with the client
    marked as active to dispatch ops) in updateUidStates_l.
    
    This fixes an issue where we call startRecording for a silenced client,
    then call it again when it moves to unsilenced when the client is active.
    Since startRecording is ref-counted, this leaves the client in the
    recording state leading to incorrect appop attributions.
    
    Bug: 279905816
    Bug: 281485019
    Test: Manual verification of repro cases + verbose log analysis
    (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e7720b379bfaba648ab6d85c4c2df6f03ec854d3)
    (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2951ad10a6641f9b3554d674877ad314e8cc011f)
    Merged-In: I31d50457ca8adae577407a28d4d4c0e8582bac5d
    Change-Id: I31d50457ca8adae577407a28d4d4c0e8582bac5d
    atneya authored and Android Build Coastguard Worker committed May 27, 2023
    Configuration menu
    Copy the full SHA
    a476924 View commit details
    Browse the repository at this point in the history
  2. Merge cherrypicks of ['googleplex-android-review.googlesource.com/232…

    …45979'] into tm-qpr3-release.
    
    Change-Id: Iaaa9e293de48fba89fb8d2fb2579685349a6e575
    Android Build Coastguard Worker committed May 27, 2023
    Configuration menu
    Copy the full SHA
    95be9ba View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2023

  1. [2/2] av: Remove restrictions for system audio record

    * Give freedom to screen recorder apps
    
    Change-Id: I726bde4f44bba6fc8cd771ae90c8864b26cdd919
    Signed-off-by: Edwiin Kusuma Jaya <[email protected]>
    jhenrique09 authored and skena678 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    6d96fc6 View commit details
    Browse the repository at this point in the history
  2. audiopolicy: Disable sonification on WFD sink

     * Aligned with CAF as of QSSI12, and removed unnecessary
       devices.isEmpty() check.
    
    Original patch:
    https://source.codeaurora.org/quic/la/platform/frameworks/av/commit/services/audiopolicy?h=LA.BR64.1.1.1-01010-8x16.0&id=9cc970fc512bedfa6a2cf03457d93609adc6eb85
    
    Change-Id: I9bad6a294ddd7aee72f6f6a314666b892b730c8e
    Signed-off-by: Edwiin Kusuma Jaya <[email protected]>
    Mingming Yin authored and skena678 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    75ad0f9 View commit details
    Browse the repository at this point in the history
  3. Revert "stagefright: remove Miracast sender code"

    This reverts commit d0a98fa.
    
    Change-Id: I0554b92c290c1ebbd1a40fc2edb43573a97d4f6a
    Signed-off-by: DennySPb <[email protected]>
    Signed-off-by: Kujou Yuko <[email protected]>
    Signed-off-by: Edwiin Kusuma Jaya <[email protected]>
    vladimiroltean authored and skena678 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    dd9e105 View commit details
    Browse the repository at this point in the history
  4. Revert "Removed unused class and its test"

    This adds back the SurfaceMediaSource class, needed for WFD.
    
    This reverts commit e885915.
    
    Change-Id: I3f67d01f18441e49205e2e263d20f0fb6fc91fe6
    Signed-off-by: Vladimir Oltean <[email protected]>
    Signed-off-by: DennySPb <[email protected]>
    Signed-off-by: Edwiin Kusuma Jaya <[email protected]>
    vladimiroltean authored and skena678 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    dc368f8 View commit details
    Browse the repository at this point in the history
  5. libstagefright: Remove libmediaextractor dependency

    Change-Id: Ifb564aafcf6f9bd45010500a589050b6577c0f7a
    Signed-off-by: DennySPb <[email protected]>
    Signed-off-by: Edwiin Kusuma Jaya <[email protected]>
    adithya2306 authored and skena678 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    02c20a1 View commit details
    Browse the repository at this point in the history
  6. libstagefright_wfd: compilation fixes

    * Among others, adapt to the ABuffer API changes in
      "f03606d9 Move MediaBufferXXX from foundation to libmediaextractor"
    
    Change-Id: Ie92fc035c6430f1458d45995a5b2627d0bc75122
    Signed-off-by: Vladimir Oltean <[email protected]>
    Signed-off-by: DennySPb <[email protected]>
    
    libstagefright_wfd: Adapt to A11 changes
    
    Change-Id: I69f13c93a68b1ad60e085000361331a3fdc98049
    Signed-off-by: DennySPb <[email protected]>
    
    libstagefright: Remove libmediaextractor dependency
    
    Change-Id: Ifb564aafcf6f9bd45010500a589050b6577c0f7a
    Signed-off-by: DennySPb <[email protected]>
    
    Remove libmediaextractor dependency from libstagefright_wfd
    
    Change-Id: I3d417d2f2ce468eb9d45f55f7818bb9a46348667
    Signed-off-by: DennySPb <[email protected]>
    
    libstagefright_wfd: Log MediaExtractor entry point to MediaMetrics
    
    Change-Id: Ic8fac2cd5ee4d3bb59804e69efc1d5c482aa2417
    
    Change-Id: Ie92fc035c6430f1458d45995a5b2627d0bc75122
    Signed-off-by: Edwiin Kusuma Jaya <[email protected]>
    vladimiroltean authored and skena678 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    cba0c42 View commit details
    Browse the repository at this point in the history
  7. stagefright: Fix SurfaceMediaSource getting handle from wrong positio…

    …n issue
    
    In function passMetadataBuffer_l, the bufferHandle(ANativeWindowBuffer) is
    saved to data (VideoNativeMetadata) but in function getMediaBufferHandle it
    gets the bufferHandle from (MediaBuffer*)buffer->data() + 4, which is a wrong
    position. To solve this problem, we should get handle from ANativeWindowBuffer,
    not from buffer->data() + 4. (If get bufferHandle from buffer->data() + 4, the
    function signalBufferReturned will print "returned buffer was not found in the
    current list" error.
    
    Test: Running wifi display, we can see the handle could be found in buffer list.
    
    Change-Id: I71ecf9e2bca1db67d8d6e862ac16b07e939bf521
    Signed-off-by: zhangbo_a <[email protected]>
    Signed-off-by: DennySPb <[email protected]>
    Signed-off-by: Edwiin Kusuma Jaya <[email protected]>
    zhangbo_a authored and skena678 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    76a59fc View commit details
    Browse the repository at this point in the history
  8. stagefright: Fix buffer handle retrieval in signalBufferReturned

    In commit 3e32878 the stagefright code was restructured to fix
    the logic for native handle source, but the change in the
    function SurfaceMediaSource::signalBufferReturned was probably
    missed.
    
    Try to compare the media buffer handle also to the current native
    buffer handle in this function when searching for correspondance.
    
    Change-Id: I352293e525f75dde500ac8e71ee49209710030c3
    Signed-off-by: DennySPb <[email protected]>
    Signed-off-by: Edwiin Kusuma Jaya <[email protected]>
    kholk authored and skena678 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    2c7d0e1 View commit details
    Browse the repository at this point in the history
  9. libstagefright_wfd: video encoder does not actually release MediaBuff…

    …erBase when done
    
    * This fixes buffer flow SurfaceMediaSource -> MediaPuller -> Converted
      freezing at mMediaBuffersAvailableCondition.wait(), due to this
      condition never being broadcast. This was supposed to happen from within
      SurfaceMediaSource::signalBufferReturned(), but this was never called.
      The Converter class does feedEncoderInputBuffers(), and after the
      encoder does its job, it should return the video buffer to the
      SurfaceMediaSource in ACodec::BaseState::onOMXEmptyBufferDone().
    * There (in ACodec class), the code for doing that used to be:
    
        // We're in "store-metadata-in-buffers" mode, the underlying
        // OMX component had access to data that's implicitly refcounted
        // by this "MediaBuffer" object. Now that the OMX component has
        // told us that it's done with the input buffer, we can decrement
        // the mediaBuffer's reference count.
        info->mData->setMediaBufferBase(NULL);
    
      This means that if there was already a MediaBufferBase assigned to
      this mediaBuffer, then it got released when explicitly setting it to NULL:
    
      void MediaCodecBuffer::setMediaBufferBase(MediaBufferBase *mediaBuffer) {
          if (mMediaBufferBase != NULL) {
              mMediaBufferBase->release();
          }
          mMediaBufferBase = mediaBuffer;
      }
    
      Then in MediaBuffer::release(), which is a subclass of
      MediaBufferBase, there is code that does
    
            mObserver->signalBufferReturned(this);
    
      This should have went on to call SurfaceMediaSource::signalBufferReturned(),
      as it was setting itself as observer on the buffers sent to the video
      encoder. Stay tuned to find out why the call path was broken.
    
    * Now, after Mr. Dongwon Kang's commit
      "f03606d9 Move MediaBufferXXX from foundation to libmediaextractor",
      the setMediaBufferBase and getMediaBufferBase functions no longer
      exist, and reference counting on MediaBuffer's is different.
      The direct replacement of setMediaBufferBase(mbuf) is now
      meta()->setObject("mediaBufferHolder", new MediaBufferHolder(mbuf)).
      The reference counting seems to now be managed through the constructor
      and destructor of this new MediaBufferHolder class (the code for
      release() is now in the holder's destructor). Now the issue seems to
      be that the lifetime of these new MediaBufferHolder's is not quite
      what it should be, because their destructor never gets called, hence
      the buffers never get returned.
    
    * This might be an API problem that Mr. Dongwon Kang himself acknowledged,
      since in the aforementioned patch, he forcefully called mbuf->release()
      right below a comment where it clearly said that "video encoder will
      release MediaBuffer when done with underlying data":
    
      https://android.googlesource.com/platform/frameworks/av/+/f03606d9034730bea1a394e6803f9ebc36f3d2eb%5E%21/#F13
    
    * Without addressing the root cause of the issue, in this commit we are
      simply mirroring a workaround for what appears to be broken media
      buffer reference counting.
    
    Change-Id: Ie540e6dcf5536f93091ced2af2e121b71f70bb83
    Signed-off-by: Vladimir Oltean <[email protected]>
    Signed-off-by: DennySPb <[email protected]>
    Signed-off-by: Edwiin Kusuma Jaya <[email protected]>
    vladimiroltean authored and skena678 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    61e7ecd View commit details
    Browse the repository at this point in the history
  10. audioflinger: Fix audio for WifiDisplay

    AudioFlinger is not able to determine the correct
    pid/tid for WifiDisplay and thus we do not pass checks
    for CAPTURE_AUDIO_OUTPUT and RECORD_AUDIO permissions.
    
    To fix audio for WifiDisplay, it should be safe to
    always allow a trusted calling uid (AID_MEDIA which
    has the same perms as AID_AUDIOSERVER).
    
    Change-Id: Ifa46d8e77a43027645cad02a04263b58e134c3ad
    Signed-off-by: Edwiin Kusuma Jaya <[email protected]>
    myfluxi authored and skena678 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    debb801 View commit details
    Browse the repository at this point in the history
  11. Partial revert "Move unused classes out of stagefright foundataion"

    This imports the old foundation code in the standard platform stagefright.
    The foundation variant is used in VNDK, we can't change the ABI there.
    
    This reverts commit 5ec3d6a.
    
    Change-Id: Iebcf5d89a768fdb830bea90fbf2c2427a4c3d139
    Signed-off-by: DennySPb <[email protected]>
    Signed-off-by: Luca Stefani <[email protected]>
    Signed-off-by: Edwiin Kusuma Jaya <[email protected]>
    nicorg2515 authored and skena678 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    dcd886d View commit details
    Browse the repository at this point in the history
  12. Add group audio to vendor.media.omx service

    Resolves Qualcomm libs trying to access e.g. /dev/msm_alac and failing.
    
    Referred from: https://source.codeaurora.org/quic/la/platform/frameworks/av/commit?id=150662d
    
    Test: run vts -m VtsHalMediaOmxV1_0TargetAudioDecTest
    Change-Id: I28dcc07c00f41ab542b24725d767227854f1b7c9
    Signed-off-by: Edwiin Kusuma Jaya <[email protected]>
    lweiss-fairphone authored and skena678 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    1f8feaf View commit details
    Browse the repository at this point in the history
  13. codec2: add smoothfactor when checking n-th work

    pipeline watcher's queued work counter included smoothfactor, if we
    don't add it in elapsed(), it is easy to cause CCodec queue call timeout
    
    CRs-Fixed: 2984012
    Test: Verified on OnePlus 9 that YouTube video does
          not unpause itself.
    Change-Id: Ia2dbf3a7cf0da4805398cf44780ad3dacbaf1a1b
    Signed-off-by: Edwiin Kusuma Jaya <[email protected]>
    Jiajia Cong authored and skena678 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    c6774d8 View commit details
    Browse the repository at this point in the history
  14. Revert "Remove libavservices_minijail_vendor"

    Older device vendor blobs still depend on this.
    
    This reverts commit a036035.
    
    Change-Id: I15a5d75a8731586e59a6600eb782332ab6844ad5
    Signed-off-by: Edwiin Kusuma Jaya <[email protected]>
    mikeNG authored and skena678 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    b329a38 View commit details
    Browse the repository at this point in the history
  15. WifiDisplaySource: raise supported resolution to 1920x1080p60

    Signed-off-by: Chenyang Zhong <[email protected]>
    Change-Id: I5ab5e594c030be032353344600c67f6d0d36e7f2
    Signed-off-by: Edwiin Kusuma Jaya <[email protected]>
    jjpprrrr authored and skena678 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    815c302 View commit details
    Browse the repository at this point in the history
  16. Camera: Skip stream size check for whitelisted apps

    This is a squash of the following CLO commits:
    
    commit 84b2ea267f2b5a5b8925758ab8f9e9f0db4f6d53
    Author: Pavan Kumar Mc <[email protected]>
    Date:   Fri Nov 12 21:21:46 2021 +0530
    
        Camera: Avoid roundBufferDimensionsNearest for AIDE2 YUV streams
    
        - AIDE2 is vendor enhanced feature which needs special resolutions
          for full and downscaled YUV streams.Those resolutions are not
          populated in static capabilities. So avoid roundBufferDimensionsNearest
          for YUV streams in privileged client case.
    
        CRs-Fixed: 3012886
    
        Change-Id: Ia1d134edd1fac2ffd454137aa2a4aa5b9d40c7a7
    
    commit 35df5effc321d630e711161fba02614f0c61abdd
    Author: Pavan Kumar Mc <[email protected]>
    Date:   Tue Aug 17 10:28:21 2021 +0530
    
        Camera: Support raw stream creation for priviledged APPs
    
        - Raw stream creation failing as priviledged APP check set to FALSE
          for new set of call flow to roundBufferDimensionNearest. Setting
          the condition to TRUE.
    
        CRs-Fixed: 3011444
    
        Change-Id: Ia3d5e4744a78b06c00e99fb5be856b24acbff599
    
    commit 573cb73a1c6c4a8bf13791b98c5d539ebffa2d0f
    Author: Pavan Kumar Mc <[email protected]>
    Date:   Thu Jun 24 11:19:35 2021 +0530
    
        Camera: Master callback mode support for MCX raw
    
        - Raw stream creation failing for size greater than logical
          camera resolution as size cannot exceed max raw stream size
          in available stream configuration.
    
        - Allow creating raw streams of greater size for logical camera
    
        CRs-Fixed: 2968932
    
        Change-Id: Ibacc3c72e34b2f137546288f67bcdb4e0a38aa23
    
    commit 15de50a2fe471e7d3cc498286f0de31282303fb0
    Author: Pavan Kumar Mc <[email protected]>
    Date:   Wed Apr 21 17:59:46 2021 +0530
    
        Camera: Master callback mode support for MCX raw
    
        - Raw stream creation failing for size greater than logical
          camera resolution as size cannot exceed max raw stream size
          in available stream configuration.
    
        - Allow creating raw streams of greater size for logical camera
    
        CRs-Fixed: 2860300
    
        Change-Id: Ic0f99e55b1519596e49ff2af14895cea1a19c752
    
    commit cee145eaaf32faf0b99f46f957a9fb6ad66abccf
    Author: Gaoxiang Chen <[email protected]>
    Date:   Wed Jun 21 12:57:08 2017 +0530
    
        Camera: Skip stream size check for whitelisted apps.
    
        Issue:
        For quadracfa capture, Blob/YUV output streams need to be
        configured with custom dimensions which will not be available
        in advertised stream configurations map.
    
        Fix:
        Skip the stream size check for whitelisted apps to allow
        configuration of streams with custom dimensions.
    
        Setprop to be used:
        adb shell setprop persist.vendor.camera.privapp.list <pack1,pack2>
    
        Change-Id: Id94b40c94f42bf4579dc6d8bb6273003312ea669
    
    Change-Id: If12f9696fbc78edbd5fb4345a48818fa5d74752f
    Signed-off-by: Adithya R <[email protected]>
    Signed-off-by: Edwiin Kusuma Jaya <[email protected]>
    ArianK16a authored and skena678 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    4f8c2ff View commit details
    Browse the repository at this point in the history
  17. Camera: Avoid roundBufferDimensionsNearest also for HAL_PIXEL_FORMAT_…

    …BLOB
    
    This fixes the Ultra-Res feature with Motorolas MotCamera3
    It uses multiple camera streams, with only the blob format using the
    full sensor size (e.g. on berlin: 12000 x 9000 for 108 MP)
    
    [ghostrider-reborn]
    - Xiaomi devices also seem to use this, with MiuiCamera (tested
      with 64 MP mode on lisa, 48 MP on ginkgo etc.)
    
    Change-Id: I025e068b2d3ff1123599ae5655655876ee28f39b
    Signed-off-by: Adithya R <[email protected]>
    Signed-off-by: Edwiin Kusuma Jaya <[email protected]>
    SGCMarkus authored and skena678 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    6228e1e View commit details
    Browse the repository at this point in the history
  18. Revert "Revert "Remove libavservices_minijail_vendor""

    This reverts commit b02a11a.
    
    Signed-off-by: Edwiin Kusuma Jaya <[email protected]>
    basamaryan authored and skena678 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    afd6b4d View commit details
    Browse the repository at this point in the history
  19. av: fix callinguid

    Signed-off-by: Edwiin Kusuma Jaya <[email protected]>
    kutemeikito authored and skena678 committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    b16f9f8 View commit details
    Browse the repository at this point in the history