mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	bluetooth: Provide dummy set_port callbacks
There should be one port per sink/source so a dummy set_port callback will be enough. Adding this callback avoid the "operation not implemented" error message and additionally makes the module work nicely with module-switch-on-port-available.
This commit is contained in:
		
							parent
							
								
									f280e8b50d
								
							
						
					
					
						commit
						2a7d001c97
					
				
					 1 changed files with 10 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1515,6 +1515,14 @@ static const char *profile_to_string(enum profile profile) {
 | 
			
		|||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int sink_set_port_cb(pa_sink *s, pa_device_port *p) {
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int source_set_port_cb(pa_source *s, pa_device_port *p) {
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Run from main thread */
 | 
			
		||||
static int add_sink(struct userdata *u) {
 | 
			
		||||
    char *k;
 | 
			
		||||
| 
						 | 
				
			
			@ -1563,6 +1571,7 @@ static int add_sink(struct userdata *u) {
 | 
			
		|||
 | 
			
		||||
        u->sink->userdata = u;
 | 
			
		||||
        u->sink->parent.process_msg = sink_process_msg;
 | 
			
		||||
        u->sink->set_port = sink_set_port_cb;
 | 
			
		||||
 | 
			
		||||
        pa_sink_set_max_request(u->sink, u->write_block_size);
 | 
			
		||||
        pa_sink_set_fixed_latency(u->sink,
 | 
			
		||||
| 
						 | 
				
			
			@ -1626,6 +1635,7 @@ static int add_source(struct userdata *u) {
 | 
			
		|||
 | 
			
		||||
        u->source->userdata = u;
 | 
			
		||||
        u->source->parent.process_msg = source_process_msg;
 | 
			
		||||
        u->source->set_port = source_set_port_cb;
 | 
			
		||||
 | 
			
		||||
        pa_source_set_fixed_latency(u->source,
 | 
			
		||||
                                    (u->profile == PROFILE_A2DP_SOURCE ? FIXED_LATENCY_RECORD_A2DP : FIXED_LATENCY_RECORD_HSP) +
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue