Put usb stream into standby on disconnection if offloading
If usb headset was disconnected then reconnected while some music was
playing and that the music stopped playing during the disconnection,
the usb driver was never closed.
Unpluging and repluging an usb audio device without closing the usb
driver (uac_usb_close) leaves the usb driver "not in a right state".
The user effect is that sound is no longer played by the usb device.
This patch avoids the issue by putting the usb offload
stream in standby if the device is disconnected.
This lets the usb driver be closed when disconnecting the usb device.
Bug: 37551929
Test: Mir dongle with headset attached. Play music.
Remove headset from dongle, music pauses.
Re-insert headset into dongle, wait 5 seconds, press play.
Test: Disconnect reconnect USB during hangout call, modem call, play
music, youtube and video in chrome
Change-Id: I492f44f106a7e78dd03069d7d796a09831b6f3c9
Signed-off-by:
Kevin Rocard <krocard@google.com>
Loading
Please register or sign in to comment