mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	bluez5: hfp-hf: don't change hf_state after sending AT+BCS
The +BCS event may interrupt any of the initialization commands after SLC is established and by changing the state here we may lose track of the initialization sequence. There is no reason to have the hfp_hf_bcs state anyway. If the initialization sequence is over, we can remain in the hfp_hf_vgm state.
This commit is contained in:
		
							parent
							
								
									7f07448a80
								
							
						
					
					
						commit
						8e62b08e58
					
				
					 1 changed files with 1 additions and 4 deletions
				
			
		| 
						 | 
					@ -142,8 +142,7 @@ enum hfp_hf_state {
 | 
				
			||||||
	hfp_hf_slc1,
 | 
						hfp_hf_slc1,
 | 
				
			||||||
	hfp_hf_slc2,
 | 
						hfp_hf_slc2,
 | 
				
			||||||
	hfp_hf_vgs,
 | 
						hfp_hf_vgs,
 | 
				
			||||||
	hfp_hf_vgm,
 | 
						hfp_hf_vgm
 | 
				
			||||||
	hfp_hf_bcs
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
enum hsp_hs_state {
 | 
					enum hsp_hs_state {
 | 
				
			||||||
| 
						 | 
					@ -2012,8 +2011,6 @@ static bool rfcomm_hfp_hf(struct rfcomm *rfcomm, char* token)
 | 
				
			||||||
			/* send codec selection to AG */
 | 
								/* send codec selection to AG */
 | 
				
			||||||
			rfcomm_send_cmd(rfcomm, "AT+BCS=%u", selected_codec);
 | 
								rfcomm_send_cmd(rfcomm, "AT+BCS=%u", selected_codec);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			rfcomm->hf_state = hfp_hf_bcs;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			if (!rfcomm->transport || (rfcomm->transport->codec != selected_codec) ) {
 | 
								if (!rfcomm->transport || (rfcomm->transport->codec != selected_codec) ) {
 | 
				
			||||||
				if (rfcomm_new_transport(rfcomm, selected_codec) < 0) {
 | 
									if (rfcomm_new_transport(rfcomm, selected_codec) < 0) {
 | 
				
			||||||
					// TODO: We should manage the missing transport
 | 
										// TODO: We should manage the missing transport
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue