mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	bluetooth: Use transport state to update port availability
Use transport state to calculate the corresponding port availability, and while doing so use bluetooth-util to receive profile state updates instead of directly parsing D-Bus PropertyChanged signals.
This commit is contained in:
		
							parent
							
								
									8ae8b51937
								
							
						
					
					
						commit
						0c126bdf5b
					
				
					 2 changed files with 53 additions and 94 deletions
				
			
		| 
						 | 
				
			
			@ -539,8 +539,12 @@ static int parse_audio_property(pa_bluetooth_device *d, const char *interface, D
 | 
			
		|||
                old_state = transport->state;
 | 
			
		||||
                transport->state = audio_state_to_transport_state(state);
 | 
			
		||||
 | 
			
		||||
                if (transport->state != old_state)
 | 
			
		||||
                if (transport->state != old_state) {
 | 
			
		||||
                    pa_log_debug("profile=%s, transport=%s, new_state=%d", pa_bt_profile_to_string(transport->profile),
 | 
			
		||||
                                 transport->path, transport->state);
 | 
			
		||||
 | 
			
		||||
                    pa_hook_fire(&d->discovery->hooks[PA_BLUETOOTH_HOOK_TRANSPORT_STATE_CHANGED], transport);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            break;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue