# HG changeset patch
# User Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
# Date 1409291082 0
# Node ID bbe2b0d17d1e6ee0e2069b312d70766e7e5167fe
# Parent  3121e35f422cf6d124c191dd7b0ce975b3bf64da
gsm-fw/L1/audio_cfile/l1audio_init.c: hack to pass compilation w/o AUDIO_TASK

diff -r 3121e35f422c -r bbe2b0d17d1e gsm-fw/L1/audio_cfile/l1audio_init.c
--- a/gsm-fw/L1/audio_cfile/l1audio_init.c	Fri Aug 29 05:18:05 2014 +0000
+++ b/gsm-fw/L1/audio_cfile/l1audio_init.c	Fri Aug 29 05:44:42 2014 +0000
@@ -142,8 +142,25 @@
   #endif
 #endif
 #if(L1_BT_AUDIO ==1)
-extern T_L1_BT_AUDIO bt_audio;
+  extern T_L1_BT_AUDIO bt_audio;
 #endif
+
+/*
+ * FreeCalypso hack: the version of l1_confg.h in the Leonardo semi-src
+ * sets AUDIO_TASK to 1 unconditionally, thus it appears that by the
+ * time TCS211 came around, TI stopped supporting and testing the
+ * sans-AUDIO_TASK configuration.  We do wish to support it in FreeCalypso
+ * though.  Attempting to compile this module w/o AUDIO_TASK failed
+ * because some preprocessor constant definitions were missing.
+ * All 3 offending constants are defined in l1audio_const.h, but only
+ * when AUDIO_TASK is enabled.  The following hack is our workaround.
+ */
+#if !AUDIO_TASK
+  #define C_BGD_RECOGN  5
+  #define C_BGD_ALIGN   6
+  #define NO_MELODY_SELECTED    (0)
+#endif
+
   /**************************************/
   /* Prototypes for L1 initialization   */
   /**************************************/