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.
Commit-Ready: Hsinyu Chao <email@example.com>
Tested-by: Hsinyu Chao <firstname.lastname@example.org>
Reviewed-by: Chinyue Chen <email@example.com>
2 files changed