Enable Channel Mixing for DISCRETE with differing counts [chromium/src : main]

0 views
Skip to first unread message

Syed AbuTalib (Gerrit)

unread,
Apr 20, 2026, 4:51:14 PM (10 days ago) Apr 20
to Thomas Guilbert, Chromium LUCI CQ, chromium...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
Attention needed from Syed AbuTalib and Thomas Guilbert

Syed AbuTalib voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Syed AbuTalib
  • Thomas Guilbert
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
Gerrit-Change-Number: 7759235
Gerrit-PatchSet: 13
Gerrit-Owner: Syed AbuTalib <low...@google.com>
Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
Gerrit-Attention: Syed AbuTalib <low...@google.com>
Gerrit-Attention: Thomas Guilbert <tgui...@chromium.org>
Gerrit-Comment-Date: Mon, 20 Apr 2026 20:51:09 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Thomas Guilbert (Gerrit)

unread,
Apr 20, 2026, 5:11:39 PM (10 days ago) Apr 20
to Syed AbuTalib, Thomas Guilbert, Chromium LUCI CQ, chromium...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
Attention needed from Syed AbuTalib

Thomas Guilbert added 5 comments

Commit Message
Line 13, Patchset 13 (Latest):Also, the unittest file was optimized for testing out a max of stereo
(2) layout, had to do a substantial rewrite in order to account for
higher channel counts. The changes include:
* Use ChannelMixingMatrix and precompute the output channel values
* Added convenience method `IsOutputChannelSilent()` to loop through all input channels
* Updated the WhichFlow enum
* Moved to a generic `GetFrequencyForChannel()` rather than having a left and right channel methods
* Added convenience method `VerifyTonesAt()` to loop through all the output channels
* Added convenience method `VerifySilenceInRange()` to loop through all the output channels for silence
* Updated tests to handle more than Stereo
* Added more TestParams, notably including cases such as 5.1 and differing `DISCRETE` cases (i.e. 1 vs 7).
Thomas Guilbert . unresolved

This is too much detail for the CL description. Folks should look at the actual CL for this.

At a high level, list the coverage you improved, rather than the list of mechanical changes made in the CL.

File services/audio/snooper_node_unittest.cc
Line 108, Patchset 13 (Latest): if (GetExpectedGain(in_ch, out_ch) >
std::numeric_limits<double>::epsilon()) {
Thomas Guilbert . unresolved

Necessary to use this precision rather than `!= 0`?

There might be a clearer std::ranges::all_of or equivalent expression here too.

Line 211, Patchset 13 (Latest): GetFrequencyForChannel(WhichFlow::kInput));
Thomas Guilbert . unresolved

This loses some test coverage. Before, there was a distinct frequency for L/R, to identify the mixing worked correctly. Now, there won't be any way to know whether the L channel was copied to L and R accidentally, or if the R channel is dropped when downmixing to mono.

