diff --git a/btfmcodec/btfm_codec_btadv_interface.c b/btfmcodec/btfm_codec_btadv_interface.c index b85bcaa362..3817285e90 100644 --- a/btfmcodec/btfm_codec_btadv_interface.c +++ b/btfmcodec/btfm_codec_btadv_interface.c @@ -305,6 +305,13 @@ void btfmcodec_prepare_bearer(struct btfmcodec_char_device *btfmcodec_dev, btfmcodec_initiate_hwep_shutdown(btfmcodec_dev); } } + } else if (new_transport == NONE) { + /* Let ALSA handles the transport close for BT */ + if (current_state != BT_Connecting && current_state != BT_Connected) + btfmcodec_set_current_state(state, IDLE); + btfmcodec_frame_prepare_bearer_rsp_pkt(btfmcodec_dev, (uint8_t)current_state, + MSG_SUCCESS); + return; } } diff --git a/btfmcodec/include/btfm_codec_btadv_interface.h b/btfmcodec/include/btfm_codec_btadv_interface.h index b27d2a0503..7f10b7bb93 100644 --- a/btfmcodec/include/btfm_codec_btadv_interface.h +++ b/btfmcodec/include/btfm_codec_btadv_interface.h @@ -9,9 +9,10 @@ enum transport_type { BT = 1, BTADV, + NONE, }; -static char *transport_type_text[] = {"BT", "BTADV"}; +static char *transport_type_text[] = {"BT", "BTADV", "NONE"}; void btfmcodec_set_current_state(struct btfmcodec_state_machine *, btfmcodec_state); void btfmcodec_wq_prepare_bearer(struct work_struct *);