summaryrefslogtreecommitdiff
path: root/alsamixer
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-05-18 16:58:02 +0200
committerTakashi Iwai <tiwai@suse.de>2007-05-18 16:58:02 +0200
commit53eb911fb7a40f375c6dfd5cb1f2ba4ea9fd8abe (patch)
tree90881a4610576d65e6f34d995665adaa04fe3a54 /alsamixer
parentd971197c3334d7fc081a06776f27612a816e900f (diff)
alsamixer - Fix duplicated appearance in All view mode
Fixed the duplicated appearances of common volumes / switches in ALL view mode.
Diffstat (limited to 'alsamixer')
-rw-r--r--alsamixer/alsamixer.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/alsamixer/alsamixer.c b/alsamixer/alsamixer.c
index e745156..3daeb61 100644
--- a/alsamixer/alsamixer.c
+++ b/alsamixer/alsamixer.c
@@ -1787,8 +1787,15 @@ __again:
}
if ( (mixer_view == VIEW_CAPTURE) || (mixer_view == VIEW_CHANNELS) ) {
- if (snd_mixer_selem_has_capture_volume(elem) ||
- (nelems_added == 0 && snd_mixer_selem_has_capture_switch(elem))) {
+ int do_add = 0;
+ if (snd_mixer_selem_has_capture_volume(elem) &&
+ (mixer_view == VIEW_CAPTURE || !snd_mixer_selem_has_common_volume(elem)))
+ do_add = 1;
+ if (!do_add &&
+ (nelems_added == 0 && snd_mixer_selem_has_capture_switch(elem)) &&
+ (mixer_view == VIEW_CAPTURE || !snd_mixer_selem_has_common_switch(elem)))
+ do_add = 1;
+ if (do_add) {
mixer_grpidx[elem_index] = idx;
mixer_type[elem_index] = MIXER_ELEM_CAPTURE;
if (nelems_added == 0 && snd_mixer_selem_has_capture_switch(elem))