mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	alsa-sink/source: Really set volumes on port change
If deferred volumes were activated, set_volume does not really set the volume, and is probably only meant to be called from the main thread. As we're currently really setting the port and the mute here (i e modifying ALSA), we should really modify the volume as well. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
		
							parent
							
								
									e815a1f81a
								
							
						
					
					
						commit
						87edc1ccb0
					
				
					 2 changed files with 14 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -1465,8 +1465,13 @@ static int sink_set_port_cb(pa_sink *s, pa_device_port *p) {
 | 
			
		|||
 | 
			
		||||
    if (s->set_mute)
 | 
			
		||||
        s->set_mute(s);
 | 
			
		||||
    if (s->set_volume)
 | 
			
		||||
        s->set_volume(s);
 | 
			
		||||
    if (s->flags & PA_SINK_DEFERRED_VOLUME) {
 | 
			
		||||
        if (s->write_volume)
 | 
			
		||||
            s->write_volume(s);
 | 
			
		||||
    } else {
 | 
			
		||||
        if (s->set_volume)
 | 
			
		||||
            s->set_volume(s);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue