Merge branch 't/testsuite'
[paraslash.git] / fade.c
diff --git a/fade.c b/fade.c
index f95ef4c843588fa821c0a07fc090d24b88f220b8..5fbd0dd48027ad990345aa5d8f86fa0d952e6188 100644 (file)
--- a/fade.c
+++ b/fade.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1998-2009 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 1998-2011 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -46,6 +46,7 @@ __printf_2_3 void para_log(__a_unused int ll, const char *fmt, ...)
  */
 static int open_mixer(void)
 {
+       PARA_INFO_LOG("opening %s\n", conf.mixer_device_arg);
        return para_open(conf.mixer_device_arg, O_RDWR, 42);
 }
 
@@ -124,6 +125,7 @@ static void fixup_mixer_channel_arg(void)
                case mixer_channel_arg_reclev: val = SOUND_MIXER_RECLEV; break;
                case mixer_channel_arg_igain: val = SOUND_MIXER_IGAIN; break;
                case mixer_channel_arg_ogain: val = SOUND_MIXER_OGAIN; break;
+               default: break;
        }
        conf.mixer_channel_arg = val;
 }
@@ -343,15 +345,15 @@ int main(int argc, char *argv[])
        }
        fixup_mixer_channel_arg();
        switch (conf.mode_arg) {
-       case mode_arg_sleep:
-               ret = sweet_dreams();
-               break;
        case mode_arg_fade:
                ret = fade(conf.fade_vol_arg, conf.fade_time_arg);
                break;
        case mode_arg_snooze:
                ret = snooze();
                break;
+       default: /* sleep mode */
+               ret = sweet_dreams();
+               break;
        }
        if (ret < 0)
                PARA_EMERG_LOG("%s\n", para_strerror(-ret));