CRAS: fmt_conv: fix overflow and default layout in 5.1 to stereo downmixing

1. Normalize the 5.1 to stereo downmixing matrix by
   sum(abs(ci)), where ci is the coefficient in downmixing matrix for
   a channel to prevent overflow as SUM(ci/SUM(ABS(ci))) <= 1.

2. Change the 5.1 defualt layout to L,R,C,LFE,RL,RR when downmix to
   stereo.

BUG=b:173664344
TEST=`FEATURES=test USE=ubsan emerge-${BOARD} adhd`

Change-Id: I55f177a60d95f98ef9b4ca6235f47d9145db7da0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/2547610
Tested-by: Judy Hsiao <judyhsiao@chromium.org>
Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
Commit-Queue: Judy Hsiao <judyhsiao@chromium.org>
3 files changed