libaudiohal: Respect channel count when setting hw gain

The AIDL contract requires passing a gain value per channel.
The legacy API was using a single gain value for input,
and stereo gain for output. Adapt these to the actual channel
count.

Bug: 326853618
Test: m
(cherry picked from https://android-review.googlesource.com/q/commit:222fdf9571d9aa060460b73db08b739b0b300584)
Merged-In: Ic4179d41d569231255f9e497032d369df19ec6ba
Change-Id: Ic4179d41d569231255f9e497032d369df19ec6ba
1 file changed