Skip to content

Commit baffbac

Browse files
afq984Chromeos LUCI
authored and
Chromeos LUCI
committed
cras_stream_apm: Allow all channels
We don't want to use FC to pass the 3rd channel for beamforming because when a client requests mono and beamforming is not enabled, CRAS might picked up FC as mono, while it's preferred to mix FL+FR in that case. BUG=b:261951580 TEST=bazel test //... TEST=tast run dut12 audio.CrasMultiChannelCapture.\* audio.CrasAEC.\* Change-Id: I13e7744016034e3bce5e178d4401e867a9d49580 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/5534462 Commit-Queue: Li-Yu Yu <[email protected]> Tested-by: [email protected] <[email protected]> Reviewed-by: Pattara Teerapong <[email protected]>
1 parent f739475 commit baffbac

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cras/src/server/cras_stream_apm.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -592,9 +592,7 @@ static struct cras_audio_format get_best_channels(
592592
apm_fmt.channel_layout[ch] = -1;
593593
}
594594

595-
int apm_valid_channels[] = {CRAS_CH_FL, CRAS_CH_FR, CRAS_CH_FC};
596-
for (int i = 0; i < ARRAY_SIZE(apm_valid_channels); i++) {
597-
int ch = apm_valid_channels[i];
595+
for (int ch = CRAS_CH_FL; ch < CRAS_CH_MAX; ch++) {
598596
if (dev_fmt->channel_layout[ch] != -1) {
599597
apm_fmt.channel_layout[ch] = apm_fmt.num_channels++;
600598
}

0 commit comments

Comments
 (0)