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
Change-Id: Ic4179d41d569231255f9e497032d369df19ec6ba
1 file changed