[roll] Roll fuchsia Revert "[audio_core] Finalize new ReadLock semantics"

This reverts commit a8579d5c2d8b6544825df2a95241865938195dcd.

Reason for revert: http://fxb/95042 causing flakes in audio-policy-pipeline-test

Original change's description:
> [audio_core] Finalize new ReadLock semantics
>
> fxr/639969 defined new semantics for ReadLock. This CL enforces those
> semantics across audio_core. stream.h has been overwritten with
> stream2.h.
>
> The major changes are:
>
> 1. Subclasses now implement ReadLockImpl and TrimImpl instead of
>    ReadLock and Trim. This results in a bunch of small mechanical
>    changes across the code base.
>
> 2. EffectsStageV{1,2} are updated to meet the new semantics, including
>    ring out. Additionally, a number of bugs have been fixed (these bugs
>    were labeled TODOs in the old code). The two classes have essentially
>    identical implementations of ReadLockImpl and TrimImpl.
>
> 3. PacketQueue is updated to meet the new semantics. The old
>    implementation always returned the first packet in the queue, while
>    the new implementation intersects the first packet with the requested
>    range. Additionally, the new semantics make it easy to detect packet
>    underflows in PacketQueue -- this no longer happens in MixStage.
>
> 4. MixStage is updated to meet the new semantics, including ring out.
>    The old implementation had a lot of code to handle cases where the
>    source buffer was entirely in the past or entirely in the future.
>    Most of that code is obsolete with the new semantics, e.g., ReadLock
>    never returns a buffer "in the past". Since we can delete a lot of
>    code, I refactored MixStage::Mix to be (hopefully) simpler.
>
> This is a large CL. It's difficult to split this CL into smaller pieces
> without creating a temporary audio_core2 directory, which felt like
> overkill. To simpify the review, note that:
>
> - The review can be logically split into the four parts listed above
>   (EffectsStage, PacketQueue, MixStage, and everything else). You can
>   read and comment on one part at a time as if they are different CLs.
>
> - Since EffectsStageV{1,2} have essentially the same ReadLock code, I
>   suggest reviewing EffectsStageV1 carefully, then skim EffectsStage2.
>
> - stream2.h was moved into stream.h and the tempoary "::stream2"
>   namespace was removed. The diff looks large than reality because
>   Git/gerrit is unfortunately unable to recognize the file move.
>
> Other minor changes:
>
> - audio-capture-timestamp-validator was updated to use a shorter
>   impulse. Before this CL, the production effects added a long ramp-in
>   phase to each impulse, so to locate an impulse's leading edge, the
>   impulse needed to be wider than the ramp in (we used 35 frames).
>   After this CL, impulses have a short ramp-in phase. Wide impulses are
>   transformed to a short ramp in followed by a wave, and our existing
>   impulse detector is confused by this wave. To avoid this problem,
>   we've narrowed the impulse to 10 frames.
>
>   Note that this change to the production effects is WAI: this CL
>   actually fixes some long-standing bugs in effects handling. The
>   production effects should be more correct after this CL than before.
>
> Multiply: audio-core-fidelity-test
> Multiply: audio-renderer-pipeline-tests
> Multiply: audio-capturer-pipeline-tests
> Multiply: audio-policy-pipeline-tests
> Multiply: audio-clock-pipeline-tests
> Original-Fixed: 50669
> Original-Fixed: 73306
> Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/478521

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/654309
Original-Revision: 39dcd1598803022ab157207c66ba474c94453d59
GitOrigin-RevId: f9f040e19e92ef0624fb09e23a2221ef00fe660e
Change-Id: I79f0360d04167846d126fab7f9f6be2293f525be
1 file changed
tree: 6dc7ad481785b4fc282d3124b42dfd7d7928602d
  1. infra/
  2. third_party/
  3. cts
  4. firmware
  5. flower
  6. jiri.lock
  7. minimal
  8. prebuilts
  9. README.md
  10. stem
  11. test_durations
  12. toolchain
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia on Freenode.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.