From 4970e30e25e0b18df015f1f3b063c70c59604459 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 28 Aug 2000 17:29:36 +0000 Subject: [PATCH] Changed playback switch handling --- src/mixer/simple.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) 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) { -- 2.47.1