a2dp: fix incorrect acdb when starting abr path for a2dp capture

When abr paths are started, it's possible the speaker path can
still be active, so afe cal will be set as speaker acdb id.
This can lead port starts failure.
So before starting abr, need to update acdb data as bt cal.

Change-Id: I7f353112b926f5fd3632b3040c1e70023fab505f
diff --git a/hal/audio_extn/a2dp.c b/hal/audio_extn/a2dp.c
index 23c278e..b8a696f 100644
--- a/hal/audio_extn/a2dp.c
+++ b/hal/audio_extn/a2dp.c
@@ -1504,7 +1504,8 @@
         }
     }
     // need to set adm channel for LC3 decoder
-    if (a2dp.bt_decoder_format == CODEC_TYPE_LC3) {
+    if (a2dp.bt_decoder_format == CODEC_TYPE_LC3 &&
+        direction == SINK) {
         if (!adm_ctrl_channels) {
             ALOGE(" ERROR ADM channels mixer control not identified");
         } else {
@@ -3127,6 +3128,13 @@
         /* Start abr for LC3 decoder*/
         if (a2dp.bt_decoder_format == CODEC_TYPE_LC3) {
             a2dp.abr_config.is_abr_enabled = true;
+            /*
+             * Before starting abr, we must ensure to set correct acdb id
+             * because abr will trigger port open which needs acdb_id
+             */
+            fp_platform_switch_voice_call_device_post(a2dp.adev->platform,
+                                               SND_DEVICE_OUT_BT_SCO_WB,
+                                               SND_DEVICE_IN_BT_SCO_MIC_WB);
             start_abr();
         }
     }