mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	combine: Only check if the sink is h/w etc. in automatic mode
This commit is contained in:
		
							parent
							
								
									33ea7b7816
								
							
						
					
					
						commit
						70a060db92
					
				
					 1 changed files with 8 additions and 8 deletions
				
			
		| 
						 | 
					@ -1030,20 +1030,20 @@ static pa_hook_result_t sink_put_hook_cb(pa_core *c, pa_sink *s, struct userdata
 | 
				
			||||||
    pa_sink_assert_ref(s);
 | 
					    pa_sink_assert_ref(s);
 | 
				
			||||||
    pa_assert(u);
 | 
					    pa_assert(u);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!is_suitable_sink(u, s))
 | 
					    if (u->automatic) {
 | 
				
			||||||
        return PA_HOOK_OK;
 | 
					        if (!is_suitable_sink(u, s))
 | 
				
			||||||
 | 
					            return PA_HOOK_OK;
 | 
				
			||||||
    /* Check if the sink is a previously unlinked slave (non-automatic mode) */
 | 
					    } else {
 | 
				
			||||||
    if (!u->automatic) {
 | 
					        /* Check if the sink is a previously unlinked slave (non-automatic mode) */
 | 
				
			||||||
        pa_strlist *l = u->unlinked_slaves;
 | 
					        pa_strlist *l = u->unlinked_slaves;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        while (l && !pa_streq(pa_strlist_data(l), s->name))
 | 
					        while (l && !pa_streq(pa_strlist_data(l), s->name))
 | 
				
			||||||
            l = pa_strlist_next(l);
 | 
					            l = pa_strlist_next(l);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (l)
 | 
					        if (!l)
 | 
				
			||||||
            u->unlinked_slaves = pa_strlist_remove(u->unlinked_slaves, s->name);
 | 
					 | 
				
			||||||
        else
 | 
					 | 
				
			||||||
            return PA_HOOK_OK;
 | 
					            return PA_HOOK_OK;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        u->unlinked_slaves = pa_strlist_remove(u->unlinked_slaves, s->name);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_log_info("Configuring new sink: %s", s->name);
 | 
					    pa_log_info("Configuring new sink: %s", s->name);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue