mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	switch-on-connect: Don't switch to a monitor source
Buglink: http://bugs.launchpad.net/bugs/831675 Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
		
							parent
							
								
									d6b9e61b90
								
							
						
					
					
						commit
						b746e09448
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -29,6 +29,7 @@
 | 
			
		|||
#include <pulsecore/core.h>
 | 
			
		||||
#include <pulsecore/sink-input.h>
 | 
			
		||||
#include <pulsecore/source-output.h>
 | 
			
		||||
#include <pulsecore/source.h>
 | 
			
		||||
#include <pulsecore/modargs.h>
 | 
			
		||||
#include <pulsecore/log.h>
 | 
			
		||||
#include <pulsecore/namereg.h>
 | 
			
		||||
| 
						 | 
				
			
			@ -113,6 +114,10 @@ static pa_hook_result_t source_put_hook_callback(pa_core *c, pa_source *source,
 | 
			
		|||
    if (c->state != PA_CORE_RUNNING)
 | 
			
		||||
        return PA_HOOK_OK;
 | 
			
		||||
 | 
			
		||||
    /* Don't switch to a monitoring source */
 | 
			
		||||
    if (source->monitor_of)
 | 
			
		||||
        return PA_HOOK_OK;
 | 
			
		||||
 | 
			
		||||
    /* Don't switch to any internal devices */
 | 
			
		||||
    if ((s = pa_proplist_gets(source->proplist, PA_PROP_DEVICE_BUS))) {
 | 
			
		||||
        if (pa_streq(s, "pci"))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue