aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/audio/audio-alsa.c4
-rw-r--r--plugins/audio/audio-api.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/audio/audio-alsa.c b/plugins/audio/audio-alsa.c
index 4d97c2d2..c13cdc59 100644
--- a/plugins/audio/audio-alsa.c
+++ b/plugins/audio/audio-alsa.c
@@ -160,7 +160,7 @@ PUBLIC unsigned char _alsa_get_mute (unsigned int num) {
}
- return (unsigned char)mute;
+ return (unsigned char)!mute;
}
PUBLIC void _alsa_set_mute (unsigned int num, unsigned char mute) {
@@ -169,7 +169,7 @@ PUBLIC void _alsa_set_mute (unsigned int num, unsigned char mute) {
return;
if (snd_mixer_selem_has_playback_switch (dev_ctx[num]->mixer_elm))
- snd_mixer_selem_set_playback_switch_all (dev_ctx[num]->mixer_elm, mute);
+ snd_mixer_selem_set_playback_switch_all (dev_ctx[num]->mixer_elm, !mute);
}
PUBLIC void _alsa_set_rate (unsigned int num, unsigned int rate) {
diff --git a/plugins/audio/audio-api.c b/plugins/audio/audio-api.c
index 0fcc73d1..fd5f620f 100644
--- a/plugins/audio/audio-api.c
+++ b/plugins/audio/audio-api.c
@@ -158,7 +158,7 @@ STATIC json_object* mute (AFB_request *request) { /* AFB_SESSION_CHECK */
}
/* "?value=" parameter is "0" or "off" */
- if ( atoi(value) == 0 || !strcasecmp(value, "off") ) {
+ else if ( atoi(value) == 0 || !strcasecmp(value, "off") ) {
ctx->mute = 0;
_alsa_set_mute (ctx->idx, ctx->mute);