From: Jaroslav Kysela Date: Mon, 28 Aug 2000 17:29:36 +0000 (+0000) Subject: Changed playback switch handling X-Git-Tag: v1.0.3~1160 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=4970e30e25e0b18df015f1f3b063c70c59604459;p=alsa-lib.git Changed playback switch handling --- diff --git a/src/mixer/simple.c b/src/mixer/simple.c index 5cd0f12a..3a11a092 100644 --- a/src/mixer/simple.c +++ b/src/mixer/simple.c @@ -370,14 +370,25 @@ static int input_put(snd_mixer_t *handle, mixer_simple_t *simple, snd_mixer_simp } } if (simple->caps & SND_MIXER_SCTCAP_MUTE) { - if (simple->present & MIXER_PRESENT_PLAYBACK_SWITCH) { - input_put_mute_switch(handle, simple, control, "Playback ", simple->pswitch_values); - } else if (simple->present & MIXER_PRESENT_GLOBAL_VOLUME) { - input_put_mute_switch(handle, simple, control, "", simple->pvolume_values); - } else if (simple->present & MIXER_PRESENT_PLAYBACK_ROUTE) { - input_put_mute_route(handle, simple, control, "Playback ", simple->proute_values); - } else if (simple->present & MIXER_PRESENT_GLOBAL_ROUTE) { - input_put_mute_route(handle, simple, control, "", simple->groute_values); + if ((control->mute & control->channels) != control->channels) { + if (simple->present & MIXER_PRESENT_PLAYBACK_SWITCH) + input_put_mute_switch(handle, simple, control, "Playback ", simple->pswitch_values); + if (simple->present & MIXER_PRESENT_GLOBAL_VOLUME) + input_put_mute_switch(handle, simple, control, "", simple->pvolume_values); + if (simple->present & MIXER_PRESENT_PLAYBACK_ROUTE) + input_put_mute_route(handle, simple, control, "Playback ", simple->proute_values); + if (simple->present & MIXER_PRESENT_GLOBAL_ROUTE) + input_put_mute_route(handle, simple, control, "", simple->groute_values); + } else { + if (simple->present & MIXER_PRESENT_PLAYBACK_SWITCH) { + input_put_mute_switch(handle, simple, control, "Playback ", simple->pswitch_values); + } else if (simple->present & MIXER_PRESENT_GLOBAL_VOLUME) { + input_put_mute_switch(handle, simple, control, "", simple->pvolume_values); + } else if (simple->present & MIXER_PRESENT_PLAYBACK_ROUTE) { + input_put_mute_route(handle, simple, control, "Playback ", simple->proute_values); + } else if (simple->present & MIXER_PRESENT_GLOBAL_ROUTE) { + input_put_mute_route(handle, simple, control, "", simple->groute_values); + } } } if (simple->caps & SND_MIXER_SCTCAP_CAPTURE) {