mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	source-output: change bool save_source to char *preferred_source
The finial objective is to store the preferred source name in the source-output struct, and use module-stream-restore to save and restore it. This patch just replaces the save_source with preferred_source, and tries to keep the original logic. Signed-off-by: Hui Wang <hui.wang@canonical.com>
This commit is contained in:
		
							parent
							
								
									734a00c849
								
							
						
					
					
						commit
						5eec504d68
					
				
					 6 changed files with 54 additions and 29 deletions
				
			
		| 
						 | 
				
			
			@ -728,10 +728,6 @@ static void route_source_output(struct userdata *u, pa_source_output *so) {
 | 
			
		|||
    pa_assert(u);
 | 
			
		||||
    pa_assert(u->do_routing);
 | 
			
		||||
 | 
			
		||||
    /* Don't override user or application routing requests. */
 | 
			
		||||
    if (so->save_source || so->source_requested_by_application)
 | 
			
		||||
        return;
 | 
			
		||||
 | 
			
		||||
    if (so->direct_on_input)
 | 
			
		||||
        return;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -739,6 +735,10 @@ static void route_source_output(struct userdata *u, pa_source_output *so) {
 | 
			
		|||
    if (!so->source)
 | 
			
		||||
        return;
 | 
			
		||||
 | 
			
		||||
    /* Don't override user or application routing requests. */
 | 
			
		||||
    if (pa_safe_streq(so->source->name, so->preferred_source) || so->source_requested_by_application)
 | 
			
		||||
        return;
 | 
			
		||||
 | 
			
		||||
    auto_filtered_prop = pa_proplist_gets(so->proplist, "module-device-manager.auto_filtered");
 | 
			
		||||
    if (auto_filtered_prop)
 | 
			
		||||
        auto_filtered = (pa_parse_boolean(auto_filtered_prop) == 1);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue