summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/gui/skin_engine/skin_parser.c6
-rw-r--r--apps/misc.c2
-rw-r--r--apps/recorder/albumart.c2
-rw-r--r--apps/recorder/recording.c2
-rw-r--r--apps/shortcuts.c2
-rw-r--r--apps/tagcache.c4
-rw-r--r--firmware/target/arm/imx233/debug-imx233.c6
-rw-r--r--firmware/target/arm/s5l8700/debug-s5l8700.c4
-rw-r--r--firmware/target/arm/s5l8702/debug-s5l8702.c4
-rw-r--r--firmware/target/hosted/ibasso/pcm-ibasso.c2
-rw-r--r--firmware/target/hosted/ibasso/sysfs-ibasso.c2
-rw-r--r--firmware/target/hosted/usb-hiby.c4
-rw-r--r--lib/rbcodec/dsp/tdspeed.c9
-rw-r--r--lib/rbcodec/dsp/tdspeed.h1
14 files changed, 25 insertions, 25 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index 1a6861ff16..d89ca8b534 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -601,7 +601,7 @@ static int parse_viewporttextstyle(struct skin_element *element,
601 *line = (struct line_desc)LINE_DESC_DEFINIT; 601 *line = (struct line_desc)LINE_DESC_DEFINIT;
602 unsigned colour; 602 unsigned colour;
603 603
604 static const char *vp_options[] = { "invert", "color", "colour", 604 static const char * const vp_options[] = { "invert", "color", "colour",
605 "clear", "gradient", NULL}; 605 "clear", "gradient", NULL};
606 606
607 int vp_op = string_option(mode, vp_options, false); 607 int vp_op = string_option(mode, vp_options, false);
@@ -1401,7 +1401,7 @@ static int parse_skinvar( struct skin_element *element,
1401 return 0; 1401 return 0;
1402 case SKIN_TOKEN_VAR_SET: 1402 case SKIN_TOKEN_VAR_SET:
1403 { 1403 {
1404 static const char *sv_options[] = {"touch", "set", "inc", "dec", NULL}; 1404 static const char * const sv_options[] = {"touch", "set", "inc", "dec", NULL};
1405 1405
1406 struct skin_var_changer *data = skin_buffer_alloc(sizeof(*data)); 1406 struct skin_var_changer *data = skin_buffer_alloc(sizeof(*data));
1407 if (!data) 1407 if (!data)
@@ -1705,7 +1705,7 @@ static int parse_touchregion(struct skin_element *element,
1705 if (region->action == ACTION_NONE) 1705 if (region->action == ACTION_NONE)
1706 return WPS_ERROR_INVALID_PARAM; 1706 return WPS_ERROR_INVALID_PARAM;
1707 } 1707 }
1708 static const char *pm_options[] = {"allow_while_locked", "reverse_bar", 1708 static const char * const pm_options[] = {"allow_while_locked", "reverse_bar",
1709 "repeat_press", "long_press", NULL}; 1709 "repeat_press", "long_press", NULL};
1710 int pm_op; 1710 int pm_op;
1711 1711
diff --git a/apps/misc.c b/apps/misc.c
index d5e8bb5d98..63aa3589b2 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -1395,7 +1395,7 @@ int split_string(char *str, const char split_char, char *vector[], const int vec
1395/* returns match index from option list 1395/* returns match index from option list
1396 * returns -1 if option was not found 1396 * returns -1 if option was not found
1397 * option list is array of char pointers with the final item set to null 1397 * option list is array of char pointers with the final item set to null
1398 * ex - const char *option[] = { "op_a", "op_b", "op_c", NULL} 1398 * ex - const char * const option[] = { "op_a", "op_b", "op_c", NULL}
1399 */ 1399 */
1400int string_option(const char *option, const char *const oplist[], bool ignore_case) 1400int string_option(const char *option, const char *const oplist[], bool ignore_case)
1401{ 1401{
diff --git a/apps/recorder/albumart.c b/apps/recorder/albumart.c
index 5b3658a1cb..9ff9c72f80 100644
--- a/apps/recorder/albumart.c
+++ b/apps/recorder/albumart.c
@@ -98,7 +98,7 @@ static void fix_path_part(char* path, int offset, int count)
98} 98}
99 99
100#ifdef USE_JPEG_COVER 100#ifdef USE_JPEG_COVER
101static const char * extensions[] = { "jpeg", "jpg", "bmp" }; 101static const char * const extensions[] = { "jpeg", "jpg", "bmp" };
102static const unsigned char extension_lens[] = { 4, 3, 3 }; 102static const unsigned char extension_lens[] = { 4, 3, 3 };
103/* Try checking for several file extensions, return true if a file is found and 103/* Try checking for several file extensions, return true if a file is found and
104 * leaving the path modified to include the matching extension. 104 * leaving the path modified to include the matching extension.
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index a54b762566..db8d892b7c 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -189,7 +189,7 @@ static short balance_mem[BAL_MEM_SIZE];
189#define AGC_MODE_SIZE 5 189#define AGC_MODE_SIZE 5
190#define AGC_SAFETY_MODE 0 190#define AGC_SAFETY_MODE 0
191 191
192static const char* agc_preset_str[] = 192static const char* const agc_preset_str[] =
193{ "Off", "S", "L", "D", "M", "V" }; 193{ "Off", "S", "L", "D", "M", "V" };
194/* "Off", 194/* "Off",
195 "Safety (clip)", 195 "Safety (clip)",
diff --git a/apps/shortcuts.c b/apps/shortcuts.c
index 754bd83b80..2b032f1fd4 100644
--- a/apps/shortcuts.c
+++ b/apps/shortcuts.c
@@ -312,7 +312,7 @@ static int readline_cb(int n, char *buf, void *parameters)
312 } 312 }
313 else if (sc && settings_parseline(buf, &name, &value)) 313 else if (sc && settings_parseline(buf, &name, &value))
314 { 314 {
315 static const char *nm_options[] = {"type", "name", "data", 315 static const char * const nm_options[] = {"type", "name", "data",
316 "icon", "talkclip", NULL}; 316 "icon", "talkclip", NULL};
317 int nm_op = string_option(name, nm_options, false); 317 int nm_op = string_option(name, nm_options, false);
318 318
diff --git a/apps/tagcache.c b/apps/tagcache.c
index b6d15e7a1f..436d85812b 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -137,7 +137,7 @@ static int tempbuf_handle;
137 (1LU << tag_virt_canonicalartist)) 137 (1LU << tag_virt_canonicalartist))
138 138
139/* String presentation of the tags defined in tagcache.h. Must be in correct order! */ 139/* String presentation of the tags defined in tagcache.h. Must be in correct order! */
140static const char *tags_str[] = { "artist", "album", "genre", "title", 140static const char * const tags_str[] = { "artist", "album", "genre", "title",
141 "filename", "composer", "comment", "albumartist", "grouping", "year", 141 "filename", "composer", "comment", "albumartist", "grouping", "year",
142 "discnumber", "tracknumber", "canonicalartist", "bitrate", "length", 142 "discnumber", "tracknumber", "canonicalartist", "bitrate", "length",
143 "playcount", "rating", "playtime", "lastplayed", "commitid", "mtime", 143 "playcount", "rating", "playtime", "lastplayed", "commitid", "mtime",
@@ -151,7 +151,7 @@ static const char *tags_str[] = { "artist", "album", "genre", "title",
151 "tag_virt_entryage", "tag_virt_autoscore" 151 "tag_virt_entryage", "tag_virt_autoscore"
152}; 152};
153/* more debug strings */ 153/* more debug strings */
154static const char *tag_type_str[] = { 154static const char * const tag_type_str[] = {
155 [clause_none] = "clause_none", [clause_is] = "clause_is", 155 [clause_none] = "clause_none", [clause_is] = "clause_is",
156 [clause_is_not] = "clause_is_not", [clause_gt] = "clause_gt", 156 [clause_is_not] = "clause_is_not", [clause_gt] = "clause_gt",
157 [clause_gteq] = "clause_gteq", [clause_lt] = "clause_lt", 157 [clause_gteq] = "clause_gteq", [clause_lt] = "clause_lt",
diff --git a/firmware/target/arm/imx233/debug-imx233.c b/firmware/target/arm/imx233/debug-imx233.c
index bfc38b20dc..4487952162 100644
--- a/firmware/target/arm/imx233/debug-imx233.c
+++ b/firmware/target/arm/imx233/debug-imx233.c
@@ -940,8 +940,8 @@ bool dbg_hw_info_emi(void)
940 940
941bool dbg_hw_info_audio(void) 941bool dbg_hw_info_audio(void)
942{ 942{
943 static const char *hp_sel[2] = {"DAC", "Line1"}; 943 static const char * const hp_sel[2] = {"DAC", "Line1"};
944 static const char *mux_sel[4] = {"Mic", "Line1", "HP", "Line2"}; 944 static const char * const mux_sel[4] = {"Mic", "Line1", "HP", "Line2"};
945 lcd_setfont(FONT_SYSFIXED); 945 lcd_setfont(FONT_SYSFIXED);
946 946
947 while(1) 947 while(1)
@@ -1171,7 +1171,7 @@ bool dbg_hw_info_button(void)
1171 } 1171 }
1172 else if(MAP[i].periph == IMX233_BUTTON_LRADC) 1172 else if(MAP[i].periph == IMX233_BUTTON_LRADC)
1173 { 1173 {
1174 static const char *op_name[] = 1174 static const char * const op_name[] =
1175 { 1175 {
1176 [IMX233_BUTTON_EQ] = "eq", 1176 [IMX233_BUTTON_EQ] = "eq",
1177 [IMX233_BUTTON_GT] = "gt", 1177 [IMX233_BUTTON_GT] = "gt",
diff --git a/firmware/target/arm/s5l8700/debug-s5l8700.c b/firmware/target/arm/s5l8700/debug-s5l8700.c
index ecb15df5d0..c42eac0438 100644
--- a/firmware/target/arm/s5l8700/debug-s5l8700.c
+++ b/firmware/target/arm/s5l8700/debug-s5l8700.c
@@ -112,7 +112,7 @@ bool dbg_hw_info(void)
112 _DEBUG_PRINTF("PMU:"); 112 _DEBUG_PRINTF("PMU:");
113 for(i=0;i<7;i++) 113 for(i=0;i<7;i++)
114 { 114 {
115 char *device[] = {"(unknown)", 115 static const char * const device[] = {"(unknown)",
116 "(CLICKWHEEL)", 116 "(CLICKWHEEL)",
117 "(LCD)", 117 "(LCD)",
118 "(AUDIO)", 118 "(AUDIO)",
@@ -139,7 +139,7 @@ bool dbg_hw_info(void)
139 char line_cfg[4]; 139 char line_cfg[4];
140 int abr_stat; 140 int abr_stat;
141 uint32_t abr_cnt; 141 uint32_t abr_cnt;
142 char *abrstatus[] = {"Idle", "Launched", "Counting", "Abnormal"}; 142 static const char * const abrstatus[] = {"Idle", "Launched", "Counting", "Abnormal"};
143 143
144 uartc_port_get_line_info(&ser_port, 144 uartc_port_get_line_info(&ser_port,
145 &tx_stat, &rx_stat, &tx_speed, &rx_speed, line_cfg); 145 &tx_stat, &rx_stat, &tx_speed, &rx_speed, line_cfg);
diff --git a/firmware/target/arm/s5l8702/debug-s5l8702.c b/firmware/target/arm/s5l8702/debug-s5l8702.c
index 68b16f39f7..26b8e557a0 100644
--- a/firmware/target/arm/s5l8702/debug-s5l8702.c
+++ b/firmware/target/arm/s5l8702/debug-s5l8702.c
@@ -104,7 +104,7 @@ bool dbg_hw_info(void)
104 _DEBUG_PRINTF("PMU:"); 104 _DEBUG_PRINTF("PMU:");
105 for(i=0;i<7;i++) 105 for(i=0;i<7;i++)
106 { 106 {
107 char *device[] = {"unknown", 107 static const char *const device[] = {"unknown",
108 "unknown", 108 "unknown",
109 "LCD", 109 "LCD",
110 "AUDIO", 110 "AUDIO",
@@ -157,7 +157,7 @@ bool dbg_hw_info(void)
157 char line_cfg[4]; 157 char line_cfg[4];
158 int abr_stat; 158 int abr_stat;
159 uint32_t abr_cnt; 159 uint32_t abr_cnt;
160 char *abrstatus[] = {"Idle", "Launched", "Counting", "Abnormal"}; 160 static const char * const abrstatus[] = {"Idle", "Launched", "Counting", "Abnormal"};
161 161
162 uartc_port_get_line_info(&ser_port, 162 uartc_port_get_line_info(&ser_port,
163 &tx_stat, &rx_stat, &tx_speed, &rx_speed, line_cfg); 163 &tx_stat, &rx_stat, &tx_speed, &rx_speed, line_cfg);
diff --git a/firmware/target/hosted/ibasso/pcm-ibasso.c b/firmware/target/hosted/ibasso/pcm-ibasso.c
index 5c68ded3e1..889386b7c6 100644
--- a/firmware/target/hosted/ibasso/pcm-ibasso.c
+++ b/firmware/target/hosted/ibasso/pcm-ibasso.c
@@ -123,7 +123,7 @@ static void* pcm_thread_run(void* nothing)
123 123
124/* https://github.com/tinyalsa/tinyalsa/blob/master/tinypcminfo.c */ 124/* https://github.com/tinyalsa/tinyalsa/blob/master/tinypcminfo.c */
125 125
126static const char* format_lookup[] = 126static const char* const format_lookup[] =
127{ 127{
128 /*[0] =*/ "S8", 128 /*[0] =*/ "S8",
129 "U8", 129 "U8",
diff --git a/firmware/target/hosted/ibasso/sysfs-ibasso.c b/firmware/target/hosted/ibasso/sysfs-ibasso.c
index 8f62e3fec2..e3a0f911af 100644
--- a/firmware/target/hosted/ibasso/sysfs-ibasso.c
+++ b/firmware/target/hosted/ibasso/sysfs-ibasso.c
@@ -32,7 +32,7 @@
32#include "sysfs-ibasso.h" 32#include "sysfs-ibasso.h"
33 33
34 34
35static const char* SYSFS_PATHS[] = 35static const char* const SYSFS_PATHS[] =
36{ 36{
37 /* SYSFS_DX50_CODEC_VOLUME */ 37 /* SYSFS_DX50_CODEC_VOLUME */
38 "/dev/codec_volume", 38 "/dev/codec_volume",
diff --git a/firmware/target/hosted/usb-hiby.c b/firmware/target/hosted/usb-hiby.c
index b82fa5c4ce..050c86e446 100644
--- a/firmware/target/hosted/usb-hiby.c
+++ b/firmware/target/hosted/usb-hiby.c
@@ -63,8 +63,8 @@ void usb_enable(bool on)
63*/ 63*/
64int disk_mount_all(void) 64int disk_mount_all(void)
65{ 65{
66 const char *dev[] = {"/dev/mmcblk0p1", "/dev/mmcblk0"}; 66 const char * const dev[] = {"/dev/mmcblk0p1", "/dev/mmcblk0"};
67 const char *fs[] = {"vfat", "exfat"}; 67 const char * const fs[] = {"vfat", "exfat"};
68 68
69 sysfs_set_string("/sys/class/android_usb/android0/f_mass_storage/lun/file", ""); 69 sysfs_set_string("/sys/class/android_usb/android0/f_mass_storage/lun/file", "");
70 70
diff --git a/lib/rbcodec/dsp/tdspeed.c b/lib/rbcodec/dsp/tdspeed.c
index 21585eb78e..64cbaf5e12 100644
--- a/lib/rbcodec/dsp/tdspeed.c
+++ b/lib/rbcodec/dsp/tdspeed.c
@@ -41,7 +41,6 @@
41#define MAX_INPUTCOUNT 512 /* Max input count so dst doesn't overflow */ 41#define MAX_INPUTCOUNT 512 /* Max input count so dst doesn't overflow */
42#define FIXED_BUFCOUNT 3072 /* 48KHz factor 3.0 */ 42#define FIXED_BUFCOUNT 3072 /* 48KHz factor 3.0 */
43#define FIXED_OUTBUFCOUNT 4096 43#define FIXED_OUTBUFCOUNT 4096
44#define NBUFFERS 4
45 44
46enum tdspeed_ops 45enum tdspeed_ops
47{ 46{
@@ -65,9 +64,9 @@ static struct tdspeed_state_s
65 int32_t *ovl_buff[2]; /* overlap buffer (L+R) */ 64 int32_t *ovl_buff[2]; /* overlap buffer (L+R) */
66} tdspeed_state; 65} tdspeed_state;
67 66
68static int32_t *buffers[NBUFFERS] = { NULL, NULL, NULL, NULL }; 67static int32_t *buffers[TDSPEED_NBUFFERS] = { NULL, NULL, NULL, NULL };
69 68
70static const int buffer_sizes[NBUFFERS] = 69static const int buffer_sizes[TDSPEED_NBUFFERS] =
71{ 70{
72 FIXED_BUFCOUNT * sizeof(int32_t), 71 FIXED_BUFCOUNT * sizeof(int32_t),
73 FIXED_BUFCOUNT * sizeof(int32_t), 72 FIXED_BUFCOUNT * sizeof(int32_t),
@@ -552,7 +551,7 @@ static intptr_t tdspeed_configure(struct dsp_proc_entry *this,
552 break; 551 break;
553 552
554 case DSP_PROC_INIT: 553 case DSP_PROC_INIT:
555 if (!tdspeed_alloc_buffers(buffers, buffer_sizes, NBUFFERS)) 554 if (!tdspeed_alloc_buffers(buffers, buffer_sizes, TDSPEED_NBUFFERS))
556 return -1; /* fail the init */ 555 return -1; /* fail the init */
557 556
558 st->this = this; 557 st->this = this;
@@ -564,7 +563,7 @@ static intptr_t tdspeed_configure(struct dsp_proc_entry *this,
564 st->this = NULL; 563 st->this = NULL;
565 st->factor = PITCH_SPEED_100; 564 st->factor = PITCH_SPEED_100;
566 dsp_outbuf.remcount = 0; 565 dsp_outbuf.remcount = 0;
567 tdspeed_free_buffers(buffers, NBUFFERS); 566 tdspeed_free_buffers(buffers, TDSPEED_NBUFFERS);
568 break; 567 break;
569 568
570 case DSP_PROC_NEW_FORMAT: 569 case DSP_PROC_NEW_FORMAT:
diff --git a/lib/rbcodec/dsp/tdspeed.h b/lib/rbcodec/dsp/tdspeed.h
index 2949c1bee9..84920ac7c2 100644
--- a/lib/rbcodec/dsp/tdspeed.h
+++ b/lib/rbcodec/dsp/tdspeed.h
@@ -34,6 +34,7 @@
34 34
35#define STRETCH_MAX (250L * PITCH_SPEED_PRECISION) /* 250% */ 35#define STRETCH_MAX (250L * PITCH_SPEED_PRECISION) /* 250% */
36#define STRETCH_MIN (35L * PITCH_SPEED_PRECISION) /* 35% */ 36#define STRETCH_MIN (35L * PITCH_SPEED_PRECISION) /* 35% */
37#define TDSPEED_NBUFFERS 4
37 38
38void dsp_timestretch_enable(bool enable); 39void dsp_timestretch_enable(bool enable);
39void dsp_set_timestretch(int32_t percent); 40void dsp_set_timestretch(int32_t percent);