jabra-vold: Fix volume unsync issue after hotplug

This change is to fix the volume unsync issue as detailed in
the bug. The underlying cause is that usbmon interface can no
longer receive packets from Jabra device after hotplug.
With lots of testing we concluded two things needs to be fixed
in order to make Jabra devices work well across hotplug.

1. After jabra-vold is launched, an extra volume read-then-write
  is required so that usbmon can continue to receive packets.
2. During the init stage, each jabra daemon should NOT add all
  volume controls to the list for later volume setting. That could
  cause trouble because a control is still being referenced even
  the physical Jabra is unplugged. To fix this we need to look up
  sound card index at initialize stage and use it to filter volume
  controls on the system.

TEST=Test on Panther Hotrod mode with two Jabra speakerphones,
hotplug Jabra releatedly to verify that volume sync can work.

Change-Id: Id31e3b5628d71eb8bdc9546124376eb0e64f8042
Reviewed-on: https://chromium-review.googlesource.com/398898
Commit-Ready: Hsinyu Chao <hychao@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Chinyue Chen <chinyue@chromium.org>
2 files changed