Эх сурвалжийг харах

btfmcodec: Add new transport type

This change adds new transport type, when it is recevied the state
will be moved to IDLE.

Change-Id: Ia728ec151afb78d75444361cba3b2788fc278876
Balakrishna Godavarthi 2 жил өмнө
parent
commit
df0dd43a78

+ 7 - 0
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;
 	}
 }
 

+ 2 - 1
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 *);