mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	alsa: Fix log output to inform about positive base volumes correctly.
Positive base volume can happen, if the alsa volume range has been limited. For example, in an embedded environment it may be known that the sound device is capable of louder output than what the speakers can handle, so setting the max volume below 0 dB makes sense.
This commit is contained in:
		
							parent
							
								
									6a5f0ba431
								
							
						
					
					
						commit
						7bc5cd7845
					
				
					 2 changed files with 2 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -1186,10 +1186,7 @@ static int source_set_port_cb(pa_source *s, pa_device_port *p) {
 | 
			
		|||
        s->base_volume = pa_sw_volume_from_dB(-u->mixer_path->max_dB);
 | 
			
		||||
        s->n_volume_steps = PA_VOLUME_NORM+1;
 | 
			
		||||
 | 
			
		||||
        if (u->mixer_path->max_dB > 0.0)
 | 
			
		||||
            pa_log_info("Fixing base volume to %0.2f dB", pa_sw_volume_to_dB(s->base_volume));
 | 
			
		||||
        else
 | 
			
		||||
            pa_log_info("No particular base volume set, fixing to 0 dB");
 | 
			
		||||
        pa_log_info("Fixing base volume to %0.2f dB", pa_sw_volume_to_dB(s->base_volume));
 | 
			
		||||
    } else {
 | 
			
		||||
        s->base_volume = PA_VOLUME_NORM;
 | 
			
		||||
        s->n_volume_steps = u->mixer_path->max_volume - u->mixer_path->min_volume + 1;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue