for (snd_mixer_selem_channel_id_t ch=0; ch < SND_MIXER_SCHN_LAST; ch++)
{
int val;
- if (snd_mixer_selem_get_playback_switch(elem, ch, &val))
+ if (!snd_mixer_selem_get_playback_switch(elem, ch, &val))
{
if (val)
mute_off++;
for (snd_mixer_selem_channel_id_t ch=0; ch < SND_MIXER_SCHN_LAST; ch++)
{
long val;
- if (snd_mixer_selem_get_playback_volume(elem, ch, &val))
+ if (!snd_mixer_selem_get_playback_volume(elem, ch, &val))
{
if (val > curr)
curr = val;