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

Skip to content
Commit 5ed1a86d authored by Andy Hung's avatar Andy Hung
Browse files

AudioMixer: Fix MONO_EXPAND for more than 2 channels

Mono audio going to a HAL with channel position mask might access
invalid volumes.

Resampling was going through STEREO_EXPAND (OK).
Non-resampling was going through MONO_EXPAND (BAD) - this is fixed.
Add static assert to prevent other stereo assumptions from occurring.
Updated benchmark to use the full multichannel mixtypes.

Test: Clarity on 7.1 USB device with HAL channel index mask 8, 7.1
      positional mask. Mono input, 6 ch input.
      Sampling rates  48K, 88.2K, 96K.
Test: mixer_to_wav_tests.sh
Test: mixerops_benchmark
Bug: 160212351
Merged-In: I45c1d7b429f66a950885bc2913a50f223a7d0248
Change-Id: I45c1d7b429f66a950885bc2913a50f223a7d0248
(cherry picked from commit 2d8397af)
parent 127b0dba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment