src/Makefile.am | 2 +- src/modules/alsa/alsa-mixer.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-)
New commits: commit 71e936da586c5605b5c678f5f952264ae240d6f2 Author: Daniel Mack <[email protected]> Date: Fri May 27 15:33:17 2011 +0200 osx: pass -headerpad_max_install_names to the linker, too This option won't make it to the actual libtool command which does the linking when not prefixed with -Wl, diff --git a/src/Makefile.am b/src/Makefile.am index d4f595c..4990ac3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -81,7 +81,7 @@ WINSOCK_LIBS=-lwsock32 -lws2_32 -lwininet endif if OS_IS_DARWIN -AM_LDFLAGS+=-headerpad_max_install_names +AM_LDFLAGS+=-Wl,-headerpad_max_install_names -headerpad_max_install_names endif FOREIGN_CFLAGS = -w commit 6efa693fe7628b74cb0d97af03fba55b0b4b9d0d Author: Lu Guanqun <[email protected]> Date: Thu May 26 16:49:52 2011 +0800 alsa-mixer: Fix the assumption that volume is always positive Add a variable to track whether the actual volume is set or not. Suppose this: min volume: -126 max volume: 0 then when user wants to set some constant volume to -10, it would fail. While the alsa values are typically positive, some values are "funky" and have negative values. It is desirable to fix this at the alsa level so that the numbers are positive, but it's not technically invalid, and thus we have to support it. Discussed here: http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/9832 and http://thread.gmane.org/gmane.linux.alsa.devel/85459 diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c index f236da0..03a5312 100644 --- a/src/modules/alsa/alsa-mixer.c +++ b/src/modules/alsa/alsa-mixer.c @@ -1092,6 +1092,7 @@ static int element_set_constant_volume(pa_alsa_element *e, snd_mixer_t *m) { snd_mixer_selem_id_t *sid = NULL; int r = 0; long volume = -1; + pa_bool_t volume_set = FALSE; pa_assert(m); pa_assert(e); @@ -1105,6 +1106,7 @@ static int element_set_constant_volume(pa_alsa_element *e, snd_mixer_t *m) { switch (e->volume_use) { case PA_ALSA_VOLUME_OFF: volume = e->min_volume; + volume_set = TRUE; break; case PA_ALSA_VOLUME_ZERO: @@ -1112,18 +1114,20 @@ static int element_set_constant_volume(pa_alsa_element *e, snd_mixer_t *m) { long dB = 0; volume = decibel_fix_get_step(e->db_fix, &dB, +1); + volume_set = TRUE; } break; case PA_ALSA_VOLUME_CONSTANT: volume = e->constant_volume; + volume_set = TRUE; break; default: pa_assert_not_reached(); } - if (volume >= 0) { + if (volume_set) { if (e->direction == PA_ALSA_DIRECTION_OUTPUT) r = snd_mixer_selem_set_playback_volume_all(me, volume); else _______________________________________________ pulseaudio-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pulseaudio-commits
