add config knob for default freq and length
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fri, 21 Aug 2009 12:40:29 +0000 (14:40 +0200)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fri, 21 Aug 2009 12:40:29 +0000 (14:40 +0200)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
miscutils/Config.in
miscutils/beep.c
scripts/defconfig

index 7209d294468dfb655c9b951e67bd6a0580759615..4e19bd8c4124709467bdccf479967ab8a5560b37 100644 (file)
@@ -25,6 +25,22 @@ config BEEP
        help
          The beep applets beeps in a given freq/Hz.
 
+config FEATURE_BEEP_FREQ
+       int "default frequency"
+       range 0 2147483647
+       default 4000
+       depends on BEEP
+       help
+         Frequency for default beep.
+
+config FEATURE_BEEP_LENGTH
+       int "default length"
+       range 0 2147483647
+       default 30
+       depends on BEEP
+       help
+         Length in ms for default beep.
+
 config CHAT
        bool "chat"
        default n
index d5c3531971a76f4c561e5958919dc73ad05c03cd..79e75473c86ae617a882e05605a9d7845caac30c 100644 (file)
 #define OPT_d (1<<2)
 #define OPT_r (1<<3)
 /* defaults */
-#define FREQ (4440)
-#define LENGTH (50)
+#ifndef CONFIG_FEATURE_BEEP_FREQ
+# define FREQ (4000)
+#else
+# define FREQ (CONFIG_FEATURE_BEEP_FREQ)
+#endif
+#ifndef CONFIG_FEATURE_BEEP_LENGTH
+# define LENGTH (30)
+#else
+# define LENGTH (CONFIG_FEATURE_BEEP_LENGTH)
+#endif
 #define DELAY (0)
 #define REPETITIONS (1)
 
index 7f172c34a9bd8ae145a52552b83a1b601edc8f3f..394839bc915482e9a1c3231153bebcfa0c575699 100644 (file)
@@ -567,6 +567,9 @@ CONFIG_FEATURE_MOUNT_LOOP=y
 #
 CONFIG_ADJTIMEX=y
 # CONFIG_BBCONFIG is not set
+CONFIG_BEEP=y
+CONFIG_FEATURE_BEEP_FREQ=4000
+CONFIG_FEATURE_BEEP_LENGTH=30
 CONFIG_CHAT=y
 CONFIG_FEATURE_CHAT_NOFAIL=y
 # CONFIG_FEATURE_CHAT_TTY_HIFI is not set