CRAS: iodev_list - Enable/disable active node for pinned stream

When a pinned stream is connected, the active node on the iodev-
to-pin might not work properly due to it was left in disabled
state when user's last action was switching to the other iodev.
Fix this problem by calling update_active_node() when a pinned
stream connected and removed.

BUG=chromium:700247
TEST=Plug 3.5mm headphone and a USB headset, select to headphone
in UI tray and then select to USB headset as output.
Execute 'cras_test_client --pin_device <id-of-internal-card>' to
play something, and verify audio coming out from headphone.
Next, click on UI to select to internal speaker and then select to
USB headset as output. Execute cras_test_client --pin_device to
play something, verify audio coming out from internal speaker this
time.

Change-Id: I438fdfc591b52186ed5a5079f8d3125b47f3499a
Reviewed-on: https://chromium-review.googlesource.com/462736
Commit-Ready: Hsinyu Chao <hychao@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Chinyue Chen <chinyue@chromium.org>
1 file changed