hal: Check A2dp state before bt ipc library calls

Codec config check before a2dp has started successfully results
in failures in bt ipc library. Checking for a2dp ready
before bt state transitions to connected leads to synchronization
issues in bt ipc library. Fix these two issues by adding relevant
state checks.

CRs-Fixed: 2018123
Change-Id: Ie3fcef9b4a0e703eff6c57c857d31281611e156c
1 file changed