CRAS: apm_list - Construct channel layout that works with APM

For input device we could have two channels PCM with the first
channel unconnected. And that introduces a bug in APM use case
because APM processing only uses data in the first channel.
This change fixes the issue by always reconstruct a channel
layout that works with APM.

TEST=Test online voice recording on 'barla' device.
Unittest to verify all other possible capture channel maps

Change-Id: I1e6ba79d2752a7a541bfbea91dd96bf0f9d38f4d
Reviewed-by: Cheng-Yi Chiang <>
Commit-Queue: Hsinyu Chao <>
Tested-by: Hsinyu Chao <>
2 files changed