CRAS: apm_list - Make echo ref tracking more reliable

Below changes are made to ensure the echo ref tracking is reliable
in apm_list regardless of how the device enable/disable events
come from cras_iodev_list.

- If APM rmod already tracking the same iodev as echo ref, don't
bother configure it again.
- If APM rmod was tracking another iodev, configure its dsp pipeline
so it no longer points back to APM rmod.

BUG=chromium:970165
TEST=Use appr.tc with BT headset.

Change-Id: If6d4af247d5d8b1450cc861bcc97e264e5e5c013
Reviewed-on: https://chromium-review.googlesource.com/1647215
Commit-Ready: Hsinyu Chao <hychao@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
1 file changed