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:
Tanu Kaskinen 2010-01-08 11:09:25 +02:00
parent 6a5f0ba431
commit 7bc5cd7845
2 changed files with 2 additions and 8 deletions

View file

@ -1252,10 +1252,7 @@ static int sink_set_port_cb(pa_sink *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;