CHROMIUM: Add reconnect mechanism to HFP/HSP

A2DP has reconnect mechanism implemented in plugin/policy.c,
at connection failure with err code -EAGAIN, a timer will be
scheduled to initiate connection in 2 seconds.
A confusing scenario is observed occasionally that user got
only A2DP when a BT headset is connected, but not HFP or HSP.
When it happens, user is unable to use bidrectional audio, and
with headset disconnected and then reconnected, both A2DP and
HFP/HSP work fine.

This change adds similar reconnect mechanism for HFP/HSP, so
that Chrome OS users can have more consistent experience on
BT audio.

TEST=Connect BT headset, disconnect and reconnect. Verify
this audio device cab be used for A2DP and HFP/HSP.

Change-Id: I97afbf7a6919309514bfa0e0446b54b6c85ab819
Commit-Ready: Hsinyu Chao <>
Tested-by: Hsinyu Chao <>
Reviewed-by: Miao-chen Chou <>
1 file changed