I know this is harder with the multi-channel configs (having 8 distinct frequencies to track would be hard, and you'd have to choose those carefully).

Maybe the full mixing is covered (or should be covered) by other UTs. Maybe we should keep some basic mixing check (e.g. L channel versus all other channels).

Line 263, Patchset 13 (Latest): if (expected_vol <= std::numeric_limits<double>::epsilon()) {
Thomas Guilbert . unresolved

Is this overkill vs `== 0.0`?

Line 737, Patchset 13 (Latest): testing::Values(
MakeParams(media::ChannelLayoutConfig::Stereo(),
48000,
480,
media::ChannelLayoutConfig::Stereo(),
48000,
480),
MakeParams(media::ChannelLayoutConfig::Stereo(),
48000,
64,
media::ChannelLayoutConfig::Stereo(),
48000,
480),
MakeParams(media::ChannelLayoutConfig::Stereo(),
44100,
64,
media::ChannelLayoutConfig::Stereo(),
48000,
480),
MakeParams(media::ChannelLayoutConfig::Stereo(),
48000,
512,
media::ChannelLayoutConfig::Stereo(),
44100,
441),
MakeParams(media::ChannelLayoutConfig::Mono(),
8000,
64,
media::ChannelLayoutConfig::Stereo(),
48000,
480),
MakeParams(media::ChannelLayoutConfig::Stereo(),
48000,
480,
media::ChannelLayoutConfig::Mono(),
8000,
80),
MakeParams(
media::ChannelLayoutConfig::FromLayout(media::CHANNEL_LAYOUT_5_1),
48000,
480,
media::ChannelLayoutConfig::FromLayout(media::CHANNEL_LAYOUT_5_1),
48000,
480),
MakeParams(
media::ChannelLayoutConfig::FromLayout(media::CHANNEL_LAYOUT_5_1),
48000,
480,
media::ChannelLayoutConfig::Stereo(),
48000,
480),
MakeParams(
media::ChannelLayoutConfig(media::CHANNEL_LAYOUT_DISCRETE, 1),
48000,
480,
media::ChannelLayoutConfig(media::CHANNEL_LAYOUT_DISCRETE, 7),
48000,
480)));
Thomas Guilbert . unresolved

Any way to clean this up? Most of the params are identical. It might be worth creating a "base param" and more varied helpers.

Maybe a builder pattern... I will send an example offline.

Open in Gerrit

Related details

Attention is currently required from:
  • Syed AbuTalib
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
    Gerrit-Change-Number: 7759235
    Gerrit-PatchSet: 13
    Gerrit-Owner: Syed AbuTalib <low...@google.com>
    Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
    Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
    Gerrit-Attention: Syed AbuTalib <low...@google.com>
    Gerrit-Comment-Date: Mon, 20 Apr 2026 21:11:33 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Syed AbuTalib (Gerrit)

    unread,
    Apr 20, 2026, 6:25:11 PM (10 days ago) Apr 20
    to Thomas Guilbert, Chromium LUCI CQ, chromium...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
    Attention needed from Thomas Guilbert

    Syed AbuTalib added 5 comments

    Commit Message
    Line 13, Patchset 13:Also, the unittest file was optimized for testing out a max of stereo

    (2) layout, had to do a substantial rewrite in order to account for
    higher channel counts. The changes include:
    * Use ChannelMixingMatrix and precompute the output channel values
    * Added convenience method `IsOutputChannelSilent()` to loop through all input channels
    * Updated the WhichFlow enum
    * Moved to a generic `GetFrequencyForChannel()` rather than having a left and right channel methods
    * Added convenience method `VerifyTonesAt()` to loop through all the output channels
    * Added convenience method `VerifySilenceInRange()` to loop through all the output channels for silence
    * Updated tests to handle more than Stereo
    * Added more TestParams, notably including cases such as 5.1 and differing `DISCRETE` cases (i.e. 1 vs 7).
    Thomas Guilbert . resolved

    This is too much detail for the CL description. Folks should look at the actual CL for this.

    At a high level, list the coverage you improved, rather than the list of mechanical changes made in the CL.

    Syed AbuTalib

    Done

    File services/audio/snooper_node_unittest.cc
    Line 108, Patchset 13: if (GetExpectedGain(in_ch, out_ch) >
    std::numeric_limits<double>::epsilon()) {
    Thomas Guilbert . resolved

    Necessary to use this precision rather than `!= 0`?

    There might be a clearer std::ranges::all_of or equivalent expression here too.

    Syed AbuTalib

    Just wanted to try out epsilon, comparing to 0.0 still works. I think `none_of ch[] > 0.0` is cleaner than `all_of ch[] != 0`, so going to do that instead. Marking as resolved.

    Line 211, Patchset 13: GetFrequencyForChannel(WhichFlow::kInput));
    Thomas Guilbert . unresolved

    This loses some test coverage. Before, there was a distinct frequency for L/R, to identify the mixing worked correctly. Now, there won't be any way to know whether the L channel was copied to L and R accidentally, or if the R channel is dropped when downmixing to mono.

    I know this is harder with the multi-channel configs (having 8 distinct frequencies to track would be hard, and you'd have to choose those carefully).

    Maybe the full mixing is covered (or should be covered) by other UTs. Maybe we should keep some basic mixing check (e.g. L channel versus all other channels).

    Syed AbuTalib

    In my head I wanted to have [ChannelMixingMatrix verify correct mixing values](https://source.chromium.org/chromium/chromium/src/+/main:media/base/channel_mixing_matrix_unittest.cc) and have SnooperNode not worry about it, which is why I was fine with losing this coverage (also I tried 8 distinct freq but ran into slightly off values with [ComputeAmplitudeAt](https://source.chromium.org/chromium/chromium/src/+/main:services/audio/test/fake_consumer.cc;l=90;drc=fd1c7384931d505896bf0f20eb0c02117a3ed851). I think to bring back the 'original coverage' we could check for L vs *all* other channels. wdyt?

    Line 263, Patchset 13: if (expected_vol <= std::numeric_limits<double>::epsilon()) {
    Thomas Guilbert . resolved

    Is this overkill vs `== 0.0`?

    Syed AbuTalib

    Done

    Line 737, Patchset 13: testing::Values(
    Thomas Guilbert . resolved

    Any way to clean this up? Most of the params are identical. It might be worth creating a "base param" and more varied helpers.

    Maybe a builder pattern... I will send an example offline.

    Syed AbuTalib

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Thomas Guilbert
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
    Gerrit-Change-Number: 7759235
    Gerrit-PatchSet: 15
    Gerrit-Owner: Syed AbuTalib <low...@google.com>
    Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
    Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
    Gerrit-Attention: Thomas Guilbert <tgui...@chromium.org>
    Gerrit-Comment-Date: Mon, 20 Apr 2026 22:25:02 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Thomas Guilbert <tgui...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Thomas Guilbert (Gerrit)

    unread,
    Apr 20, 2026, 6:52:58 PM (10 days ago) Apr 20
    to Syed AbuTalib, android-bu...@system.gserviceaccount.com, Thomas Guilbert, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
    Attention needed from Syed AbuTalib

    Thomas Guilbert added 2 comments

    File services/audio/snooper_node_unittest.cc
    Line 211, Patchset 13: GetFrequencyForChannel(WhichFlow::kInput));
    Thomas Guilbert . unresolved

    This loses some test coverage. Before, there was a distinct frequency for L/R, to identify the mixing worked correctly. Now, there won't be any way to know whether the L channel was copied to L and R accidentally, or if the R channel is dropped when downmixing to mono.

    I know this is harder with the multi-channel configs (having 8 distinct frequencies to track would be hard, and you'd have to choose those carefully).

    Maybe the full mixing is covered (or should be covered) by other UTs. Maybe we should keep some basic mixing check (e.g. L channel versus all other channels).

    Syed AbuTalib

    In my head I wanted to have [ChannelMixingMatrix verify correct mixing values](https://source.chromium.org/chromium/chromium/src/+/main:media/base/channel_mixing_matrix_unittest.cc) and have SnooperNode not worry about it, which is why I was fine with losing this coverage (also I tried 8 distinct freq but ran into slightly off values with [ComputeAmplitudeAt](https://source.chromium.org/chromium/chromium/src/+/main:services/audio/test/fake_consumer.cc;l=90;drc=fd1c7384931d505896bf0f20eb0c02117a3ed851). I think to bring back the 'original coverage' we could check for L vs *all* other channels. wdyt?

    Thomas Guilbert

    Having `ChannelMixingMatrix` verify correct mixing makes sense, as long as it does verify that correct mixing.

    Maybe keeping 1 simple stereo test as a guardrail would be worth it.

    I'm not surprised that `ComputeAmplitudeAt` runs into issues... The 8 frequencies would have to be relatively prime to each other (e.g. checking the amplitude of a 600hz could be affected by mixing in some 200hz from another channel), and there needs to be enough frames to contain the period of each frequency.

    Line 715, Patchset 16:class TestParamsBuilder {
    Thomas Guilbert . unresolved

    Discussed offline: only build `AudioParameters` rather than `InputAndOutputParams`

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Syed AbuTalib
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
    Gerrit-Change-Number: 7759235
    Gerrit-PatchSet: 16
    Gerrit-Owner: Syed AbuTalib <low...@google.com>
    Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
    Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
    Gerrit-Attention: Syed AbuTalib <low...@google.com>
    Gerrit-Comment-Date: Mon, 20 Apr 2026 22:52:50 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Syed AbuTalib <low...@google.com>
    Comment-In-Reply-To: Thomas Guilbert <tgui...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Syed AbuTalib (Gerrit)

    unread,
    Apr 20, 2026, 7:30:22 PM (10 days ago) Apr 20
    to android-bu...@system.gserviceaccount.com, Thomas Guilbert, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
    Attention needed from Thomas Guilbert

    Syed AbuTalib added 2 comments

    File services/audio/snooper_node_unittest.cc
    Line 211, Patchset 13: GetFrequencyForChannel(WhichFlow::kInput));
    Thomas Guilbert . resolved

    This loses some test coverage. Before, there was a distinct frequency for L/R, to identify the mixing worked correctly. Now, there won't be any way to know whether the L channel was copied to L and R accidentally, or if the R channel is dropped when downmixing to mono.

    I know this is harder with the multi-channel configs (having 8 distinct frequencies to track would be hard, and you'd have to choose those carefully).

    Maybe the full mixing is covered (or should be covered) by other UTs. Maybe we should keep some basic mixing check (e.g. L channel versus all other channels).

    Syed AbuTalib

    In my head I wanted to have [ChannelMixingMatrix verify correct mixing values](https://source.chromium.org/chromium/chromium/src/+/main:media/base/channel_mixing_matrix_unittest.cc) and have SnooperNode not worry about it, which is why I was fine with losing this coverage (also I tried 8 distinct freq but ran into slightly off values with [ComputeAmplitudeAt](https://source.chromium.org/chromium/chromium/src/+/main:services/audio/test/fake_consumer.cc;l=90;drc=fd1c7384931d505896bf0f20eb0c02117a3ed851). I think to bring back the 'original coverage' we could check for L vs *all* other channels. wdyt?

    Thomas Guilbert

    Having `ChannelMixingMatrix` verify correct mixing makes sense, as long as it does verify that correct mixing.

    Maybe keeping 1 simple stereo test as a guardrail would be worth it.

    I'm not surprised that `ComputeAmplitudeAt` runs into issues... The 8 frequencies would have to be relatively prime to each other (e.g. checking the amplitude of a 600hz could be affected by mixing in some 200hz from another channel), and there needs to be enough frames to contain the period of each frequency.

    Syed AbuTalib

    Added a new unittest labeled `StereoIsMixedCorrectly`.

    Line 715, Patchset 16:class TestParamsBuilder {
    Thomas Guilbert . resolved

    Discussed offline: only build `AudioParameters` rather than `InputAndOutputParams`

    Syed AbuTalib

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Thomas Guilbert
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
      Gerrit-Change-Number: 7759235
      Gerrit-PatchSet: 18
      Gerrit-Owner: Syed AbuTalib <low...@google.com>
      Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
      Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
      Gerrit-Attention: Thomas Guilbert <tgui...@chromium.org>
      Gerrit-Comment-Date: Mon, 20 Apr 2026 23:30:17 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Thomas Guilbert (Gerrit)

      unread,
      Apr 20, 2026, 8:47:27 PM (10 days ago) Apr 20
      to Syed AbuTalib, android-bu...@system.gserviceaccount.com, Thomas Guilbert, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
      Attention needed from Syed AbuTalib

      Thomas Guilbert added 5 comments

      File media/base/channel_layout.cc
      Line 221, Patchset 18 (Latest): // Check that FeatureList is available as a protection against early startup
      // crashes.
      if (base::FeatureList::GetInstance() &&
      Thomas Guilbert . unresolved

      If you're seeing this crash in the wild, better to fix it in its own CL.

      Is there something missing from the test environment otherwise?

      File services/audio/snooper_node_unittest.cc
      Line 184, Patchset 18 (Latest): enum class WhichFlow {
      kInput,
      kSwappedInput,
      kOutput,
      kSwappedOutput,
      };

      double GetFrequencyForChannel(WhichFlow flow) const {
      switch (flow) {
      case WhichFlow::kInput:
      case WhichFlow::kOutput:
      return 500.0;
      case WhichFlow::kSwappedInput:
      case WhichFlow::kSwappedOutput:
      return 1200.0;
      }
      }
      Thomas Guilbert . unresolved

      Now that all channels contain the same frequency, you would just use two constants directly?

      Line 206, Patchset 18 (Latest): channels_with_tones_.push_back(ch);
      Thomas Guilbert . unresolved

      Will `channels_with_tones_` always contain `0 ... ch-1`? Could you use input channels directly instead?

      Line 778, Patchset 18 (Latest): int frames_;
      };
      Thomas Guilbert . unresolved

      Please fix this WARNING reported by ClangTidy: check: modernize-use-default-member-init

      use default member initializer for 'fr...

      check: modernize-use-default-member-init

      use default member initializer for 'frames_' (https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-default-member-init.html)

      (Note: You can add `Skip-Clang-Tidy-Checks: modernize-use-default-member-init` footer to the CL description to skip the check)

      (Lint observed on `android-clang-tidy-rel`, but not on `linux-clang-tidy-rel`)

      Line 794, Patchset 18 (Latest): MakeParams(BaseParams(), BaseParams()),
      Thomas Guilbert . unresolved

      Optional: consider adding a string param and a [NameGenerator](https://google.github.io/googletest/reference/testing.html#TYPED_TEST_SUITE) which makes it easier to figure out which test case is failing.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Syed AbuTalib
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
        Gerrit-Change-Number: 7759235
        Gerrit-PatchSet: 18
        Gerrit-Owner: Syed AbuTalib <low...@google.com>
        Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
        Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
        Gerrit-Attention: Syed AbuTalib <low...@google.com>
        Gerrit-Comment-Date: Tue, 21 Apr 2026 00:47:20 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Syed AbuTalib (Gerrit)

        unread,
        Apr 20, 2026, 9:30:32 PM (10 days ago) Apr 20
        to android-bu...@system.gserviceaccount.com, Thomas Guilbert, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
        Attention needed from Thomas Guilbert

        Syed AbuTalib added 4 comments

        File media/base/channel_layout.cc
        Line 221, Patchset 18: // Check that FeatureList is available as a protection against early startup

        // crashes.
        if (base::FeatureList::GetInstance() &&
        Thomas Guilbert . unresolved

        If you're seeing this crash in the wild, better to fix it in its own CL.

        Is there something missing from the test environment otherwise?

        Syed AbuTalib

        This isn't seen in the wild. It's an issue where media/ is accessed before FeatureList is registered.
        ```
        [2284348:2284348:FATAL:base/feature_list.cc:110] Check failed: !feature. Accessed feature EnableHighChannelLayouts before FeatureList registration.
        ```

        File services/audio/snooper_node_unittest.cc
        Line 184, Patchset 18: enum class WhichFlow {

        kInput,
        kSwappedInput,
        kOutput,
        kSwappedOutput,
        };

        double GetFrequencyForChannel(WhichFlow flow) const {
        switch (flow) {
        case WhichFlow::kInput:
        case WhichFlow::kOutput:
        return 500.0;
        case WhichFlow::kSwappedInput:
        case WhichFlow::kSwappedOutput:
        return 1200.0;
        }
        }
        Thomas Guilbert . resolved

        Now that all channels contain the same frequency, you would just use two constants directly?

        Syed AbuTalib

        Done

        Line 206, Patchset 18: channels_with_tones_.push_back(ch);
        Thomas Guilbert . resolved

        Will `channels_with_tones_` always contain `0 ... ch-1`? Could you use input channels directly instead?

        Syed AbuTalib

        Done

        Line 778, Patchset 18: int frames_;
        };
        Thomas Guilbert . resolved

        Please fix this WARNING reported by ClangTidy: check: modernize-use-default-member-init

        use default member initializer for 'fr...

        check: modernize-use-default-member-init

        use default member initializer for 'frames_' (https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-default-member-init.html)

        (Note: You can add `Skip-Clang-Tidy-Checks: modernize-use-default-member-init` footer to the CL description to skip the check)

        (Lint observed on `android-clang-tidy-rel`, but not on `linux-clang-tidy-rel`)

        Syed AbuTalib

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Thomas Guilbert
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
        Gerrit-Change-Number: 7759235
        Gerrit-PatchSet: 19
        Gerrit-Owner: Syed AbuTalib <low...@google.com>
        Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
        Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
        Gerrit-Attention: Thomas Guilbert <tgui...@chromium.org>
        Gerrit-Comment-Date: Tue, 21 Apr 2026 01:30:24 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Thomas Guilbert <tgui...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Thomas Guilbert (Gerrit)

        unread,
        Apr 20, 2026, 9:40:14 PM (10 days ago) Apr 20
        to Syed AbuTalib, android-bu...@system.gserviceaccount.com, Thomas Guilbert, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
        Attention needed from Syed AbuTalib

        Thomas Guilbert added 3 comments

        File media/base/channel_layout.cc
        Line 221, Patchset 18: // Check that FeatureList is available as a protection against early startup
        // crashes.
        if (base::FeatureList::GetInstance() &&
        Thomas Guilbert . unresolved

        If you're seeing this crash in the wild, better to fix it in its own CL.

        Is there something missing from the test environment otherwise?

        Syed AbuTalib

        This isn't seen in the wild. It's an issue where media/ is accessed before FeatureList is registered.
        ```
        [2284348:2284348:FATAL:base/feature_list.cc:110] Check failed: !feature. Accessed feature EnableHighChannelLayouts before FeatureList registration.
        ```

        Thomas Guilbert

        See other comment. You might be missing something in the test fixture.

        Otherwise, the crash might be avoided, but you might always use 8 channels.

        File services/audio/snooper_node_unittest.cc
        Line 305, Patchset 19 (Latest): std::vector<std::vector<double>> expected_mix_matrix_;
        Thomas Guilbert . unresolved

        Should this be private?

        Line 308, Patchset 19 (Latest): scoped_refptr<base::TestMockTimeTaskRunner> task_runner_;
        Thomas Guilbert . unresolved

        Does adding a `base::test::TaskEnvironment task_environment_` or a `base::test::ScopedFeatureList feature_list_` here fix the `base::Feature` crash? Note that these should be the first thing declared to make sure they are constructed first.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Syed AbuTalib
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
        Gerrit-Change-Number: 7759235
        Gerrit-PatchSet: 19
        Gerrit-Owner: Syed AbuTalib <low...@google.com>
        Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
        Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
        Gerrit-Attention: Syed AbuTalib <low...@google.com>
        Gerrit-Comment-Date: Tue, 21 Apr 2026 01:40:07 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Syed AbuTalib (Gerrit)

        unread,
        Apr 21, 2026, 1:53:56 PM (9 days ago) Apr 21
        to android-bu...@system.gserviceaccount.com, Thomas Guilbert, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
        Attention needed from Thomas Guilbert

        Syed AbuTalib added 2 comments

        File services/audio/snooper_node_unittest.cc
        Line 305, Patchset 19: std::vector<std::vector<double>> expected_mix_matrix_;
        Thomas Guilbert . resolved

        Should this be private?

        Syed AbuTalib

        Done

        Line 308, Patchset 19: scoped_refptr<base::TestMockTimeTaskRunner> task_runner_;
        Thomas Guilbert . unresolved

        Does adding a `base::test::TaskEnvironment task_environment_` or a `base::test::ScopedFeatureList feature_list_` here fix the `base::Feature` crash? Note that these should be the first thing declared to make sure they are constructed first.

        Syed AbuTalib

        I've tried adding the `TaskEnvironment`, `ScopedFeatureList` with an `.InitAndEnableFeature()` call, and both at the same time (including swapping the order) as the first member variable (above task runner). Still hitting the same check. Maybe I have to configure something with `TaskEnvironment`?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Thomas Guilbert
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
        Gerrit-Change-Number: 7759235
        Gerrit-PatchSet: 20
        Gerrit-Owner: Syed AbuTalib <low...@google.com>
        Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
        Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
        Gerrit-Attention: Thomas Guilbert <tgui...@chromium.org>
        Gerrit-Comment-Date: Tue, 21 Apr 2026 17:53:49 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Thomas Guilbert <tgui...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Thomas Guilbert (Gerrit)

        unread,
        Apr 21, 2026, 2:03:03 PM (9 days ago) Apr 21
        to Syed AbuTalib, android-bu...@system.gserviceaccount.com, Thomas Guilbert, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
        Attention needed from Syed AbuTalib

        Thomas Guilbert added 1 comment

        File services/audio/snooper_node_unittest.cc
        Line 308, Patchset 19: scoped_refptr<base::TestMockTimeTaskRunner> task_runner_;
        Thomas Guilbert . unresolved

        Does adding a `base::test::TaskEnvironment task_environment_` or a `base::test::ScopedFeatureList feature_list_` here fix the `base::Feature` crash? Note that these should be the first thing declared to make sure they are constructed first.

        Syed AbuTalib

        I've tried adding the `TaskEnvironment`, `ScopedFeatureList` with an `.InitAndEnableFeature()` call, and both at the same time (including swapping the order) as the first member variable (above task runner). Still hitting the same check. Maybe I have to configure something with `TaskEnvironment`?

        Thomas Guilbert

        I wonder if it's called during the test param construction then...

        I'm worried about the case where two calls to `GetConcurrentMaxChannels()` would yield different results. The first runs into `!base::FeatureList::GetInstance()` and returns 8 before the feature subsystem is initialized, and the next returns 12.

        If it's just tests, that's fine, but it might have other implications in production... However, I don't think we would run into this issue in production.

        You will need a second reviewer for this CL anyways (I don't own `services/audio/*`) so maybe they'll have an idea?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Syed AbuTalib
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
        Gerrit-Change-Number: 7759235
        Gerrit-PatchSet: 20
        Gerrit-Owner: Syed AbuTalib <low...@google.com>
        Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
        Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
        Gerrit-Attention: Syed AbuTalib <low...@google.com>
        Gerrit-Comment-Date: Tue, 21 Apr 2026 18:02:55 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Daniel Cheng (Gerrit)

        unread,
        Apr 22, 2026, 4:20:48 AM (9 days ago) Apr 22
        to Syed AbuTalib, Daniel Cheng, android-bu...@system.gserviceaccount.com, Thomas Guilbert, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
        Attention needed from Syed AbuTalib

        Daniel Cheng added 2 comments

        File media/base/channel_layout.cc
        Line 221, Patchset 18: // Check that FeatureList is available as a protection against early startup
        // crashes.
        if (base::FeatureList::GetInstance() &&
        Thomas Guilbert . unresolved

        If you're seeing this crash in the wild, better to fix it in its own CL.

        Is there something missing from the test environment otherwise?

        Syed AbuTalib

        This isn't seen in the wild. It's an issue where media/ is accessed before FeatureList is registered.
        ```
        [2284348:2284348:FATAL:base/feature_list.cc:110] Check failed: !feature. Accessed feature EnableHighChannelLayouts before FeatureList registration.
        ```

        Thomas Guilbert

        See other comment. You might be missing something in the test fixture.

        Otherwise, the crash might be avoided, but you might always use 8 channels.

        Daniel Cheng

        This is because we have a static initializer/global constructor (which btw is banned in Chrome :)

        We should fix it.

        File services/audio/snooper_node_unittest.cc
        Line 308, Patchset 19: scoped_refptr<base::TestMockTimeTaskRunner> task_runner_;
        Thomas Guilbert . unresolved

        Does adding a `base::test::TaskEnvironment task_environment_` or a `base::test::ScopedFeatureList feature_list_` here fix the `base::Feature` crash? Note that these should be the first thing declared to make sure they are constructed first.

        Syed AbuTalib

        I've tried adding the `TaskEnvironment`, `ScopedFeatureList` with an `.InitAndEnableFeature()` call, and both at the same time (including swapping the order) as the first member variable (above task runner). Still hitting the same check. Maybe I have to configure something with `TaskEnvironment`?

        Thomas Guilbert

        I wonder if it's called during the test param construction then...

        I'm worried about the case where two calls to `GetConcurrentMaxChannels()` would yield different results. The first runs into `!base::FeatureList::GetInstance()` and returns 8 before the feature subsystem is initialized, and the next returns 12.

        If it's just tests, that's fine, but it might have other implications in production... However, I don't think we would run into this issue in production.

        You will need a second reviewer for this CL anyways (I don't own `services/audio/*`) so maybe they'll have an idea?

        Daniel Cheng

        This ended up being rather fascinating.

        The root cause of this is SnnoperNodeTest is parameterized, and some of the test parameters are initialized by calling `media::ChannelLayoutConfig::FromLayout()`.

        This ends up reaching `ChannelLayoutToChannelCount()`, which, of course, needs the feature flag.

        This also happens quite early in gtest initialization:
        ```
        1 services_unittests 0x0000000109aded60 base::debug::StackTrace::StackTrace(unsigned long) + 224
        2 services_unittests 0x0000000106683d54 _ZZN5media24GetConcurrentMaxChannelsEvENK3$_0clEv + 64
        3 services_unittests 0x0000000106683e90 media::ChannelLayoutToChannelCount(media::ChannelLayout) + 280
        4 services_unittests 0x000000010573fe4c audio::(anonymous namespace)::gtest_AllSnooperNodeTest_EvalGenerator_() + 700
        5 services_unittests 0x0000000105746968 testing::internal::ParameterizedTestSuiteInfo<audio::(anonymous namespace)::SnooperNodeTest>::RegisterTests() + 280
        6 services_unittests 0x0000000106581758 testing::internal::UnitTestImpl::PostFlagParsingInit() + 156
        7 services_unittests 0x0000000106583804 void testing::internal::InitGoogleTestImpl<char>(int*, char**) + 364
        8 services_unittests 0x000000010af18788 base::(anonymous namespace)::InitGoogleTestChar(int*, char**) + 24
        9 services_unittests 0x0000000104d8ede4 base::OnceCallback<void ()>::Run() && + 108
        10 services_unittests 0x000000010af1855c base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, unsigned long, bool, base::RepeatingCallback<void ()>, base::OnceCallback<void ()>) + 812
        11 services_unittests 0x000000010af1820c base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>, unsigned long) + 236
        12 services_unittests 0x0000000105678230 main + 444
        13 dyld 0x00000001889b3da4 start + 6992
        ```

        Feature flags actually aren't initialized until a bit later (for tests, this usually happens in https://source.chromium.org/chromium/chromium/src/+/main:base/test/test_suite.cc;l=650;drc=869d94f8d790d8e41aa248d18d83557853374dbf, I think). But the failing test in question is a **multiprocess** test, and its `main()` initializes a new feature list:
        https://source.chromium.org/chromium/chromium/src/+/main:services/tracing/public/cpp/trace_startup_shared_memory_unittest.cc;l=67;drc=b1397794111b060e366651f989f1b4386cbed797

        There is a lot of [complex interactions between `FeatureList` and tests](https://source.chromium.org/chromium/chromium/src/+/main:base/feature_list.cc;l=626;drc=9aa846e4cb63098be56ba090a1d7dd328287da71), but in short, I think in tests, there are probably edge cases where we don't warn on feature access where we should.

        I think the best solution here is to avoid creating parameterized types that depend on feature list flags, directly or indirectly. So defer the creation of the audio input params/output params (and thus `ChannelLayoutConfig`) until the test fixture is constructed; at that point, all the feature list machinery is live.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Syed AbuTalib
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
        Gerrit-Change-Number: 7759235
        Gerrit-PatchSet: 20
        Gerrit-Owner: Syed AbuTalib <low...@google.com>
        Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
        Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
        Gerrit-CC: Daniel Cheng <dch...@chromium.org>
        Gerrit-Comment-Date: Wed, 22 Apr 2026 08:20:39 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Syed AbuTalib (Gerrit)

        unread,
        Apr 22, 2026, 2:22:13 PM (8 days ago) Apr 22
        to Daniel Cheng, android-bu...@system.gserviceaccount.com, Thomas Guilbert, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
        Attention needed from Thomas Guilbert

        Syed AbuTalib added 2 comments

        File media/base/channel_layout.cc
        Line 221, Patchset 18: // Check that FeatureList is available as a protection against early startup
        // crashes.
        if (base::FeatureList::GetInstance() &&
        Thomas Guilbert . resolved

        If you're seeing this crash in the wild, better to fix it in its own CL.

        Is there something missing from the test environment otherwise?

        Syed AbuTalib

        This isn't seen in the wild. It's an issue where media/ is accessed before FeatureList is registered.
        ```
        [2284348:2284348:FATAL:base/feature_list.cc:110] Check failed: !feature. Accessed feature EnableHighChannelLayouts before FeatureList registration.
        ```

        Thomas Guilbert

        See other comment. You might be missing something in the test fixture.

        Otherwise, the crash might be avoided, but you might always use 8 channels.

        Daniel Cheng

        This is because we have a static initializer/global constructor (which btw is banned in Chrome :)

        We should fix it.

        Syed AbuTalib

        I removed this `base::FeatureList::GetInstance()` call by delaying the construction of AudioParameters in the tests.

        File services/audio/snooper_node_unittest.cc
        Line 308, Patchset 19: scoped_refptr<base::TestMockTimeTaskRunner> task_runner_;
        Thomas Guilbert . resolved
        Syed AbuTalib

        Wow, amazing work on figuring out this issue! I agree with deferring creation of AudioParameters, passing an AudioParametersBuilder around and calling .Build() when needed. Thanks for taking a look!

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Thomas Guilbert
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
        Gerrit-Change-Number: 7759235
        Gerrit-PatchSet: 21
        Gerrit-Owner: Syed AbuTalib <low...@google.com>
        Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
        Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
        Gerrit-CC: Daniel Cheng <dch...@chromium.org>
        Gerrit-Attention: Thomas Guilbert <tgui...@chromium.org>
        Gerrit-Comment-Date: Wed, 22 Apr 2026 18:22:07 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Syed AbuTalib <low...@google.com>
        Comment-In-Reply-To: Thomas Guilbert <tgui...@chromium.org>
        Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Daniel Cheng (Gerrit)

        unread,
        Apr 22, 2026, 2:43:56 PM (8 days ago) Apr 22
        to Syed AbuTalib, Daniel Cheng, android-bu...@system.gserviceaccount.com, Thomas Guilbert, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
        Attention needed from Thomas Guilbert

        Daniel Cheng added 1 comment

        File media/base/channel_layout.cc
        Line 221, Patchset 18: // Check that FeatureList is available as a protection against early startup
        // crashes.
        if (base::FeatureList::GetInstance() &&
        Thomas Guilbert . resolved

        If you're seeing this crash in the wild, better to fix it in its own CL.

        Is there something missing from the test environment otherwise?

        Syed AbuTalib

        This isn't seen in the wild. It's an issue where media/ is accessed before FeatureList is registered.
        ```
        [2284348:2284348:FATAL:base/feature_list.cc:110] Check failed: !feature. Accessed feature EnableHighChannelLayouts before FeatureList registration.
        ```

        Thomas Guilbert

        See other comment. You might be missing something in the test fixture.

        Otherwise, the crash might be avoided, but you might always use 8 channels.

        Daniel Cheng

        This is because we have a static initializer/global constructor (which btw is banned in Chrome :)

        We should fix it.

        Syed AbuTalib

        I removed this `base::FeatureList::GetInstance()` call by delaying the construction of AudioParameters in the tests.

        Daniel Cheng

        (Sorry just to clarify, this comment about static initializers is wrong. I had gemini-cli do some of the initial diganosis, but I was diving into it more myself and then forgot to delete this draft)

        Gerrit-Comment-Date: Wed, 22 Apr 2026 18:43:48 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Thomas Guilbert (Gerrit)

        unread,
        Apr 22, 2026, 5:04:50 PM (8 days ago) Apr 22
        to Syed AbuTalib, Daniel Cheng, android-bu...@system.gserviceaccount.com, Thomas Guilbert, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
        Attention needed from Syed AbuTalib

        Thomas Guilbert added 1 comment

        File services/audio/snooper_node_unittest.cc
        Line 79, Patchset 21 (Latest): int channels() const { return channels_; }
        int sample_rate() const { return rate_; }
        int frames_per_buffer() const { return frames_; }
        media::ChannelLayout channel_layout() const { return layout_; }
        Thomas Guilbert . unresolved

        Mixing the builder pattern and these getters is a bit odd. You could instead do a lazy `build()` in `InputAndOutputParams`, the first time `input()` or `output()` is called.

        You could still use `AsHumanReadableString()` this way, in the `operator<<()` overload.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Syed AbuTalib
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
        Gerrit-Change-Number: 7759235
        Gerrit-PatchSet: 21
        Gerrit-Owner: Syed AbuTalib <low...@google.com>
        Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
        Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
        Gerrit-CC: Daniel Cheng <dch...@chromium.org>
        Gerrit-Attention: Syed AbuTalib <low...@google.com>
        Gerrit-Comment-Date: Wed, 22 Apr 2026 21:04:45 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Syed AbuTalib (Gerrit)

        unread,
        Apr 22, 2026, 7:39:06 PM (8 days ago) Apr 22
        to Daniel Cheng, android-bu...@system.gserviceaccount.com, Thomas Guilbert, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
        Attention needed from Thomas Guilbert

        Syed AbuTalib added 2 comments

        File services/audio/snooper_node_unittest.cc
        Line 79, Patchset 21: int channels() const { return channels_; }

        int sample_rate() const { return rate_; }
        int frames_per_buffer() const { return frames_; }
        media::ChannelLayout channel_layout() const { return layout_; }
        Thomas Guilbert . resolved

        Mixing the builder pattern and these getters is a bit odd. You could instead do a lazy `build()` in `InputAndOutputParams`, the first time `input()` or `output()` is called.

        You could still use `AsHumanReadableString()` this way, in the `operator<<()` overload.

        Syed AbuTalib

        Actually, I still hit the flag crash when I used `AsHumanReadableString()`, I'm thinking this `operator<<` gets called during the gtest initialization. I decided that since we have a NameGenerator now we can just use the new `std::string name` instead.

        Line 794, Patchset 18: MakeParams(BaseParams(), BaseParams()),
        Thomas Guilbert . resolved

        Optional: consider adding a string param and a [NameGenerator](https://google.github.io/googletest/reference/testing.html#TYPED_TEST_SUITE) which makes it easier to figure out which test case is failing.

        Syed AbuTalib

        Added a lambda to do this in the `INSTANTIATE_TEST_SUITE_P`

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Thomas Guilbert
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
          Gerrit-Change-Number: 7759235
          Gerrit-PatchSet: 22
          Gerrit-Owner: Syed AbuTalib <low...@google.com>
          Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
          Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
          Gerrit-CC: Daniel Cheng <dch...@chromium.org>
          Gerrit-Attention: Thomas Guilbert <tgui...@chromium.org>
          Gerrit-Comment-Date: Wed, 22 Apr 2026 23:38:57 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Thomas Guilbert <tgui...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Thomas Guilbert (Gerrit)

          unread,
          Apr 22, 2026, 8:27:47 PM (8 days ago) Apr 22
          to Syed AbuTalib, Thomas Guilbert, Daniel Cheng, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
          Attention needed from Syed AbuTalib

          Thomas Guilbert voted and added 1 comment

          Votes added by Thomas Guilbert

          Code-Review+1

          1 comment

          File services/audio/snooper_node_unittest.cc
          Line 91, Patchset 22 (Latest):std::ostream& operator<<(std::ostream& out,
          const InputAndOutputParams& test_params) {
          return out << test_params.name;
          }
          Thomas Guilbert . unresolved

          Is this still needed at all with the name generator?

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Syed AbuTalib
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
            Gerrit-Change-Number: 7759235
            Gerrit-PatchSet: 22
            Gerrit-Owner: Syed AbuTalib <low...@google.com>
            Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
            Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
            Gerrit-CC: Daniel Cheng <dch...@chromium.org>
            Gerrit-Attention: Syed AbuTalib <low...@google.com>
            Gerrit-Comment-Date: Thu, 23 Apr 2026 00:27:31 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Syed AbuTalib (Gerrit)

            unread,
            Apr 24, 2026, 1:40:13 PM (6 days ago) Apr 24
            to Daniel Cheng, Thomas Guilbert, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
            Attention needed from Daniel Cheng

            Syed AbuTalib added 2 comments

            Patchset-level comments
            File-level comment, Patchset 23 (Latest):
            Syed AbuTalib . resolved

            Hey Daniel, hoping you could review this CL as an OWNER for `services/audio/*`. Thanks for helping out earlier!

            File services/audio/snooper_node_unittest.cc
            Line 91, Patchset 22:std::ostream& operator<<(std::ostream& out,

            const InputAndOutputParams& test_params) {
            return out << test_params.name;
            }
            Thomas Guilbert . resolved

            Is this still needed at all with the name generator?

            Syed AbuTalib

            Removed.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Daniel Cheng
            Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement is not satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • requirement satisfiedReview-Enforcement
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
              Gerrit-Change-Number: 7759235
              Gerrit-PatchSet: 23
              Gerrit-Owner: Syed AbuTalib <low...@google.com>
              Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
              Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
              Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
              Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
              Gerrit-Comment-Date: Fri, 24 Apr 2026 17:40:03 +0000
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Daniel Cheng (Gerrit)

              unread,
              Apr 27, 2026, 12:04:57 PM (3 days ago) Apr 27
              to Syed AbuTalib, Dale Curtis, Daniel Cheng, Thomas Guilbert, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
              Attention needed from Dale Curtis and Syed AbuTalib

              Daniel Cheng added 1 comment

              Patchset-level comments
              Syed AbuTalib . resolved

              Hey Daniel, hoping you could review this CL as an OWNER for `services/audio/*`. Thanks for helping out earlier!

              Daniel Cheng

              Ah... I am in OWNERS but generally only for help with landing refactorings and no-op changes. I /could/ review it but it would be better for an audio-specific owner to make sure everything is OK. I've added dalecurtis@ who should be a better reviewer than me here, but it's probably also worth considering if tguilbert would be an appropriate owner here.

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Dale Curtis
              • Syed AbuTalib
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement is not satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • requirement satisfiedReview-Enforcement
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
              Gerrit-Change-Number: 7759235
              Gerrit-PatchSet: 23
              Gerrit-Owner: Syed AbuTalib <low...@google.com>
              Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
              Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
              Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
              Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
              Gerrit-Attention: Syed AbuTalib <low...@google.com>
              Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
              Gerrit-Comment-Date: Mon, 27 Apr 2026 16:04:41 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              Comment-In-Reply-To: Syed AbuTalib <low...@google.com>
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Syed AbuTalib (Gerrit)

              unread,
              Apr 27, 2026, 1:50:16 PM (3 days ago) Apr 27
              to Dale Curtis, Thomas Guilbert, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
              Attention needed from Dale Curtis and Syed AbuTalib

              Syed AbuTalib added 1 comment

              Patchset-level comments
              Syed AbuTalib . resolved

              Adding Dale as an OWNER of `services/audio/`.

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Dale Curtis
              • Syed AbuTalib
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement is not satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • requirement satisfiedReview-Enforcement
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
              Gerrit-Change-Number: 7759235
              Gerrit-PatchSet: 23
              Gerrit-Owner: Syed AbuTalib <low...@google.com>
              Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
              Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
              Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
              Gerrit-Attention: Syed AbuTalib <low...@google.com>
              Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
              Gerrit-Comment-Date: Mon, 27 Apr 2026 17:50:05 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Syed AbuTalib (Gerrit)

              unread,
              Apr 27, 2026, 1:52:26 PM (3 days ago) Apr 27
              to Dale Curtis, Thomas Guilbert, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
              Attention needed from Dale Curtis

              Syed AbuTalib added 1 comment

              Patchset-level comments
              Syed AbuTalib . resolved

              Adding Dale as an OWNER of `services/audio/`.

              Syed AbuTalib

              Shoot, never reloaded the page so I didn't see DCheng already added Dale. Please ignore.

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Dale Curtis
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement is not satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • requirement satisfiedReview-Enforcement
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
              Gerrit-Change-Number: 7759235
              Gerrit-PatchSet: 23
              Gerrit-Owner: Syed AbuTalib <low...@google.com>
              Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
              Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
              Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
              Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
              Gerrit-Comment-Date: Mon, 27 Apr 2026 17:52:16 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              Comment-In-Reply-To: Syed AbuTalib <low...@google.com>
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Dale Curtis (Gerrit)

              unread,
              Apr 27, 2026, 2:23:42 PM (3 days ago) Apr 27
              to Syed AbuTalib, Thomas Guilbert, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org
              Attention needed from Syed AbuTalib

              Dale Curtis voted Code-Review+1

              Code-Review+1
              Open in Gerrit

              Related details

              Attention is currently required from:
              • Syed AbuTalib
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • requirement satisfiedReview-Enforcement
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
              Gerrit-Change-Number: 7759235
              Gerrit-PatchSet: 23
              Gerrit-Owner: Syed AbuTalib <low...@google.com>
              Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
              Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
              Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
              Gerrit-Attention: Syed AbuTalib <low...@google.com>
              Gerrit-Comment-Date: Mon, 27 Apr 2026 18:23:31 +0000
              Gerrit-HasComments: No
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              open
              diffy

              Syed AbuTalib (Gerrit)

              unread,
              Apr 27, 2026, 2:27:00 PM (3 days ago) Apr 27
              to Dale Curtis, Thomas Guilbert, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org

              Syed AbuTalib voted Commit-Queue+2

              Commit-Queue+2
              Open in Gerrit

              Related details

              Attention set is empty
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • requirement satisfiedReview-Enforcement
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
              Gerrit-Change-Number: 7759235
              Gerrit-PatchSet: 23
              Gerrit-Owner: Syed AbuTalib <low...@google.com>
              Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
              Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
              Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
              Gerrit-Comment-Date: Mon, 27 Apr 2026 18:26:49 +0000
              Gerrit-HasComments: No
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              open
              diffy

              Chromium LUCI CQ (Gerrit)

              unread,
              Apr 27, 2026, 5:17:30 PM (3 days ago) Apr 27
              to Syed AbuTalib, Dale Curtis, Thomas Guilbert, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, feature-me...@chromium.org, marinacio...@chromium.org, olka+...@chromium.org

              Chromium LUCI CQ submitted the change

              Change information

              Commit message:
              Enable Channel Mixing for DISCRETE with differing counts

              It is still worth using ChannelMixStrategy for `DISCRETE` cases as it is
              not a guarantee that the input/output params have the same channel
              count.


              Also, the unittest file was optimized for testing out a max of stereo
              (2) layout, updated the unittests to handle higher channel counts and
              mixing between the higher channel counts.
              Bug: 501667839
              Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
              Reviewed-by: Dale Curtis <dalec...@chromium.org>
              Commit-Queue: Syed AbuTalib <low...@google.com>
              Reviewed-by: Thomas Guilbert <tgui...@chromium.org>
              Cr-Commit-Position: refs/heads/main@{#1621314}
              Files:
              • M services/audio/snooper_node.cc
              • M services/audio/snooper_node_unittest.cc
              Change size: L
              Delta: 2 files changed, 218 insertions(+), 194 deletions(-)
              Branch: refs/heads/main
              Submit Requirements:
              • requirement satisfiedCode-Review: +1 by Dale Curtis, +1 by Thomas Guilbert
              Open in Gerrit
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: merged
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I7e3cacddebb85f7cbe346087f8a58048947b4293
              Gerrit-Change-Number: 7759235
              Gerrit-PatchSet: 24
              Gerrit-Owner: Syed AbuTalib <low...@google.com>
              Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
              Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
              Gerrit-Reviewer: Syed AbuTalib <low...@google.com>
              Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
              open
              diffy
              satisfied_requirement
              Reply all
              Reply to author
              Forward
              0 new messages