DescriptionRemove device change deduplication based on device id.
It looks like some software changes internal flows instead of
changing the device id. In place of this deduplication logic
I've added a rate limit of 1 change per 250ms, which is enough
to fix the original issue of multiple events.
Also fixes an issue where we were firing device changes four
times (!) --[eRender, eCapture] * [eConsole, eCommunications].
The AudioManager only supports output device notifications so
we should only be firing the listener callback for eRender.
With the rate limiting logic and only firing notifications for
eRender, this takes us down from four device changes to just
1 for unplug / replug of a device.
BUG=506712
TEST=device changes work, single stream created per multiple events.
TBR=henrika
Committed: https://crrev.com/0a021e87fa8e211bdf5c9f9d2293f2d95fdd76dd
Cr-Commit-Position: refs/heads/master@{#339815}
Patch Set 1 #
Total comments: 7
Patch Set 2 : Fix tests. #
Total comments: 1
Messages
Total messages: 19 (7 generated)
|