[pulseaudio-discuss] [PATCH] alsa: Fix log output to inform about positive base volumes correctly.
Tanu Kaskinen
tanu.kaskinen at digia.com
Mon Apr 4 04:51:16 PDT 2011
This fix was done for _set_port_cb() already, but the first fix didn't fix
setup_mixer(). Now that's done too.
---
src/modules/alsa/alsa-sink.c | 5 +----
src/modules/alsa/alsa-source.c | 5 +----
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index 9ed4d4d..ccbc062 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -1724,10 +1724,7 @@ static int setup_mixer(struct userdata *u, pa_bool_t ignore_dB, pa_bool_t sync_v
u->sink->base_volume = pa_sw_volume_from_dB(-u->mixer_path->max_dB);
u->sink->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(u->sink->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(u->sink->base_volume));
} else {
pa_log_info("Hardware volume ranges from %li to %li.", u->mixer_path->min_volume, u->mixer_path->max_volume);
diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
index 6d18e60..3355fbd 100644
--- a/src/modules/alsa/alsa-source.c
+++ b/src/modules/alsa/alsa-source.c
@@ -1465,10 +1465,7 @@ static int setup_mixer(struct userdata *u, pa_bool_t ignore_dB) {
u->source->base_volume = pa_sw_volume_from_dB(-u->mixer_path->max_dB);
u->source->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(u->source->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(u->source->base_volume));
} else {
pa_log_info("Hardware volume ranges from %li to %li.", u->mixer_path->min_volume, u->mixer_path->max_volume);
--
1.7.4.2
More information about the pulseaudio-discuss
mailing list